Line 115... |
Line 115... |
115 |
std::cout << "OpenGLContext is direct\n";
|
115 |
std::cout << "OpenGLContext is direct\n";
|
116 |
else
|
116 |
else
|
117 |
std::cout << "OpenGLContext is not direct\n";
|
117 |
std::cout << "OpenGLContext is not direct\n";
|
118 |
|
118 |
|
119 |
// Set swap interval to 1 for standard vsync
|
119 |
// Set swap interval to 1 for standard vsync
|
120 |
typedef GLvoid (*glXSwapIntervalSGIFunc) (GLint);
|
120 |
//typedef GLvoid (*glXSwapIntervalSGIFunc) (GLint);
|
121 |
const char *glx_extensions = glXQueryExtensionsString(contextInfo->display, screenNum);
|
121 |
const char *glx_extensions = glXQueryExtensionsString(contextInfo->display, screenNum);
|
122 |
if (strstr(glx_extensions, "GLX_SGI_swap_control")) {
|
122 |
if (strstr(glx_extensions, "GLX_SGI_swap_control")) {
|
123 |
PFNGLXSWAPINTERVALSGIPROC SwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)glXGetProcAddressARB((const GLubyte*)"glXSwapIntervalSGI");
|
123 |
PFNGLXSWAPINTERVALSGIPROC SwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)glXGetProcAddressARB((const GLubyte*)"glXSwapIntervalSGI");
|
124 |
SwapIntervalSGI(1);
|
124 |
SwapIntervalSGI(1);
|
125 |
} else if (strstr(glx_extensions, "GLX_EXT_swap_control")) {
|
125 |
} else if (strstr(glx_extensions, "GLX_EXT_swap_control")) {
|