Paste: vertex buffer object

Author: tyepmore
Mode: factor
Date: Tue, 17 Aug 2010 20:47:26
Plain Text |
  
  gl.EnableClientState(gl.VERTEX_ARRAY); 
  gl.EnableClientState(gl.NORMAL_ARRAY);

    gl.BindBuffer(gl.ARRAY_BUFFER, gfx.square_vbo);
    gl.VertexPointerRaw(3, gl.DOUBLE, 0, 0);

    gl.BindBuffer(gl.ARRAY_BUFFER, gfx.square_nbo);
    gl.NormalPointerRaw(gl.DOUBLE, 0, 0);

    gl.DrawArrays(gl.QUADS, 0, gfx.square_size);

    gl.BindBuffer(gl.ARRAY_BUFFER, 0);


  gl.DisableClientState(gl.NORMAL_ARRAY);
  gl.DisableClientState(gl.VERTEX_ARRAY);

New Annotation

Summary:
Author:
Mode:
Body: