//init function
glDepthMask(GL_FALSE);
glDisable(GL_DEPTH_TEST);
glDisable(GL_CULL_FACE);
glDisable(GL_DITHER);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
//render function
glEnable(GL_TEXTURE_2D);
glPushMatrix();
glTranslatef(-0.5, 0, 0);
glScalef(0.3, 0.3, 0);
glRotatef(angle, 0, 0, 1);
glCallList(dlist1);
glPopMatrix();
//blue ball
glPushMatrix();
glTranslatef(0.5, 0, 0);
glScalef(0.3, 0.3, 0);
glRotatef(angle, 0, 0, 1);
glEnable(GL_BLEND);
glCallList(dlist2);
glDisable(GL_BLEND);
glPopMatrix();
glDisable(GL_TEXTURE_2D);
Sprite is not fully transparent
Hi developers!
Well, I made some pictures in PNG format to make some parts of the sprites transparent. But I can't understand why it's not fully transparent (I still can see the "transparent" area). See the blue ball:
http://i33.tinypic.com/2ev6wjq.jpg
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement