Login  Register

In the helloTriangle example can you explain the VertexData and its values and why bytes?

Posted by ElvJOGL on Feb 13, 2016; 1:55am
URL: https://forum.jogamp.org/In-the-helloTriangle-example-can-you-explain-the-VertexData-and-its-values-and-why-bytes-tp4036213.html

Hi elect,

could you go over why you chose to write the vertexData that variable the way you did.

for instance, what's the relation between your vertexData variable and values to an NON-JOGL program getting the vertices from an array of vectors like:

vertexData[3][4] = {{-1, -1, 0, 1}, {1, -1, 0, 1}, {-1, 1, 0, 1}}

I chose vec4 in inquiry because I assume that your vertexData in jogl are homogeneous as well.

Can you elaborate?

Thanks