[SDL] png transparency in testgl.c from sdl package

John Magnotti john.magnotti at gmail.com
Mon Dec 13 12:21:28 PST 2010


Just a quick thought--GL_DECAL means to replace the primitive color
with the texture color, which may mean it also disables blending. I
use GL_MODULATE exclusively (then just set color to 1.0, 1.0, 1.0 when
I want to display the texture as-is).

Hope the helps,

John

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);

becomes

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

On Mon, Dec 13, 2010 at 2:09 PM, image28 <image28 at slingshot.co.nz> wrote:
> Tried gDEBugger. The texture viewer loaded the textures correctly with alpha
> values, other than that I havent worked out how to use it properly yet,
> setup some watches for the state of GL_BLEND which it said it was disabled
> while the program was running, which is probaly correct because it would
> only be enabled for a split second to perform the drawing.
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>



More information about the SDL mailing list