Login  Register

Re: what's wrong with this code?

Posted by gouessej on Oct 30, 2018; 6:36pm
URL: https://forum.jogamp.org/what-s-wrong-with-this-code-tp4039269p4039278.html

Passing indirect NIO buffers to JOGL is a very bad idea as it will have to convert them to direct ones anyway.

I don't see any call to glVertexAttribPointer and glEnableVertexAttribArray :s

You have to call glBindbuffer, glVertexAttribPointer and glEnableVertexAttribArray in this order exactly like in the example. Maybe this would help you:
https://stackoverflow.com/a/17150414

When you don't create a VAO, JOGL does it for you and your VBOs are bound to this implicitly created VAO.
Julien Gouesse | Personal blog | Website