[QUOTE=Yerst_;1241669]I changed my cameraView from (0,0,1) to (0,0,-1) and the triangle Coordinations to (0,0,-1).
And it worked!
Maybe i looked at the back of it?[/QUOTE]
Yes, probably so. Your original verts were oriented clockwise (CW) relative to your eyepoint, and by default, the “front face” is counter-clockwise (CCW). This is set by glFrontFace() and by default it’s GL_CCW. So yes, with your viewpoint and triangle Z changes, you’re now looking at the side that’s CCW oriented from the eyepoint, which is the front.
How can i apply CullFace?
Beyond setting which is the “front” side… You can disable back-face culling with glDisable( GL_CULL_FACE ). Or you can enable it and tune which faces are culled (front, back, or front and back) with glCullFace(), which by default is set to GL_BACK.
The next Problem is, that when i change the Z-Coorinates to (0,0,-2) for example, the Triangle isn’t anymore in the mid of my window. It gets smaller, but the left corner of the triangle is still in the left corner of my window.
That’s not a bug, that’s a feature. That’s how perspective projection works. The further back in your view frustum, the smaller it gets. If you don’t like it, you need to use another projection (such as orthographic, where this doesn’t happen), or you need to dynamically adjust your frustum as your objects move. Or you need to do whacky things with perspective like put the eyepoint really far from the object and make the frustum long and thin (essentially making it virtually an orthographic frustum).
See your prof for specific requirements here.