Ensure we get a debug context as appropriate in glx. (#1034)
If BGFX_CONFIG_DEBUG is defined, get a GL debug context. This mirrors the behavior from wgl, and allows KHR_debug/ARB_debug_output messages to work.
This commit is contained in:
parent
b1eb4098ee
commit
5cf641c3db
@ -155,10 +155,12 @@ namespace bgfx { namespace gl
|
||||
if (NULL != glXCreateContextAttribsARB)
|
||||
{
|
||||
BX_TRACE("Create GL 3.1 context.");
|
||||
int32_t flags = BGFX_CONFIG_DEBUG ? GLX_CONTEXT_DEBUG_BIT_ARB : 0;
|
||||
const int contextAttrs[] =
|
||||
{
|
||||
GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
|
||||
GLX_CONTEXT_MINOR_VERSION_ARB, 1,
|
||||
GLX_CONTEXT_FLAGS_ARB, flags,
|
||||
GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
|
||||
0,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user