Hi,
In DirectX, we have TextureStageStates which is very easy to understand the whole blend processes. In opengl, suppose I have a rect. It has 4 vertices (from Nehe lesson 8) as below. It is easy to get the color of four vertices. My questions are
- how does OpenGL calculate the colors for pixels within the rect?
- if I enalbe blend, for one face, how many blend stages will OpenGL have? Does it have 2 phases
phase 1: background + vertices
phase 2: phase 1 + texture ? - If I enable blend, will all 6 faces be drawn with transparency or just those face viewers?
thanks,
tSb
glColor4f(1.0f, 1.0f, 1.0f, 0.5);
glBegin(GL_QUADS);
// Front Face
glNormal3f( 0.0f, 0.0f, 1.0f);
glTexCoord2f(0.0f, 0.0f);
glVertex3f(-1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 0.0f);
glVertex3f( 1.0f, -1.0f, 1.0f);
glTexCoord2f(1.0f, 1.0f);
glVertex3f( 1.0f, 1.0f, 1.0f);
glTexCoord2f(0.0f, 1.0f);
glVertex3f(-1.0f, 1.0f, 1.0f);