D
D
Dmitry2021-05-31 12:13:16
3D
Dmitry, 2021-05-31 12:13:16

How to fix image stuttering in an OpenGL application on an NVidia graphics card?

There are several C++ applications in OpenGL. They work fine on old, built-in and discrete, video cards. There was a problem with the new NVidia 2070 graphics card. It seems to be the FPS synchronization with the display refresh rate. It looks like once a second the picture slows down a little. Tried to disable sync. It didn't work: 60 FPS remained. The programs have a small delay in the form of Sleep - to reduce the load. Removed her. The frame rate increased then ~ 1000, the brakes disappeared. An interesting point: if Sleep (1) or even usleep (1) was installed, the video card gave out a stable 60 FPS.

Question. Is it possible to make lightweight OpenGL (1.0) applications run smoothly on NVidia without jacking up FPS?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2021-06-01
@Oldshelf

It was suggested that this effect is called "stuttering". Unfortunately, I did not find a way to deal with it on OpenGL. Basically, all discussions of this problem come down to setting up the system.
PS I read the discussion of this issue more carefully . I seem to have solved the problem by setting "wglSwapIntervalEXT(1) ", removing Sleep, and disabling the "tweak" of incrementing motion/turn variables, setting instead a constant factor independent of current FPS.
PPS The solution does not work well if the program uses multithreading.

A
Armenian Radio, 2021-05-31
@gbg

You need to set up VSYNC.

In short:
wglSwapIntervalEXT(0) - disables vsync, OK
wglSwapIntervalEXT(1) - adaptive vsync, NOT OK !
wglSwapIntervalEXT(-1) - adaptive vsync, OK
wglSwapIntervalEXT(-2) - adaptive vsync half rate, OK

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question