I always assumed that if I created a window with WM_POPUP at (0,0) and made it the size of the screen that the driver would understand that it’s a fullscreen mode and would just switch the buffers instead of copying the backbuffer into the framebuffer.
I was obviously wrong …
I’m working a little on a small benchmarking utility and when I had done the test for pixel fillrate I was surpriced by the low number I got. After a few tests I found that it spent almost half the time in SwapBuffers(). I tried changing the OGLEnableHWPageFlip key (this is on a Radeon card btw) and saw a clear difference in Quake3 but not in my app. I’ve tried changing the way I create my window, but the only time I get a real fullscreen mode is if I remove the WS_VISIBLE flag and don’t call ShowWindow() … but then my window of course isn’t recieving and input messages
I guess it’s something with how I create my window, this is how I do it right now:
CreateWindowEx(WS_EX_APPWINDOW, “GLwin”,“GLbench”, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0, 0, Width, Height, NULL, NULL, hInstance, NULL);
So, what am I doing wrong?
Exactly what do I need to do to make the driver understand that I’m using fullscreen mode?
Thanks for the help guys!
Got it working. I found that I had to call ShowWindow before I create the GL context … not sure why, but now it work at least.
btw Paddy, do most of that code originally come from a nehe tutorial?
While trying to solve the prob I just picked a random nehe tutorial and checked how he did it. I just saw that your code was very very similar … could not be coincidental …
That is wrong? well, actually I’m getting exacly the same performance in windowed and fullscreen… so I think it’s a bad signal…
Should I register the class with fullscreen properties so that the driver chooses pageFlipping istead of a back to frontbuffer copy?
But if I destroy the window, I must re-initialize directsound,directinput, and evertying that depends on the main HWND… this just seems very inefficient…