Direct3D for 2D alpha blitting

Started by
0 comments, last by MasterWorks 23 years, 10 months ago
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
Advertisement
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).
___________________________Freeware development:ruinedsoft.com

This topic is closed to new replies.

Advertisement