glMatrixMode GL_PROJECTION
glLoadIdentity
glOrtho 0 1 0 1 -1 1
glMatrixMode GL_MODELVIEW
glLoadIdentity
glColor 0 0 1
glBegin GL_QUADS
glVertex2 0.4 0.2
glVertex2 0.9 0.2
glVertex2 0.9 0.8
glVertex2 0.4 0.8
glEnd
glColor 1 0 0
glBegin GL_TRIANGLES
glVertex3 0.2 0.2 -0.5
glVertex3 0.8 0.5 0.5
glVertex3 0.2 0.8 -0.5
glEnd
