Computergrafik
OpenGL Primitive Beispiel
← GL Primitive | ● | GL Attribute →
Beispiel für ein Dreieck, dessen Geometrie in globalen Weltkoordinaten gegeben ist:
glBegin(GL_TRIANGLES);
glVertex3d(0.0,0.0,-10.0);
glVertex3d(-1.0,1.0,-10.0);
glVertex3d(1.0,1.0,-10.0);
glEnd();
glVertex3d(0.0,0.0,-10.0);
glVertex3d(-1.0,1.0,-10.0);
glVertex3d(1.0,1.0,-10.0);
glEnd();
← GL Primitive | ● | GL Attribute →