Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » How to render uncapped OpenGL ?
| Re: How to render uncapped OpenGL ? [message #61969 is a reply to message #61968] |
Thu, 09 April 2026 18:36  |
devilsclaw
Messages: 76 Registered: August 2022
|
Member |
|
|
I found this so that it would work on windows and linux but it still seems to be locked to gtk or how ever upp handles refresing
const char *glxExts = glXQueryExtensionsString(s_Display, s_XVisualInfo->screen);
PFNGLXSWAPINTERVALEXTPROC glXSwapIntervalEXT = NULL;
if (glxExts && strstr(glxExts, "GLX_EXT_swap_control")) {
// get function pointer
glXSwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)
glXGetProcAddress((const GLubyte *)"glXSwapIntervalEXT");
}
if (glXSwapIntervalEXT) {
// Set swap interval to 0 -> disable VSync (uncapped FPS)
glXSwapIntervalEXT(s_Display, win, 0);
printf("GLX_EXT_swap_control available - swap interval set to 0\n");
} else {
printf("GLX_EXT_swap_control not available; cannot set swap interval via glXSwapIntervalEXT\n");
printf("If you have GLX_MESA_swap_control or GLX_SGI_swap_control, use appropriate function.\n");
}
|
|
|
|
Goto Forum:
Current Time: Wed Apr 29 10:25:48 GMT+2 2026
Total time taken to generate the page: 0.00404 seconds
|