Basically, I just want to have my PNG's transparency enabled.
This is what I have set in an attempt to make it work:
SDL_SetAlpha(surface,0,0);
glEnable (GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
But this just makes the images overlap like this: (Where anything black is considered transparent)
The rectangle doesn't have any transparent parts in its original PNG, while the blue character has transparency around the sides.
I also tried:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
Which was suggested here: http://www.opengl.org/sdk/docs/man/xhtml/glBlendFunc.xml
But that just gives black in transparent areas:
Any help on getting them to be transparent without overlapping like in the top image would be appreciated, thanks!