Jump to content
  • Advertisement


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


right way, wrong way ? (sprites.vertex)

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

ok, this is what I''m trying to do. I want to display a sprite but only want PART of it transparent. I was going to load the bitmap, read in each pixel into an array - if I found the transparent color leave it out the array. During the render process I convert the array into Point Verts and draw primitives ..... Good or not? I could''nt find a way to get SPRITE to render part of a Texture transparent. thanks!! C

Share this post

Link to post
Share on other sites
This is actually extrememly easy to do! Look at the D3DXCreateTextureFromFileEx() function. It has a parameter called ColorKey, which indicates a transparent color in the texture. So all you have to do is tell it your transparent color, and it will take care of the rest for you - no manual pixel reading or anything.

Dustin Franklin
Mircrosoft DirectX MVP

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!