Jump to content
  • Advertisement

Archived

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

Metus

Loading bitmap -> IDirectDrawSurface7

This topic is 5414 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

I''m the test phase of my simple 2d game and before i travel farther down the ladder to hell i need to know if everything is working as i want i to. what i want is the easiest way to load a bitmap (a regular window .bmp) into a IDirectDrawSurface7 surface...

Share this post


Link to post
Share on other sites
Advertisement
In the DirectX SDK look in the file ddutil.h and ddutil.cpp

thats how i figured out how to load a bitmap into a DIRECTDRAWSURFACE7 object

I would post my code, but is part of a class object and I dont think it would help much in that context.

Share this post


Link to post
Share on other sites
It''s unbelieveably easy. with ddutil.

LPDIRECTDRAWSURFACE7 img1 = DDLoadBitmap(DD_Device_Name, "pic.bmp", 0, 0);

Actually I''m not sure what the last two params are used for (prototype shows them as X and Y coords), I just set them to 0.

There''s a good article here on gamedev about it.

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!