4 Pluspunkte 0 Minuspunkte
Wie kann ich ein Objekt als Wireframe rendern mit OpenGL?
von  

1 Antwort

3 Pluspunkte 0 Minuspunkte

Mit

glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );

aktivierst du den Wireframe Modus in OpenGL.

// wireframe mode an
glPolygonMode(GL_FRONT, GL_LINE);
glPolygonMode(GL_BACK, GL_LINE);

DrawCube();

// wireframe mode aus
glPolygonMode(GL_FRONT, GL_FILL);
glPolygonMode(GL_BACK, GL_FILL);

von (532 Punkte)