U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » How to render uncapped OpenGL ?
How to render uncapped OpenGL ? [message #61968] Thu, 09 April 2026 17:42 Go to next message
devilsclaw is currently offline  devilsclaw
Messages: 76
Registered: August 2022
Member
Currently I am using GLCtrl for opengl and on linux (maybe windows not tested yet). the max fps I can get is 60 due it being locked to the refresh of the display.

OpenGL supports uncapped FPS via glfw but GLCtrl does not use glfw, it also supports unlocked fps if you run a program with environment variables vblank_mode, __GL_SYNC_TO_VBLANK set to 0.

This works with glxgears and other opengl programs but it does not work with GLCtrl / upp.

Is there a way to uncap the fps?
Re: How to render uncapped OpenGL ? [message #61969 is a reply to message #61968] Thu, 09 April 2026 18:36 Go to previous message
devilsclaw is currently offline  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");
  }
Previous Topic: Feature request for plugin/tif
Next Topic: Drawing / Painter Difference,Usage,Manual
Goto Forum:
  


Current Time: Tue Apr 28 17:25:13 GMT+2 2026

Total time taken to generate the page: 0.00615 seconds