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
#include <GL/glut.h> void display() GL_DEPTH_BUFFER_BIT); void display() GL_DEPTH_BUFFER_BIT)
glutSwapBuffers();
For those who didn't start there, OpenGL 2 introduced the shader model (1.10/1.20) and still fully supported the fixed-function pipeline. But in practice, most people associate "OpenGL 2" with immediate mode ( glBegin/glEnd ), glVertex , glMatrixMode , and lighting via glLight . For those who didn't start there