Jump to content
  • Advertisement

Archived

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

so88ccer

DD Surface Manipulation

This topic is 5376 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!