My direct draw class sucks.

Started by
4 comments, last by Leadorn 21 years ago
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.
Advertisement
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.
//------------------------------------------------------------------------------------------------------The great logician Bertrand Russell once claimed that he could prove anything if given that 1+1=1. So one day, some fool asked him, "Ok. Prove that you're the Pope." He thought for a while and proclaimed, "I am one. The Pope is one. Therefore, the Pope and I are one."
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.
----------------------“I have no country to fight for, mycountry is the earth, and I am a citizenof the world... I am not a capitalist soldier,I am a proletarian revolutionist. Ido not belong to the army of the plutocracybut to the irregular army of thepeople. I refuse to obey any commandto fight from the ruling class, but I willnot wait to be commanded to fight forthe working class. I am opposed to everywar but one. I am for that war heartand soul, and that is the world-wide warof the social revolution. In that war I amprepared to fight in any way the rulingclass may make it necessary even tothe barricades.”Eugene V. Debs----------------------
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.
put this before bliting to the primary surface:

m_pDirectDraw->WaitForVerticalBlank (DDWAITVB_BLOCKBEGIN, NULL);
[size="2"]I like the Walrus best.

This topic is closed to new replies.

Advertisement