DirectX9 - Sprite Transparancy

Started by
6 comments, last by ktuluorion 20 years, 6 months ago
Greetings citizens! I have a question for you all. Does anyone know how to make an D3DXSprite have a transparancy key? Like make black see through? Thank you for your time and help in advance, citizens! Piebert Entertainment ------------------------------------------------------------ GDSFUBY GameDev Society For UnBanning YodaTheCoda If you want to see yoda unbanned then put this in your sig ------------------------------------------------------------ DAIAGA Dave Astle is a God Association. To join, put this in your sig!
[Piebert Entertainment] [Ask The All-Knowing Oracle A Question]------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig ------------------------------------------------------------DAIAGA Dave Astle is a God Association. To join, put this in your sig!Founder and High Priest of DAIAGA[edited by - YodaTheCoda on December 10, 2003 1:57:54 PM]
Advertisement
quote:Original post by ktuluorion
Greetings citizens!


Is this the french revolution?
I don''t know if it works like this in DX9, but in DX8 (the way I did it anyway) was in the Draw() function just set the last parameter (color) to D3DCOLOR_ARGB(255,255,255,255), and use the ColorKey in the D3DXCreateTextureFromFileEx() as the color (i.e D3DCOLOR_ARGB(0,255,0,255) is a great color to use as the color key). This should work (thats what did it for me). Hopefully this helps.
Thank you, children of the revolution. Your services shall be remembered.

Piebert Entertainment
------------------------------------------------------------
GDSFUBY GameDev Society For UnBanning YodaTheCoda
If you want to see yoda unbanned then put this in your sig
------------------------------------------------------------
DAIAGA Dave Astle is a God Association. To join, put this in your sig!
[Piebert Entertainment] [Ask The All-Knowing Oracle A Question]------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig ------------------------------------------------------------DAIAGA Dave Astle is a God Association. To join, put this in your sig!Founder and High Priest of DAIAGA[edited by - YodaTheCoda on December 10, 2003 1:57:54 PM]
Actually, it doesn''t appear to be that CreateTextureFromFile takes that parameter in 9. Anyone else have any idea ;(



Piebert Entertainment
------------------------------------------------------------
GDSFUBY GameDev Society For UnBanning YodaTheCoda
If you want to see yoda unbanned then put this in your sig
------------------------------------------------------------
DAIAGA Dave Astle is a God Association. To join, put this in your sig!
[Piebert Entertainment] [Ask The All-Knowing Oracle A Question]------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig ------------------------------------------------------------DAIAGA Dave Astle is a God Association. To join, put this in your sig!Founder and High Priest of DAIAGA[edited by - YodaTheCoda on December 10, 2003 1:57:54 PM]
Hi, check out ID3DXSprite::Begin()-method and the values that could be passed to it.
quote:Original post by ktuluorion
Actually, it doesn''t appear to be that CreateTextureFromFile takes that parameter in 9. Anyone else have any idea ;(



Piebert Entertainment
------------------------------------------------------------
GDSFUBY GameDev Society For UnBanning YodaTheCoda
If you want to see yoda unbanned then put this in your sig
------------------------------------------------------------
DAIAGA Dave Astle is a God Association. To join, put this in your sig!


Thats why Programmer16 said: CreateTextureFromFileEx.
And I agree with Miksan, the updated Sprite interface lets you use much simpler code.

--
You''re Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..
I use the alpha channel in the PNG file format to get my transparency... then you can even have different alpha levels for each pixel...
"I could be off endlessly perfecting my 3d engine, but instead I am cursed with the task of actually finishing something, it sucks."

This topic is closed to new replies.

Advertisement