PDA

View Full Version : viewvolume size at runtime



mithun_daa
11-14-2003, 12:40 PM
is there any way i can know what values the viewvolume has been set to when im running my program.

dvm
11-15-2003, 09:35 AM
I'm not sure if it's easy but you can get the current projection matrix using e.g.



GLdouble projMatrix[16];

glGetDoublev(GL_PROJECTION_MATRIX, projMatrix);

Of course now you have to get the values of the viewing volume from the matrix which I have no idea how to do that. Maybe you should also take a look at gluUnProject. Sorry but I cannot help more.