Re: Solution found, Problem with creating more VBO Buffers
Posted by elect on Mar 01, 2017; 8:52am
URL: https://forum.jogamp.org/Problem-with-creating-more-VBO-Buffers-tp4037689p4037699.html
Hi Adi,
a couple of hints:
- prefer Animator to FPSAnimator
- prefer IntBuffer s to int arrays
- in glBufferData vertexBuffer.capacity()<<2 doesn't look right, do vertexBuffer.capacity() * Float.BYTES for floatBuffers
- there is no global/local for vbo and vao names, but I think what you mean it's context related, in that case some else may answer that
- if you call glBufferData on an existing vbo name, it's fine, the driver will clean the allocated memory and will allocate a new one. But if you call glGenBuffers, you should delete your previous names with glDeleteBuffers