void renderNormal(){
  glEnable(GL_DEPTH_TEST);
  glUseProgram(this.normalProgram);
  glUniformMatrix4fv(viewMatrixUniform,false,viewMatrix.get(matrixBuffer));
  glUniformMatrix4fv(projMatrixUniform,false,projMatrix.get(matrixBuffer));
  glUniformMatrix3fv(normalMatrixUniform,false,normalMatrix.get(matrixBuffer));
  glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,fbo);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glBindBuffer(GL_ARRAY_BUFFER,this.cubeVbo);
  glEnableVertexAttribArray(0);
  glVertexAttribPointer(0,3,GL_FLOAT,false,0,0L);
  glEnableVertexAttribArray(1);
  glVertexAttribPointer(1,3,GL_FLOAT,false,0,normalsOffset);
  glDrawArrays(GL_TRIANGLES,0,numVertices);
  glDisableVertexAttribArray(0);
  glDisableVertexAttribArray(1);
  glBindBuffer(GL_ARRAY_BUFFER,0);
  glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,0);
  glUseProgram(0);
}

void renderNormal ( ) { glEnable ( GL_DEPTH_TEST ) ; glUseProgram ( this . normalProgram ) ; glUniformMatrix4fv ( viewMatrixUniform , false , viewMatrix . get ( matrixBuffer ) ) ; glUniformMatrix4fv ( projMatrixUniform , false , projMatrix . get ( matrixBuffer ) ) ; glUniformMatrix3fv ( normalMatrixUniform , false , normalMatrix . get ( matrixBuffer ) ) ; glBindFramebufferEXT ( GL_FRAMEBUFFER_EXT , fbo ) ; glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) ; glBindBuffer ( GL_ARRAY_BUFFER , this . cubeVbo ) ; glEnableVertexAttribArray ( 0 ) ; glVertexAttribPointer ( 0 , 3 , GL_FLOAT , false , 0 , 0L ) ; glEnableVertexAttribArray ( 1 ) ; glVertexAttribPointer ( 1 , 3 , GL_FLOAT , false , 0 , normalsOffset ) ; glDrawArrays ( GL_TRIANGLES , 0 , numVertices ) ; glDisableVertexAttribArray ( 0 ) ; glDisableVertexAttribArray ( 1 ) ; glBindBuffer ( GL_ARRAY_BUFFER , 0 ) ; glBindFramebufferEXT ( GL_FRAMEBUFFER_EXT , 0 ) ; glUseProgram ( 0 ) ; }
render the normals into a texture .
