Jump to content
  • Advertisement


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


Transparency: Another way?

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

Im using DX8 to do a 2D engine. Ive used some of the tutorials at http://www15.brinkster.com/furby100/index.htm but use Draw to (umm) draw the textures instead of using vertex''s and all that stuff. Ive gotten everythign working, except for transparancy, or rather the color that the program doesnt draw. Usually it''s magenta or something. In the tutorials the author does this by using the 1-bit alpha channel. He wrote a program that will automatically do this. I''d rather not have to do this. In my old engine (DX 6) was able to code in to always ignore the color (255,0,255). Im wondering if there is an easier way to do this here, similiar to how I did it before. Thanks for any help Ratman --------------- Ratfest.org

Share this post

Link to post
Share on other sites
You should be able to do that by using a color key (see below)

HRESULT D3DXCreateTextureFromFileExA(
LPCSTR pSrcFile,
UINT Width,
UINT Height,
UINT MipLevels,
DWORD Usage,
DWORD Filter,
DWORD MipFilter,
D3DCOLOR ColorKey, <<<<<<<<<<<<<<<<<<<<

Set the ColorKey to the value you want and that should work. Good luck.

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!