Hi there,
First of all I should say that I’m pretty new to OpenGL and JOGL, so the problems I’m experiencing are probably familiar to anyone who’s not a novice.
I’ve been struggiling with getting accurate perspectives with diminuation of size. Basically, If I try to move an object in the negative z direction (just for the sake of an example) , rather than getting smaller, it will maintain it’s dimensions until it leaves the clipping volume, at which point it gradually gets clipped. I would appreciate some basic instruction on the matter. The following lines of code are a simplified version of what I had thought would fix the problem…
this is in display():
gl.glClear(GL.GL_COLOR_BUFFER_BIT|GL.GL_DEPTH_BUFFER_BIT);
gl.glMatrixMode(gl.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluPerspective(15.0f, 1.6f, -1.0, 10.0);
gl.glMatrixMode(gl.GL_MODELVIEW);
gl.glLoadIdentity();
gl.translate(some coordinates);
glut.glutWireSphere(glu, 0.5d, 12, 8 );
Do I need to do anything else in order to activate an accurate rendition of perspective? Is there anything I might not be doing that I should be doing? Any help would be greatly appreciated.
Thanks
Sam