Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

ColorKey not working with D3DXCreateTextureFromResourceEx

HickoryHickory Member Posts: 56
[NOTE: Reposted from 3D Graphics Forum to this Forum. Should have been posted here in the first place, sorry.]

I have a DirectX 9 project in which I've a texture I've loaded using D3DXCreateTextureFromResourceEx like so:

[code]
D3DXCreateTextureFromResourceEx(
pDevice,
hInst,
ResourceName,
D3DX_DEFAULT,
D3DX_DEFAULT,
D3DX_DEFAULT,
0,
DisplayMode,
D3DPOOL_DEFAULT,
D3DX_FILTER_NONE,
D3DX_FILTER_BOX,
TransparentCol, //is set to my 0xFFFF0000 which is the color i use for transparency
NULL,
NULL,
&pTexture);
[/code]

But when the texture is billboarded, I see solid black in the places that were once red, and should be transparent. So DX is obviously setting my colour to transparent black, but I'm not sure what I've set up wrong. Which States need to enabled/setup to allow transparency, or which States might I have enabled that would block it from happening? Maybe It's even something else I'm forgetting?

Any thoughts would be appreciated. Thanks.
Sign In or Register to comment.