i am wondering how to use the different jit.gl.mesh inputs, it is quite vague to me what the inputs do exactly. I know i can use the matrixoutput of a jit.gl.gridshape for instance, but i want to have a better understanding of these inputs since i feel i should be able to use the object in a more advanced way. At the moment i experience crashes when experimenting with the inputs though ;)
Through input 1 you pass the xyz position of the vertices (in the form of a 3-plane float32 matrix, where plane 0 are x positions, plane a are y positions and plane 2 are z positions)
Through input 2 you pass texture coordinates for each vertex. This is only necessary when you want to map texture in a special way. Usually you will use 2D textures that need a 2-plane float32 matrix (x and y coords).
Through input 3 you pass normal information for each vertex, in the form of a 3-plane matrix. Normals are vectors used to make lighting calculations. More on normals here: http://en.wikipedia.org/wiki/Surface_normal
Through input 4 you pass color information: which color your vertex will be colored with. Later on , the fragment part of the GL pipeline will generate interpolation between vertices so that you can see smooth transitions.
Through input 5 you pass specular information, meaning the grade of specular component (how bright) is each vertex in relation to the light source.
Inputs 7 and 8 serve to input tangent and bitangent info, which as far as I know can also be used for lighting calculations
And index 9 is used to input the index array of the vertices…which I guess must serve to determine the orde in which the vertices are rendered and related to each other. But I’m not sure about this last one.