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.
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?
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 )
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.