Archived

This topic is now archived and is closed to further replies.

so88ccer

DD Surface Manipulation

Recommended Posts

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

Share this post


Link to post
Share on other sites
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
E-Mail

Share this post


Link to post
Share on other sites