• Advertisement
Sign in to follow this  

[C++][DirectX9] Texture not showing right - dimmed

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

SOLVED: I figured it out , I re-read the documentation for the functions again and I saw my problem : I was passing the same colorvalue to the ID3DXSprite::Draw function as I was passing to the CreateTextureFromFileEx function , this caused the image to blend with weird colors whereas I only wanted to adjust the opacity (alpha) value before drawing the sprite , the following fixed it :

pvColorKey = pvTexture->GetColorKey();
pvAlpha = (pvOpacity * 255) / 100;

pvColorKey.r = 255;
pvColorKey.g = 255;
pvColorKey.b = 255;
pvColorKey.a = pvAlpha;
Thanks Fixed image. [Edited by - someoneelsescode on August 10, 2006 9:30:42 AM]

Share this post

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

  • Advertisement