Archived

This topic is now archived and is closed to further replies.

alpha

This topic is 6118 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I want to make a texture with a alpha channel, be used in my app. Below is my code: glBlendFunc(GL_SRC_ALPHA,GL_ONE); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glPushMatrix(); glTranslatef(-1,-1,0); glBegin(GL_QUADS); // glColor3f(0,0,1); glVertex3f(0,0,.1); // glVertex3f(0,2,.1); // glVertex3f(2,2,.1); // glVertex3f(2,0,.1); glEnd(); //glDisable(GL_BLEND); glBindTexture(GL_TEXTURE_2D, texturest); glBegin(GL_QUADS); // //glColor4f(1,1,1,1); glTexCoord2f(0,0); glVertex3f(0,0,0); // glTexCoord2f(0,1); glVertex3f(0,2,0); // glTexCoord2f(1,1); glVertex3f(2,2,0); // glTexCoord2f(1,0); glVertex3f(2,0,0); glEnd(); glFlush(); glPopMatrix(); It''s not doing it right though. It''s not taking into account the texture alpha values. What should I do? www.laeuchli.com/jesse/

Share this post


Link to post
Share on other sites