|
@@ -127,6 +127,7 @@ namespace bgfx
|
|
|
|
|
|
|
|
#if BGFX_CONFIG_RENDERER_OPENGL >= 31
|
|
#if BGFX_CONFIG_RENDERER_OPENGL >= 31
|
|
|
glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress( (const GLubyte*)"glXCreateContextAttribsARB");
|
|
glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress( (const GLubyte*)"glXCreateContextAttribsARB");
|
|
|
|
|
+
|
|
|
if (NULL != glXCreateContextAttribsARB)
|
|
if (NULL != glXCreateContextAttribsARB)
|
|
|
{
|
|
{
|
|
|
BX_TRACE("Create GL 3.1 context.");
|
|
BX_TRACE("Create GL 3.1 context.");
|
|
@@ -154,6 +155,8 @@ namespace bgfx
|
|
|
|
|
|
|
|
import();
|
|
import();
|
|
|
|
|
|
|
|
|
|
+ glXMakeCurrent(s_display, s_window, m_context);
|
|
|
|
|
+
|
|
|
glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)glXGetProcAddress( (const GLubyte*)"glXSwapIntervalEXT");
|
|
glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)glXGetProcAddress( (const GLubyte*)"glXSwapIntervalEXT");
|
|
|
if (NULL != glXSwapIntervalEXT)
|
|
if (NULL != glXSwapIntervalEXT)
|
|
|
{
|
|
{
|
|
@@ -179,8 +182,6 @@ namespace bgfx
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- glXMakeCurrent(s_display, s_window, m_context);
|
|
|
|
|
-
|
|
|
|
|
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
|
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
|
glXSwapBuffers(s_display, s_window);
|
|
glXSwapBuffers(s_display, s_window);
|