Ejemplo n.º 1
0
 /**
  * We want to draw the scene using a display list to make it fast when using the IDENT style
  * (i.e., avoid recomputing all the face colours)
  *
  * @param drawable
  * @param style
  */
 private void draw(GLAutoDrawable drawable, DrawStyle style) {
   GL gl = drawable.getGL();
   if (listID != -1) {
     gl.glCallList(listID);
   } else {
     listID = gl.glGenLists(1);
     gl.glNewList(listID, GL.GL_COMPILE_AND_EXECUTE);
     scene.draw(drawable, style);
     gl.glEndList();
   }
 }