Jump to content
  • Advertisement


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


Direct3D for 2D alpha blitting

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

Hello everyone, First let me apologize for posting this message twice -- it also appears in the ''general'' forum, but I realize it probably should have been posted here. So if you''ve already read and ignored my question, please exit now =) I''m a fairly experienced VB programmer, who has until know relied on the VBDX type libraries for DirectX programming. Now I''m working on a new project. (our first game, Flux, has gone commercial and is available at www.planetflux.com) VB specific responses are not required, as I''m sure the implentation I''m looking for is similar to the C++ version. I''m looking to do another 2D puzzle game but using D3D for alpha blended sprites. This appears to be fairly simple, just by using a DirectDraw surface with an alpha channel as a rectangular texture. There are several examples of how to do this. The problem I''m having is getting new information into the alpha channel. Specifically, I want to blit a grayscale surface (?) onto the alpha channel of ANOTHER surface. How can this be done? Please, no DDS! I want to use separate BMP/JPG files for the sprites and their alpha masks, because I need to assign different sprites new masks at run-time. Is this possible? How can I load into only the alpha channel of a 32-bit surface? PLEASE HELP!! Anything at all is appreciated! Best, Jay Wheeler President, MasterWorks Software www.planetflux.com

Share this post

Link to post
Share on other sites
Check the C++ source to the d3dx ultility library.

It has a function to load 32bit tga files with alpha I''ve heard.

There is also d3dxdrawsprite function which is probably what you''re looking for.

Check the gamedev articles for an article on 3d/2d tile engine (it''s in c++ though).

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!