Kaydet (Commit) 43190248 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

If SAL_WARN() does nothing, no point in CHECK_GL_ERROR() either

Earlier, CHECK_GL_ERROR() always called OpenGLHelper::checkGLError().
That function looks up the OpenGL error status using glGetError(),
which might be a not so light-weight operation, and outputs error
information using SAL_WARN(). In a production build where SAL_WARN()
is a no-op anyway, that is fairly pointless.

Change-Id: I2d044bff6128a8ac7739020f8e414d7d3615e8d5
üst 97972153
...@@ -99,7 +99,11 @@ public: ...@@ -99,7 +99,11 @@ public:
#endif #endif
}; };
#ifdef SAL_LOG_WARN
#define CHECK_GL_ERROR() OpenGLHelper::checkGLError(__FILE__, __LINE__) #define CHECK_GL_ERROR() OpenGLHelper::checkGLError(__FILE__, __LINE__)
#else
#define CHECK_GL_ERROR() do { } while (false)
#endif
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment