i need to call some opengl functions like below:
glBegin(GL_QUADS);
glColor4f(1, 1, 1, 0.3 *topAlpha); glTexCoord2f(0, 1); glVertex3f(-235, 166, 600);
glColor4f(1, 1, 1, 0.0); glTexCoord2f(0, 0.75); glVertex3f(-235, 266, 600);
glColor4f(1, 1, 1, 0.0); glTexCoord2f(1, 0.75); glVertex3f(235, 266, 600);
glColor4f(1, 1, 1, 0.3 *topAlpha); glTexCoord2f(1, 1); glVertex3f(235, 166, 600);
glEnd();
is there any way that can let me change the code to some opengl calls like below??
glColor4f(1, 1, 1, topAlpha);
glBegin(GL_QUADS);
glColor4f(1, 1, 1, 0.3); glTexCoord2f(0, 1); glVertex3f(-235, 166, 600);
glColor4f(1, 1, 1, 0.0); glTexCoord2f(0, 0.75); glVertex3f(-235, 266, 600);
glColor4f(1, 1, 1, 0.0); glTexCoord2f(1, 0.75); glVertex3f(235, 266, 600);
glColor4f(1, 1, 1, 0.3); glTexCoord2f(1, 1); glVertex3f(235, 166, 600);
glEnd();
it is just an opengl question… tks