Skip to main content
gamedev.net
🔒 Locked

Directdraw problem..

Started by El_Kimmo Apr 9, 2002 at 4:44 AM 8 replies 350+ views
Original Post
El_Kimmo
El_Kimmo
When I create a Directdraw object with only a primary surface to write to and I plot some graphics on it at the startup it looks fine for some seconds. But then the screen goes black like the video memory resets. Can anybody help me i do not know what to do.... I do not have any problems when I attachs another surface, it only happens when I have one instant primary surface. I am using the DirectDraw version 7 and are setting the Cooperative level to Exclusive and Fullscreen. Sory my bad english, but hi what can I say i am no God. Thanks in advance El Kimmo.
zipless
zipless
Are you drawing to the surface just at the start or throughout the program?

/ Ignorance is bliss, then you go and spoil it by learning stuff /
Dean Harding
Dean Harding
In your WNDCLASSEX structure, do you set the hbrBackground to anything but NULL? If you do, it''ll automatically redraw the background when it receives a WM_ERASEBKGND message.


codeka.com - Just click it.
oto76mm
oto76mm
show me how you use the blt/bltfast function in the game loop
Maybe I can help
Mirek Heikkila
Mirek Heikkila
to the first post.. hmm i have the same problem.. i think its because i got dx 8.1 and running xp now and apparently it only likes d3d video surfaces even if your using ddraw?? sorry, but i''ve been busy and need to find a job or i would know more

mmh
ya ya it''s me..
El_Kimmo
El_Kimmo
To Mirek...
If you find out how to fix the problem feel free to mail me el_kimmo@hotmail.com
I am also using dx 8.1 but on win98 and not xp.

El Kimmo
El_Kimmo
El_Kimmo
I have tried almost anything but it still does the same thing. Setting hbrBackground to NULL in the WNDCLASSEX structure did not help a thing only that now when the video memory resets the screen goes white instead of black. I know that it is windows that is resetting the video memory but why?? The time the graphics stays on the screen if different from startup to startup. Sometimes it even do not do this evil thing, though I have not recompiled the sources. Is there a way to prevent windows from doing that stupid thing?

Please help me If someone have a idea then feel free to mail me.

El Kimmo
Dean Harding
Dean Harding
Are you do anything with the WM_ERASEBKGND message? if so, then don''t. if not, try catching it in your WndProc and just "return 0". I''m just quessing here

DirectDraw isn''t meant to only display one image and then not update - you''re meant to be redrawing the back buffer as fast as you possibly can.


codeka.com - Just click it.
Mirek Heikkila
Mirek Heikkila
okay, i''ll try figure out the problem... maybe someone else knows already... what are the commands to call.. a tripple buffer of like 800x480x32 and access the primary writing buffer.. sorry, its kinda of a loaded, easy to look up question but if done will ddraw work if you use its commands on the d3d buffer? i want to stick with ddraw for a lil while till i get the math down so i can use 3d appropriatly in a project rather then have 3d as just a neato effect.. thanks..

mmh
ya ya it''s me..

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.