Original Post
Hello,
Please have a look at this screen shot:
http://www.habipaydogdu.com/scr.gif
I want to make the arrow transparent(%50), but couldn''t do it. For testing, I quickly created a simple triangle(red one) and the blending worked on that. Here are my codes:
The Arrow
---------
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glColor4f( 1.0f, 1.0f, 1.0f, 0.5);
glPushMatrix();
glBegin(GL_QUADS);
// ... vertexes here
glEnd();
glBegin(GL_TRIANGLES);
// ... vertexes here
glEnd();
glPopMatrix();
glDisable(GL_BLEND);
*** Unfortunately, the arrow is apaque. I can''t see the behind. Here''s the code for the simple triangle:
The Triangle
------------
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glPushMatrix();
glColor4f( 1.0f, 0.0f, 0.0f, 0.5);
glBegin(GL_TRIANGLES);
// Vertexes here..
glEnd();
glDisable(GL_BLEND);
glPopMatrix();
*** As you see everything are same. Why the arrow is opaque but the triangle is transparent?