6

glXSwapBuffers glitchy timing

 2 years ago
source link: https://stackoverflow.com/questions/71849786/glxswapbuffers-glitchy-timing
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

glXSwapBuffers glitchy timing

I have been getting very glitchy timings in my render loop causing rendering to stutter. I have set up timing around my glXSwapBuffers call like so:

Timer timer;
glXSwapBuffers(display, window);
timer();
if (timer.elapsed_seconds > 0.1)
 printf("stutter(%f)\n\r", timer.elapsed_seconds);

And am getting results like:

stutter(0.109081)
stutter(0.108956)
stutter(0.662115)
stutter(0.759556)
stutter(0.657789)
stutter(0.283185)
stutter(0.105581)
stutter(0.106285)
stutter(0.572289)
stutter(0.199908)
stutter(0.218540)
stutter(0.752033)
stutter(0.148225)

What could be causing glXSwapBuffers to take so long to call? How can I fix the stuttering?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK