Re: Using multiple models in a scene
Posted by ted_gress on Jun 25, 2018; 1:09am
URL: https://forum.jogamp.org/Using-multiple-models-in-a-scene-tp4038956p4038962.html
How do I go about calling bindbuffers?
I have two sets of buffers, one for one model one for the other as you saw in my code.
So do I call bind buffers on all four before I do drawelements or just one of them?
For the first call to drawELements:
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[i]);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[I+1]);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[I + 2]);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[I+3]);
For the second call to drawElements:
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[ii+4]);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[I+5]);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[I+6]);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboNames[i]+7);
?