diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2011-11-19 17:51:19 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2011-11-19 17:51:19 +0800 |
commit | 21df76991789e2177cfc57f399fcfa34fa695c4e (patch) | |
tree | 1a9f25b587c18830c8d2f272634d8b8b8236e608 | |
parent | bf1e9a86cffb1088f43e2d6c085da045fb73ffae (diff) |
SexyAppFramework: Replace printf with logfi*
-rw-r--r-- | osframework/source/SexyAppFramework/GLDisplay.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/osframework/source/SexyAppFramework/GLDisplay.cpp b/osframework/source/SexyAppFramework/GLDisplay.cpp index 7a67092..a153936 100644 --- a/osframework/source/SexyAppFramework/GLDisplay.cpp +++ b/osframework/source/SexyAppFramework/GLDisplay.cpp @@ -7,6 +7,7 @@ #include "Debug.h" #include "MemoryImage.h" #include "KeyCodes.h" +#include "SexyLog.h" #include <cstdio> @@ -16,12 +17,6 @@ using namespace Sexy; #define ftofix(f) (GLfixed)(f * 65536.0f) #endif -#if defined(DEBUG) || defined(SEXY_GL_DEBUG) -#define SEXY_GL_IS_DEBUG() true -#else -#define SEXY_GL_IS_DEBUG() getenv("SEXY_GL_DEBUG") -#endif - GLDisplay::GLDisplay(SexyAppBase* theApp) { mApp = theApp; @@ -146,8 +141,7 @@ void GLDisplay::Reshape() h = mWindowHeight * mOverScan; glViewport (x, y, w, h); - if (SEXY_GL_IS_DEBUG ()) - printf ("GL viewport: (%.2f, %.2f, %.2f, %.2f)\n", x, y, w, h); + logfd ("GL viewport: (%.2f, %.2f, %.2f, %.2f)\n", x, y, w, h); } void GLDisplay::InitGL() @@ -164,19 +158,16 @@ void GLDisplay::InitGL() str = strchr (str, '.') + 1; mGLMinor = atoi (str); } - if (SEXY_GL_IS_DEBUG ()) - printf ("GL version: %s(%d.%d)\n", version, mGLMajor, mGLMinor); + logfi ("GL version: %s(%d.%d)\n", version, mGLMajor, mGLMinor); glGetIntegerv (GL_MAX_TEXTURE_SIZE, &mMaxTextureWidth); glGetIntegerv (GL_MAX_TEXTURE_SIZE, &mMaxTextureHeight); - if (SEXY_GL_IS_DEBUG ()) - printf ("GL Maximium texture size: %d\n", mMaxTextureHeight); + logfi ("GL Maximium texture size: %d\n", mMaxTextureHeight); mGLExtensions = (const char*)glGetString (GL_EXTENSIONS); - if (SEXY_GL_IS_DEBUG ()) - printf ("GL extensions: %s\n", mGLExtensions); + logfi ("GL extensions: %s\n", mGLExtensions); if (mGLExtensions) { if (mGLMajor > 2 || (mGLMajor == 1 && mGLMinor >= 2) || @@ -223,8 +214,6 @@ void GLDisplay::InitGL() ftofix (mHeight), ftofix (0), ftofix (-1.0), ftofix (1.0)); #endif - if (SEXY_GL_IS_DEBUG ()) - printf ("GL Ortho: (%d, %d, %d, %d)\n", 0, 0, mWidth, mHeight); glMatrixMode (GL_MODELVIEW); glLoadIdentity (); |