Jump to content
  • Advertisement
Sign in to follow this  

Same post second time bcz of lack of help

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

This is a same question i'm posting once again.I thnk this is one of the simplest thing for experience game programmer,so pls give me satisfying ans. I want to achieve transparency with my sprite imgae which is having backgrnd color pink(255,0,255).I'm using directx9 and "D3DXLoadSurfaceFromFile" function to load my bitmap image.Should i do transparency in other function pls tell me abt tht function. Pls give me solution for this.

Share this post


Link to post
Share on other sites
Advertisement
it appears that you only have to set the color-key (to pink) and it should not draw the pink pixels when you draw the image/sprite

Share this post


Link to post
Share on other sites
Quote:
Original post by bhavinvs
This is the same question I'm posting once again. I think this is one of the simplest things for experienced game programmers, so please give me a satisfying answer.
I want to achieve transparency with my sprite image which is having background color pink(255,0,255).I'm using directx9 and "D3DXLoadSurfaceFromFile" function to load my bitmap image. Should I do transparency in another function please tell me about that function.
Please give me a solution for this.


Look up the ColorKey parameter of D3DXLoadSurfaceFromFile on MSDN.

Share this post


Link to post
Share on other sites
Quote:
Original post by ToohrVyk
Quote:
Original post by bhavinvs
This is the same question I'm posting once again. I think this is one of the simplest things for experienced game programmers, so please give me a satisfying answer.
I want to achieve transparency with my sprite image which is having background color pink(255,0,255).I'm using directx9 and "D3DXLoadSurfaceFromFile" function to load my bitmap image. Should I do transparency in another function please tell me about that function.
Please give me a solution for this.


Look up the ColorKey parameter of D3DXLoadSurfaceFromFile on MSDN.


thr are different formats like ARGB,BRGA,XRGB i'm getting confused with tht.should i use float value or 0 to 255.

Share this post


Link to post
Share on other sites
Quote:
ColorKey
[in] D3DCOLOR value to replace with transparent black, or 0 to disable the colorkey. This is always a 32-bit ARGB color, independent of the source image format. Alpha is significant and should usually be set to FF for opaque colorkeys. Thus, for opaque black, the value would be equal to 0xFF000000.


Provide a D3DCOLOR in ARGB format, such as 0xFFFF00FF.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!