Login  Register

How do you create a VAO object in JOGL (java) to use with shaders

Posted by ElvJOGL on Feb 11, 2016; 6:52am
URL: https://forum.jogamp.org/How-do-you-create-a-VAO-object-in-JOGL-java-to-use-with-shaders-tp4036166.html

Hi,

since I am using a textbook that is written in C and/or C++, I cannot visualize how the create this lines:

glGenVertexArrays(1, &vao);
glBindVertexArray(vao);

So where does the vao come from.

I found an Example online showing how to create the VAO in JOGL: http://stackoverflow.com/questions/17450373/jogl-simple-example-with-shaders-vao-and-index-array

But my question is, in JOGL, is VAOs as in the example shader program in the link above, is always dimension 1

like so: private int[] VAOs = new int[1];

So is there different representation of VAOs depending on the type of shader that will use it?

Can someone elaborate on this please?