Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Just a box in OpenGL - Processing 2.0.3 (resolved)

$
0
0
gluPerspective() sets the projection matrix, not the modelview. The following code should work:
  1. gl2.glMatrixMode(GL2.GL_PROJECTION);  
  2. gl2.glLoadIdentity();  
  3. glu.gluPerspective(45.0, width/height, .1, 1000.0 );
  4.   
  5. gl2.glMatrixMode(GL2.GL_MODELVIEW);
  6. gl2.glLoadIdentity();
  7. glu.gluLookAt(6, 6, 6,
  8.                      0, 0, 0, 
  9.                      0, 0, 1);


Viewing all articles
Browse latest Browse all 1768

Trending Articles