Jump to content
  • Advertisement
Sign in to follow this  
someoneelsescode

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

This topic is 4359 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
Advertisement
Sign in to follow this  

  • 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!