DD Surface Manipulation
Lets say I declare 2 surfaces:
LPDIRECTDRAWSURFACE lpddsOne = NULL;
LPDIRECTDRAWSURFACE lpddsTwo = NULL;
I load a bitmap onto lpddsOne...
Now, I want lpddsTwo to be EXACTLY like lpddsOne. How can I do this? When i say "lpddsTwo = lpddsOne" it does not display the bitmap. Is there a special way to go about this?
Thanks, Brent
quote:Lets say I declare 2 surfaces:
LPDIRECTDRAWSURFACE lpddsOne = NULL;
LPDIRECTDRAWSURFACE lpddsTwo = NULL;
I load a bitmap onto lpddsOne...
Now, I want lpddsTwo to be EXACTLY like lpddsOne. How can I do this? When i say "lpddsTwo = lpddsOne" it does not display the bitmap. Is there a special way to go about this?
Thanks, Brent
if you load a bitmap onto lpddsOne and then set lpddsTwo = lpddsOne, you have just made lpddsTwo point to the same memory address that lpddsOne points to. I am thinking this is n''t what you intended to do. If I am guessing right that you want a "copy" of the surface, you would need to create lpddsTwo as another surface the same size as lpddsOne and then blit the contents of lpddsOne to lpddsTwo. Or you could always load the bitmap once onto each surface.
Hope that helped.
Evillive2
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement