View Single Post
 
Old 07-16-2009, 10:34 AM
NFITC1 NFITC1 is offline
Centurion
 
Join Date: Apr 2006
Posts: 102
Default Strange error with TextureLoader

I'm new to DirectX programming so I'm probably missing something with this. I'm trying to tell my device that certain colors of textures are transparent. I've been trying to use the textureloader.fromstream() procedure to insert textures into the device so I can specify a colorkey. I understand that that's one way to show what color should be transparent. Problem is, the colors of the textures aren't transparent. I've tried following the example from codeproject, but it's not working at the moment.
Here's how it is currently:
Code:
PTexture(y) = TextureLoader.FromStream(device, _
					newstream, _
					0, _
					0, _
					0, _
					Usage.None, _
					Format.Unknown, _
					Pool.Default, _
					Filter.None, _
					Filter.None, _ 
					transparentcolor.toargb
newstream is an IO.Stream created from data in bitmap format. When the stream is created, transparentcolor is assigned and the width and height are also recorded. The texture gets mapped to a PositionTextured vertex, but the transparent color is still there. What am I missing?

Last edited by NFITC1; 07-16-2009 at 10:50 AM. Reason: Changed problem
Reply With Quote