Quote
As for seeing only a black screen, its ?Vc? VV?rid of the box as its two far away. What is your code for the reshape method. You should have something like:
glu.gluPerspective(40.0f, (width/height), 1.0, 200.0);
where 200 is the culling distance. Your code worked OK for me :).
glu.gluPerspective(40.0f, (width/height), 1.0, 200.0);
where 200 is the culling distance. Your code worked OK for me :).
My reshape method had been empty (and I hadn't been reshaping the window). I tried yours, and I tried reshaping - still black.
...Oh! I found Angel's reshape method, here it is:
public void reshape(GLDrawable drawable, int x, int y, int width, int height) {
gl.glViewPort(0, 0, width, height);
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
gl.glOrtho(-4.0f, 4.0f, -4.0f, 4.0f, -4.0f, 4.0f);
}
PROBLEM: glViewPort doesn't seem to exist in jogl. Or where is it?


