Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualL. Spiro

Posted 10 December 2012 - 11:32 PM

that draw function isn't going to work well, because you are binding 4 VBOs in a row, which means that only the last one is bound before drawing
you are drawing tangents

That is not correct. The calls to glVertexPointer() and friends work on whatever vertex buffer was active at the time of the call. After the call he is free to bind a different vertex buffer and call, for example, glNormalPointer().

However his code will leave trash bound when other objects are drawn that don’t have all of the same attributes because they are never unbound.


ic0de, you need to call glActiveTexture() before binding textures to different slots (calling glBindTexture()).
Additionally you seem to have switched to shaders but I don’t see any shaders ever being set. This has to be done before setting uniforms etc.


L. Spiro

#1L. Spiro

Posted 10 December 2012 - 11:31 PM

that draw function isn't going to work well, because you are binding 4 VBOs in a row, which means that only the last one is bound before drawing
you are drawing tangents

That is not correct. The calls to glVertexPointer() and friends work on whatever vertex buffer was active at the time of the call. After the call he is free to bind a different vertex buffer and call, for example, glNormalPointer().

However his code will leave trash bound when other objects are drawn that don’t have all of the same attributes because they are never unbound.


ic0de, you need to call glActiveTexture() before binding textures to different slots (calling glBindTexture()).


L. Spiro

PARTNERS