choppy windowed mode framerate in DX8..


#1

well i’ve begun on DX again… this time i know how to rotate the #)*(@ camera though :smiley:

i started the thing in DX9, and then thought about it, and decided to move it down to 8. there’s really nothing in 9 that i need, and i’m fairly comfortable with 8, not to mention i want this to be widely available (as many people still don’t have 9).

however when moving down to 8, i noticed something. for some reason, the framerate in windowed mode is choppy – plenty fast, but choppy. i’m using the D3DSWAPEFFECT_COPY_VSYNC as it’s the only one that prevents tearing in windowed mode. the framerate seems to fluctuate about 20FPS from 60 to 80, and never sits still. it’s quite annoying and noticeable.

i’ve tried doing it on my own by making a VWait command, placing that before my screen flip, but it doesn’t seem to work – it has the same problems as DX doing it automatically.

this doesn’t seem to happen in DX9…

so has anyone solved this?

also, i have done no windows programming, and MSDN is not the easiest thing to navigate (and searching never seems to come up with the right stuff), but how do i switch to fullscreen mode?

thanks :slight_smile:


#2

That’s strange, cuz DX9 doesn’t even have D3DSWAPEFFECT_COPY_VSYNC anymore. Maybe that’s why they got rid of it. But even for windowed apps I’d use multiple buffers and D3DSWAPEFFECT_DISCARD… as that’s what’s recommended.

To go into fullscreen you just have to recreate your devices and vertex buffers, setting the Windowed presentation parameter to FALSE.


#3

if i set the windowed mode to FALSE it just exits when it tries to start. i’ve tried setting the FullScreen_RefreshRateInHz to D3DPRESENT_RATE_DEFAULT and the FullScreen_PresentationInterval to D3DPRESENT_INTERVAL_ONE, but it still doesn’t work. for some reason i seem to remember that something has to be changed in teh window creation code…?

DX9 doesn’t have the COPY_VSYNC because they changed they parameters you can set for the Presentation Interval. in DX9 i used D3DSWAPEFFECT_FLIP and a presentation interval of ONE and it works fine… however in DX8 windowed, you are not allowed to set the presentation interval to anything other than 0, and like i said before, if i used FLIP and try to limit the framerate myself, it’s just as choppy as with COPY_VSYNC.

so am i screwed?


#4

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.