mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Fixed Issue #33.
This commit is contained in:
parent
7cbe31b823
commit
6890764dc1
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue