I am having some trouble creating a texture with transparency from a masked image in memory.
Here's what I'm trying to do... my program generates an image in memory with certain parts having RGB values of 255,0,255 which I then set as masked. If I draw this to the screen as a normal image it will plot correctly with the 255,0,255 portions invisible.
Now I need to create a texture out of this image, maintaining transparency where the color is 255,0,255. I can't seem to get this to work.
I create the texture, set the buffer to texturebuffer() of my texture and DrawImage() the image to the texture. If I apply this texture to an object using the COLOR flag, it draws the texture showing the 255,0,255 color.. if I try to set the MASKED flag it draws the entire texture completely black.
I've tried setting different texture flags but nothing is working as I imagined (they either turn the texture completely black on the screen or completely invisible). I tried searching the forums and wasn't able to find any threads on this (if they exist I sure couldn't find them!).
Any help would be greatly appreciated :-)
-Steve
Here's what I'm trying to do... my program generates an image in memory with certain parts having RGB values of 255,0,255 which I then set as masked. If I draw this to the screen as a normal image it will plot correctly with the 255,0,255 portions invisible.
Now I need to create a texture out of this image, maintaining transparency where the color is 255,0,255. I can't seem to get this to work.
I create the texture, set the buffer to texturebuffer() of my texture and DrawImage() the image to the texture. If I apply this texture to an object using the COLOR flag, it draws the texture showing the 255,0,255 color.. if I try to set the MASKED flag it draws the entire texture completely black.
I've tried setting different texture flags but nothing is working as I imagined (they either turn the texture completely black on the screen or completely invisible). I tried searching the forums and wasn't able to find any threads on this (if they exist I sure couldn't find them!).
Any help would be greatly appreciated :-)
-Steve