Loading opengl/libs/GLES_CM/gl.cpp +21 −3 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,9 @@ using namespace android; using namespace android; // set this to 1 for crude GL debugging #define CHECK_FOR_GL_ERRORS 0 // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // extensions for the framework // extensions for the framework // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading Loading @@ -71,7 +74,7 @@ void glVertexPointerBounds(GLint size, GLenum type, #undef CALL_GL_API #undef CALL_GL_API #undef CALL_GL_API_RETURN #undef CALL_GL_API_RETURN #if USE_FAST_TLS_KEY #if USE_FAST_TLS_KEY && !CHECK_FOR_GL_ERRORS #define API_ENTRY(_api) __attribute__((naked)) _api #define API_ENTRY(_api) __attribute__((naked)) _api Loading @@ -95,11 +98,26 @@ void glVertexPointerBounds(GLint size, GLenum type, #else #else #if CHECK_FOR_GL_ERRORS #define CHECK_GL_ERRORS(_api) \ do { GLint err = glGetError(); \ LOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \ } while(false); #else #define CHECK_GL_ERRORS(_api) do { } while(false); #endif #define API_ENTRY(_api) _api #define API_ENTRY(_api) _api #define CALL_GL_API(_api, ...) \ #define CALL_GL_API(_api, ...) \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ _c->_api(__VA_ARGS__) _c->_api(__VA_ARGS__); \ CHECK_GL_ERRORS(_api) #define CALL_GL_API_RETURN(_api, ...) \ #define CALL_GL_API_RETURN(_api, ...) \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ Loading Loading
opengl/libs/GLES_CM/gl.cpp +21 −3 Original line number Original line Diff line number Diff line Loading @@ -31,6 +31,9 @@ using namespace android; using namespace android; // set this to 1 for crude GL debugging #define CHECK_FOR_GL_ERRORS 0 // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // extensions for the framework // extensions for the framework // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- Loading Loading @@ -71,7 +74,7 @@ void glVertexPointerBounds(GLint size, GLenum type, #undef CALL_GL_API #undef CALL_GL_API #undef CALL_GL_API_RETURN #undef CALL_GL_API_RETURN #if USE_FAST_TLS_KEY #if USE_FAST_TLS_KEY && !CHECK_FOR_GL_ERRORS #define API_ENTRY(_api) __attribute__((naked)) _api #define API_ENTRY(_api) __attribute__((naked)) _api Loading @@ -95,11 +98,26 @@ void glVertexPointerBounds(GLint size, GLenum type, #else #else #if CHECK_FOR_GL_ERRORS #define CHECK_GL_ERRORS(_api) \ do { GLint err = glGetError(); \ LOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \ } while(false); #else #define CHECK_GL_ERRORS(_api) do { } while(false); #endif #define API_ENTRY(_api) _api #define API_ENTRY(_api) _api #define CALL_GL_API(_api, ...) \ #define CALL_GL_API(_api, ...) \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ _c->_api(__VA_ARGS__) _c->_api(__VA_ARGS__); \ CHECK_GL_ERRORS(_api) #define CALL_GL_API_RETURN(_api, ...) \ #define CALL_GL_API_RETURN(_api, ...) \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ Loading