Inbuilt polygon clipping in OpenGL
问题 Can someone help me in understanding why below code is showing triangle in front of the Quad? For gluLookAt(10, 10, 60, 0, 0, 0, 0, 1, 0) and glOrtho(-30, 30, -30, 30, 0, 90) ? Expected Output: Because the 'z' value of the triangle is less than the quad and observer is at 60 unit in the +ive 'z' axis. Thus, the rectangle should had been visible as a whole and only a few parts of the triangle would had been visible. glBegin(GL_QUADS); glColor3f(1, 1, 1); glVertex3f(10, 10, 15); glVertex3f(20,