🔒 Locked
Directdraw problem..
Advertisement
Original Post
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.
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.
codeka.com - Just click it.
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
mmh
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
Please help me
El Kimmo
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.
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.
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
mmh
Look at the way I initialize DirectDraw with multiple buffers in my DirectDraw wrapper. I guess that could help...
Best regards,
--DK
--H. Hernán Moraldo
http://www.hhm.com.ar/
Sign up to the HHM''s developers'' newsletter.
Best regards,
--DK
--H. Hernán Moraldo
http://www.hhm.com.ar/
Sign up to the HHM''s developers'' newsletter.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement