Poor full screen performance
I''ve been writing some programs based on the tutorials and I''ve noticed that in full screen modes the frame rate is MUCH lower than in windowed modes. ie it drops from 40 fps to about 3.
Does anyone reckon that this is because of my drivers (which I have updated recently), or just that I''m doing setting something up wrong?
cheers dan
Game production:
Good, quick, cheap: Choose two.
Game production:Good, quick, cheap: Choose two.
Be more specific please. What your program actually does ? How do you call SetDisplayMode() ?
Edited by - Prosper/LOADED on 4/26/00 8:53:44 AM
Edited by - Prosper/LOADED on 4/26/00 8:53:44 AM
Most likely it''s just because it''s running at a higher resolution. Do you start with a, lets say, 320x240 window and then when you go into full screen mode it is running at 800x600 or 1024x768? If so, it''s because it has to render more pixels to the screen than to the little window.
Morgan
Morgan
More specifics:
The programs drawing hardly anything....
theres only one big textured poly ( a rectangle ), ( which doesn''t go off the edge of the screen.
Theres also two filled polys and the rest is just some lines (around 200). There aren''t any complex calculations going on in the background.
I''m using the tutorial routines for setting up the screen, so what i''m doing is:
ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)
followed by CreateWindowEx(...)
It isn''t drawing more pixels as, the window size and the full screen resolution is the same. If i drag the window to be bigger, I do see the frame rate drop, but only by a reasonable amount, eg change it from 640,480 to almost 1600, 1200 and the frame rate drops from 40 to 20.
Dan
The programs drawing hardly anything....
theres only one big textured poly ( a rectangle ), ( which doesn''t go off the edge of the screen.
Theres also two filled polys and the rest is just some lines (around 200). There aren''t any complex calculations going on in the background.
I''m using the tutorial routines for setting up the screen, so what i''m doing is:
ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)
followed by CreateWindowEx(...)
It isn''t drawing more pixels as, the window size and the full screen resolution is the same. If i drag the window to be bigger, I do see the frame rate drop, but only by a reasonable amount, eg change it from 640,480 to almost 1600, 1200 and the frame rate drops from 40 to 20.
Dan
Game production:Good, quick, cheap: Choose two.
Hi Danack,
Just a random thought that popped into my head... it could be that when you change the screen mode, the refresh rate of the monitor may be getting set back to some crap number like 60Hz (yuk). When you swap buffers, OpenGL implcitly waits for the next vertical retrace (unless you''ve disabled it with a driver utility), so it could be that your program is just barely missing each retrace, and has to wait for the next one before flipping, causing a lag between frames (poor framerate). Do you see what I''m getting at?
Actually, the more I think about it (if you''re running at 640x480 and drawing a simple scene with shite all polys), the less likely this seems... oh well
-------------
squirrels are a remarkable source of protein...
Just a random thought that popped into my head... it could be that when you change the screen mode, the refresh rate of the monitor may be getting set back to some crap number like 60Hz (yuk). When you swap buffers, OpenGL implcitly waits for the next vertical retrace (unless you''ve disabled it with a driver utility), so it could be that your program is just barely missing each retrace, and has to wait for the next one before flipping, causing a lag between frames (poor framerate). Do you see what I''m getting at?
Actually, the more I think about it (if you''re running at 640x480 and drawing a simple scene with shite all polys), the less likely this seems... oh well
-------------
squirrels are a remarkable source of protein...
Bah! duff drivers.
Apparently my card doesn''t like full screen 24 bit colour.
If I set the colour depth to either 16 or 32 it works fine. If I set the colour depth to 24 bit then in 640, 480 mode, my program run at about 3 fps, if I set it to 800, 600 then the screens corrupted....hey ho, guess I''ll just have to use 32-bit colour then
Apparently my card doesn''t like full screen 24 bit colour.
If I set the colour depth to either 16 or 32 it works fine. If I set the colour depth to 24 bit then in 640, 480 mode, my program run at about 3 fps, if I set it to 800, 600 then the screens corrupted....hey ho, guess I''ll just have to use 32-bit colour then
Game production:Good, quick, cheap: Choose two.
Fullscreen 24 bit colour isn''t available on any graphics card I know of
Besides in NeHe''s base code colour is set up to be 32 bit
so it will run really slow if you set up your screen as 16bit.
32bit colour is better anyway ''cos it has faster memory access and has an 8bit destination alpha in there for better blending stuff...
Besides in NeHe''s base code colour is set up to be 32 bit
so it will run really slow if you set up your screen as 16bit.
32bit colour is better anyway ''cos it has faster memory access and has an 8bit destination alpha in there for better blending stuff...
Check out my shadows page and send me some feedback
May 03, 2000 05:55 PM
a pixel is only so big.
just because the resolution is static does not mean that it won''t be drawing more pixels when you maximize the screen.
it will draw magnitudes more because the objects are scaled to the window size. (in these tutorials anyway.)
just because the resolution is static does not mean that it won''t be drawing more pixels when you maximize the screen.
it will draw magnitudes more because the objects are scaled to the window size. (in these tutorials anyway.)
When I said fullscreen mode, I meant fullscreen, er, mode rather than a fullscreen windowed mode. So the resolution was the same for both the window and the fullscreen.
RandomJon:
My graphics card does claim to support 24bit modes...it shouldn''t change to that mode if it wasn''t supported.
Besides in NeHe''s base code colour is set up to be 32 bit
so it will run really slow if you set up your screen as 16bit.
32bit colour is better anyway ''cos it has faster memory access...
Hmm, can you justify either of these statements?
RandomJon:
My graphics card does claim to support 24bit modes...it shouldn''t change to that mode if it wasn''t supported.
Besides in NeHe''s base code colour is set up to be 32 bit
so it will run really slow if you set up your screen as 16bit.
32bit colour is better anyway ''cos it has faster memory access...
Hmm, can you justify either of these statements?
Game production:Good, quick, cheap: Choose two.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement