• Advertisement

Archived

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

right way, wrong way ? (sprites.vertex)

This topic is 5061 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
Advertisement
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