Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


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 Gorg 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.