My direct draw class sucks.
Hi
I have some serious problem with my direct draw class. When I start the app the display is blinking, and if the app should respond to some input and remove ex a window I doesn’t. One time half of the monitor blinks and the other dident.
The problem goes away when I insert a sleep inside the game loop. Update rate is 85hz, and thats how many fps i get. 85.
Is this some old buggs in dd, because i dont know which version i code for. You see I use DIRECTDRAWSURFACE without the digit at the end. Should I use dd8, or which version is the newest.
How do I use the newer ddraw? I guess download sdk. Cause now I cant use directdrawsurface7 only directdrawsurface.
The newest version of DX is 9.0. About DirectDraw- that ended with version 7.0. If you want to to 2-d stuff now, you should use the ID3DXSprite member. Check the SDK for more info, or do a search on the forums since there have been a bunch of topics abou tit.
if you want to use directdraw 7, there are articles in the Articles & Resources section here...the initialization and all that is almost identical to just using directdraw
"When we look at modern Man we have to face the facts that modern Man suffers from a kind of poverty of the Spirit, which stands in glaring contrast to his scientific and technological abundance. We''''ve learned to fly the air like birds, we''''ve learned to swim the seas like fish, and yet we haven''''t learned to walk the Earth as brothers and sisters."
Martin Luther King Jr.
"When we look at modern Man we have to face the facts that modern Man suffers from a kind of poverty of the Spirit, which stands in glaring contrast to his scientific and technological abundance. We''''ve learned to fly the air like birds, we''''ve learned to swim the seas like fish, and yet we haven''''t learned to walk the Earth as brothers and sisters."
Martin Luther King Jr.
You should be using the LPDIRECTDRAWSURFACE7 and such. dd7 is the last version of direct draw and is pretty much suppotyed by every modern computer
it is obvious that your program is not waiting for vertical retrace correctly on your video card ... are you telling it to?
If you do not tell it to flip in a safe manner, it will blink, expecially if you are running too fast.
If you do not tell it to flip in a safe manner, it will blink, expecially if you are running too fast.
put this before bliting to the primary surface:
m_pDirectDraw->WaitForVerticalBlank (DDWAITVB_BLOCKBEGIN, NULL);
m_pDirectDraw->WaitForVerticalBlank (DDWAITVB_BLOCKBEGIN, NULL);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement