Login  Register

Re: Using multiple models in a scene

Posted by gouessej on Jul 13, 2018; 12:30pm
URL: https://forum.jogamp.org/Using-multiple-models-in-a-scene-tp4038956p4039019.html

Ok, there's another solution that gmseed (another JOGL user) used some years ago. You can simply call glBufferData with GL_ELEMENT_ARRAY_BUFFER and your direct NIO buffer containing the indices and call glDrawElements with the indices count:
https://www.opengl.org/discussion_boards/showthread.php/176377-VBOs-and-glDrawElements%28%29-with-JOGL?p=1231350&viewfull=1#post1231350

This solution works, I remember that gmseed contributed to JogAmp's Ardor3D Continuation, I provided the very first blueprint of our STL importer.

If it still doesn't work, I'll look at my own source code again as I use indices elsewhere with VBOs.
Julien Gouesse | Personal blog | Website