If I use glColor4f( 0.5, 0.0, 0.5, 0.25 ); will I still need glBlendFunc(…); to create a transparent wall? I just want to create one section of wall in my project and not affect any others. Whats the best Constants to use inside glBlendFunc( )? This is what i’m trying to do:
glPushMatrix( );
glLoadIdentity( );
glColor4f( 0.5, 0.0, 0.5, 0.0 );
glBegin(GL_QUADS);
glNormal3f( 0.0, 1.0, 0.0 ); //top face
glVertex3f( -0.2, 0.5, -4.0 );
glVertex3f( -0.2, 0.5, -3.2 );
glVertex3f( 0, 0.5, -3.2 );
glVertex3f( 0, 0.5, -4.0 );
glNormal3f( -1.0, 0.0, 0.0 ); //left face
glVertex3f( -0.2, 0.5, -3.2 );
glVertex3f( -0.2, 0.5, -4.0 );
glVertex3f( -0.2, 0.1, -4.0 );
glVertex3f( -0.2, 0.1, -3.2 );
glNormal3f( 1.0, 0.0, 0.0 ); //right face
glVertex3f( 0.0, 0.5, -4.0 );
glVertex3f( 0.0, 0.5, -3.2 );
glVertex3f( 0.0, 0.1, -3.2 );
glVertex3f( 0.0, 0.1, -4.0 );
glEnd( );
glFlush( );
glPopMatrix( );