Added GL_CHECK_I macro to ignore GL errors.
This commit is contained in:
parent
eecbf19c57
commit
b42819a87a
@ -1406,7 +1406,7 @@ namespace bgfx
|
|||||||
|
|
||||||
if (NULL == glInsertEventMarker)
|
if (NULL == glInsertEventMarker)
|
||||||
{
|
{
|
||||||
glInsertEventMarker = NULL != glStringMarkerGREMEDY
|
glInsertEventMarker = NULL != glStringMarkerGREMEDY
|
||||||
? stubInsertEventMarkerGREMEDY
|
? stubInsertEventMarkerGREMEDY
|
||||||
: stubInsertEventMarker
|
: stubInsertEventMarker
|
||||||
;
|
;
|
||||||
@ -3287,7 +3287,7 @@ namespace bgfx
|
|||||||
|
|
||||||
void Context::rendererSetMarker(const char* _marker, uint32_t _size)
|
void Context::rendererSetMarker(const char* _marker, uint32_t _size)
|
||||||
{
|
{
|
||||||
GL_CHECK(glInsertEventMarker(_size, _marker) );
|
GL_CHECK_I(glInsertEventMarker(_size, _marker) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Context::rendererSubmit()
|
void Context::rendererSubmit()
|
||||||
@ -3384,7 +3384,7 @@ namespace bgfx
|
|||||||
currentState.m_flags = newFlags;
|
currentState.m_flags = newFlags;
|
||||||
currentState.m_stencil = newStencil;
|
currentState.m_stencil = newStencil;
|
||||||
|
|
||||||
GL_CHECK(glInsertEventMarker(0, s_viewName[key.m_view]) );
|
GL_CHECK_I(glInsertEventMarker(0, s_viewName[key.m_view]) );
|
||||||
|
|
||||||
view = key.m_view;
|
view = key.m_view;
|
||||||
programIdx = invalidHandle;
|
programIdx = invalidHandle;
|
||||||
@ -4224,7 +4224,7 @@ namespace bgfx
|
|||||||
m_textVideoMemBlitter.blit(m_render->m_textVideoMem);
|
m_textVideoMemBlitter.blit(m_render->m_textVideoMem);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL_CHECK(glFrameTerminatorGREMEDY() );
|
GL_CHECK_I(glFrameTerminatorGREMEDY() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,18 +338,23 @@ typedef uint64_t GLuint64;
|
|||||||
|
|
||||||
namespace bgfx
|
namespace bgfx
|
||||||
{
|
{
|
||||||
# define _GL_CHECK(_call) \
|
#define _GL_CHECK(_check, _call) \
|
||||||
do { \
|
do { \
|
||||||
/*BX_TRACE(#_call);*/ \
|
/*BX_TRACE(#_call);*/ \
|
||||||
_call; \
|
_call; \
|
||||||
GLenum err = glGetError(); \
|
GLenum err = glGetError(); \
|
||||||
BX_CHECK(0 == err, #_call "; glError 0x%x %d", err, err); \
|
_check(0 == err, #_call "; glError 0x%x %d", err, err); \
|
||||||
|
BX_UNUSED(err); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
#define IGNORE(...) do {} while(0)
|
||||||
|
|
||||||
#if BGFX_CONFIG_DEBUG
|
#if BGFX_CONFIG_DEBUG
|
||||||
# define GL_CHECK(_call) _GL_CHECK(_call)
|
# define GL_CHECK(_call) _GL_CHECK(BX_CHECK, _call)
|
||||||
|
# define GL_CHECK_I(_call) _GL_CHECK(IGNORE, _call)
|
||||||
#else
|
#else
|
||||||
# define GL_CHECK(_call) _call
|
# define GL_CHECK(_call) _call
|
||||||
|
# define GL_CHECK_I(_call) _call
|
||||||
#endif // BGFX_CONFIG_DEBUG
|
#endif // BGFX_CONFIG_DEBUG
|
||||||
|
|
||||||
#define GL_IMPORT_TYPEDEFS 1
|
#define GL_IMPORT_TYPEDEFS 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user