Re: Jogl code typical structure
Posted by
gouessej on
Jan 08, 2015; 2:02pm
URL: https://forum.jogamp.org/Jogl-code-typical-structure-tp4033822p4033823.html
Hi
Do you use a 3D engine based on JOGL?
Use the static draw mode for the VBOs that you rarely or never modify. Don't put the colors into your VBOs, use the mesh instancing, use the instance id in the shader to pick a different color per object. Then, use the same interleaved VBO for all identical objects, bind it only once per frame and draw it many times per frame instead of creating as much VBOs as objects or huge VBOs.
JOGL is a Java binding for the OpenGL/OpenGL-ES API. It contains some helpers but it doesn't do everything for you, you have to understand OpenGL. Have you looked at our wiki and at jogl-demos on GitHub?