Do you want to know the maximum extents on your screen in pixels?
If so, the easiest way is to call gluProject for all your vertices and keep the maximum and minimum x and y positions.
It might look like this:
GLdouble modelview[16], projection[16] GLint viewport[4]; glGetDoublev(GL_MODELVIEW_MATRIX, *modelView); glGetDoublev(GL_PROJECTION_MATRIX, *projection); glGetIntegerv(GL_VIEWPORT, *viewport); double tx, ty, tz; for(i = 0; i < VertexCount; i++) { glProject(vertices[i].x, vertices[i].y, vertices[i].z, modelview, projection, viewport, *tx, *ty, *tz);
source share