private void createSceneVao(){
  int vao=glGenVertexArrays();
  int vbo=glGenBuffers();
  glBindVertexArray(vao);
  glBindBuffer(GL_ARRAY_BUFFER,vbo);
  ByteBuffer bb=BufferUtils.createByteBuffer(boxes.length * 4 * (3 + 3)* 6* 6);
  FloatBuffer fv=bb.asFloatBuffer();
  for (int i=0; i < boxes.length; i+=2) {
    DemoUtils.triangulateBox(boxes[i],boxes[i + 1],fv);
  }
  glBufferData(GL_ARRAY_BUFFER,bb,GL_STATIC_DRAW);
  glEnableVertexAttribArray(0);
  glVertexAttribPointer(0,3,GL_FLOAT,false,4 * (3 + 3),0L);
  glEnableVertexAttribArray(1);
  glVertexAttribPointer(1,3,GL_FLOAT,false,4 * (3 + 3),4 * 3);
  glBindBuffer(GL_ARRAY_BUFFER,0);
  glBindVertexArray(0);
  this.vaoScene=vao;
}

private void createSceneVao ( ) { int vao = glGenVertexArrays ( ) ; int vbo = glGenBuffers ( ) ; glBindVertexArray ( vao ) ; glBindBuffer ( GL_ARRAY_BUFFER , vbo ) ; ByteBuffer bb = BufferUtils . createByteBuffer ( boxes . length * 4 * ( 3 + 3 ) * 6 * 6 ) ; FloatBuffer fv = bb . asFloatBuffer ( ) ; for ( int i = 0 ; i < boxes . length ; i += 2 ) { DemoUtils . triangulateBox ( boxes [ i ] , boxes [ i + 1 ] , fv ) ; } glBufferData ( GL_ARRAY_BUFFER , bb , GL_STATIC_DRAW ) ; glEnableVertexAttribArray ( 0 ) ; glVertexAttribPointer ( 0 , 3 , GL_FLOAT , false , 4 * ( 3 + 3 ) , 0L ) ; glEnableVertexAttribArray ( 1 ) ; glVertexAttribPointer ( 1 , 3 , GL_FLOAT , false , 4 * ( 3 + 3 ) , 4 * 3 ) ; glBindBuffer ( GL_ARRAY_BUFFER , 0 ) ; glBindVertexArray ( 0 ) ; this . vaoScene = vao ; }
creates a vao for the scene .
