Fullscreen Performance

Ok, maybe this should be in the beginners section, but I’ve queried the boards and didn’t get much about my specific problem.

Have a medium sized OGL app, net code and all. Running on a GeFroce2 ULTRA with 32/24/8 ( color/depth/stencil ). Only rendering ~800 polys per frame with maybe 8 different textures.

Problem is that in fullscreen mode, I’m only getting 60fps. If I don’t call ChangeDisplaySettings and just “fake” fullscreen, I get the expected ~100fps (refresh rate of monitor).

I’ve profiled the hell out of the app, using both Intel’s GPT and VS6’s profiler. Everything points to the wglSwapBuffer call being the bottleneck. Currently I’m using the win32 SwapBuffers() function.

here’s the DEVMODE code:

DEVMODE dmScreenSettings;
dmScreenSettings.dmPelsWidth = displayX;
dmScreenSettings.dmPelsHeight = displayY;
dmScreenSettings.dmBitsPerPel = 32;

Anyone have any ideas what’s causing the screwup? Am I missing something while initializing the DEVMODE structure?


Seems pretty clear that your card is syncing
swapbuffers to vblank, AND that your monitor
is set to run at 60 Hz in the resolution
your fullscreen mode uses. Doesn’t that
flicker bad?

Look into the WGL swap buffer hint, and set
it to 0 for no-vblank, and 1 for vblank.

That seems to be the problem, but I’m having trouble finding any documentation on the extension you mentioned. All I’ve found is glAddSwapHintRectWIN, but it seems that that function’s purpose is to specify a sub-region for swapping.

Do you know where I could find the extension spec?


Check this out: http://oss.sgi.com/projects/ogl-sample/registry/EXT/wgl_swap_control.txt

Also look in your display control panel OpenGL tab. You can disable VSync there.

Thanks for the help. Worked fine and now I’m getting an incredible ~210fps!

Just in case anyone else has had this problem, here’s all you need to do to fix it. ( I spend a lot of time reading other people’s threads, and so If you’re like me this might help )

typedef void (APIENTRY * PFNWGLSWAPINTERVALEXTPROC)(int interval);
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress(“wglSwapIntervalEXT”);
wglSwapIntervalEXT( 0 );

Thanks again,


on my OCed 416 celeron with geforce 2 mx i get 75 FPS with 40000 multitextured (2 TMUs).
How many do you ? Just to know… :wink:

Using a p4 1.4ghz GeForce2 ULTRA 64…

Rendering something like 2000 polys per frame in this particular app. Using intels GPT, I clocked it at 350fps when idle, 250 under the greatest stress from animations and user input. This is, of course, with vsync disabled.