Two DxDraw surfaces - grrrr!

Started by
3 comments, last by czar 22 years, 2 months ago
Hello, I am trying to do the following. I have two DxDraw componets on my screen. (delphiX) DxDraw1 and Dxdraw2. Dxdraw1 is initialized and set to fullscreen mode. Then I try to initialise the second dxdraw, now I get an error "Primary surface cannot be made" I need the second dxdraw to show my avi movie on using sxmedia. If I initialize dxdraw2 first, I don''t get an error but nothing is rendered to dxdraw2. This problem only occurs in fullscreen mode and not when I run itin a window. Can anyone help on this one?
Advertisement
Just an amateurs thought.

When you set the cooperative level the first DDraw object gets full control, right? How can you instanciate another after that (two graphic cards?)?

Why make it simple when you can make it sooo nice and complicated?
Why make it simple when you can make it sooo nice and complicated?
I got my problem solved. Couldn't get two dxdraws going so I now moved the sxmovie rendering to the main dxdraw.surface. Only hassle was to get the flipping to work properly, that too is now solved.

Edited by - czar on February 19, 2002 5:03:51 AM
Do you know how to play the avi (with sxMedia) simultan to the rest of the application?

My problem is that I move some Sprites around and didn''t find a way to draw the avi from my DXTimerTimer procedure... insted I let the sxMedia flip the DXDrawSurface but in this case the sxMedia uses its own TimerInterval t flip the screen...

Is there something like szMedi.DrawCurrentFrame???
Unfortunatly I didn''t found anything like this...
My experience with sxmovie shows the following.
The movie works best if you set doflip to true, however then your drawing in the dxtimer with the dxdraw.flip; becomes a problem. If you have a moview continually going then you could move your drawing stuff into the sxmoview.beforerender method. My hack was different, I let the dxdraw.flip go when there wasn''t a moview shown and when the movie was playing I let the sxmovie do the doflip. Its a bit of hack but it worked for me in the situation that needed to use it.

This topic is closed to new replies.

Advertisement