[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] [OpenGL] Text, Transparency and Lists



Richard Jones wrote:
Using the GL_ONE version, I get the ghostly version in the screenshot.
Using GL_ONE_MINUS_SRC_ALPHA, I get a solid sprite all right, but with a
black rectangle around it.

I just noticed your texture loading has:

  tex_data = pygame.image.tostring(tex, "RGBX", 1 )

Why RGBX? You need the alpha channel...

Poof! Changing "RGBX" to "RGBA" immediately makes it work. Thanks!

This probably happened because that line is a distant descendant of some line that I copied from a tutorial long ago, without understanding that "X" wasn't Alpha.

Kris