I got a fairly large model that need to be displayed in a QT UI program that uses QGLViewer. So the model got cut because of the default near and far clipping distance is too narrow. My question is how to change the default near and far clipping range.
For example my problem could look like this one
I tried to use something like,
::glMatrixMode(GL_PROJECTION) ;
::glLoadIdentity() ;
::glClearColor(1.0f,1.0f,1.0f,0.0f);
::glFrustum(-0.5,0.5,-0.5,0.5,-100000000.0,100000000.0) ;
::glMatrixMode(GL_MODELVIEW) ;
::glLoadIdentity() ;
This doesn't work at all, and it breaks the mouse interaction in the QGLViewer too. Since I'm using QT and QGLViewer, there's no glu functions that I can use.
So I'm asking for anyone knows how to make the QGLViewer change its default clipping range.
I found some examples QGLViewer provided like clipping plane example, standard camera example, but I still don't have a clue how to change the default viewer.