Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 24 Jul 2000
Offline Last Active May 08 2012 07:49 AM

#4734758 Trying to set VBO:s in C# using TAO / OpenGL TK framework

Posted by on 18 November 2010 - 10:10 AM

I haven't used glVertexPointer in a long time, but that looks odd

gl.glVertexPointer(3, GL.GL_FLOAT, 0, mVertexBuffer);

Shouldn't that be gl.glVertexPointer(3, GL.GL_FLOAT, 0, 0)

As far as I remember since you bind buffers the last parameter should be the start index inside the bound buffer. Since your are passing mVertexBuffer, the offset will be off by whatever number your buffer is.

The same thing applies to your glTexCoordPointer call and glDrawElements.