Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualill

Posted 09 March 2013 - 12:16 PM

I got it working on GL ES 2 with VBOs, so it's definitely possible.

 

I'm not really seeing anything wrong with the CPU side code.  I guess make double sure all offsets, strides, and sizes are correct.  Make sure inside the shader the float bone indices are cast to int.

 

I'm not 100% sure since I didn't look at the generating code too carefully, but I'd recommend using interleaved VBOs where each vertex in the VBO is like (position, normal, texCoord, boneWeights, boneIndices) rather than having a block that's (position, position, position, ... texCoord, texCoord, texCoord... etc...) since this should improve cache locality when accessing VBO data in the shader.

 

And it looks like you were doing something with ELEMENT_ARRAY_BUFFER but not calling glDrawRangeElements.  Maybe you have some index buffer object but aren't using it and are instead drawing "garbage" by just drawing the straight VBO as is.  


#1ill

Posted 09 March 2013 - 12:15 PM

I got it working on GL ES 2 with VBOs, so it's definitely possible.

 

I'm not really seeing anything wrong with the CPU side code.  I guess make double sure all offsets, strides, and sizes are correct.  Make sure inside the shader the float bone indices are cast to int.

 

I'm not 100% sure since I didn't look at the generating code too carefully, but I'd recommend using interleaved VBOs where each vertex in the VBO is like (position, normal, texCoord, boneWeights, boneIndices) rather than having a block that's (position, position, position, ... texCoord, texCoord, texCoord... etc...) since this should improve cache locality when accessing VBO data in the shader.

 

And it looks like you were doing something with ELEMENT_ARRAY_BUFFER but not calling glDrawRangeElements.  Maybe you have some index buffer object but aren't using it and are instead drawing "grabage" by just drawing the straight VBO as is.  


PARTNERS