Opengl 2 -

glBegin(GL_TRIANGLES); glColor3f(1,0,0); glVertex3f(-1,-1,0); glColor3f(0,1,0); glVertex3f( 1,-1,0); glColor3f(0,0,1); glVertex3f( 0, 1,0); glEnd();

Anyone else still occasionally writing fixed-function OpenGL for fun? 😄 opengl 2

int main(int argc, char** argv) GLUT_DEPTH char** argv) GLUT_DEPTH #include &lt

#include <GL/glut.h> void display() GL_DEPTH_BUFFER_BIT); void display() GL_DEPTH_BUFFER_BIT)

Here’s a minimal working example in C (GLUT/FreeGLUT):

Diving back into OpenGL 2 – the fixed-function nostalgia