Skip to main content

All Questions

Filter by
Sorted by
Tagged with
23 votes
2 answers
23k views

Difference in glDrawArrays and glDrawElements

While refreshing my mind on OpenGL ES, I came across glDrawArrays and glDrawElements. I understand how they are used and sort ...
Unheilig's user avatar
  • 525
0 votes
1 answer
449 views

Heightmap vertex list to vertex + index list

Right now I'm trying to load a heightmap into my LWJGL application. I load it like that into a float[][] array and I can read the height value at a given x and z position in the map: ...
kessler bebe's user avatar
0 votes
1 answer
530 views

Loading Wavefront Data into VAO and Render It

I have successfully loaded a triangulated Wavefront (.obj) into 6 vectors, the first 3 vectors contain the locations for vertices, UV coords, and normals. The last three have the indices stored for ...
Jordan LaPrise's user avatar
2 votes
1 answer
2k views

how can I specify interleaved vertex attributes and vertex indices

I'm writing a generic ShaderProgram class that compiles a set of Shader objects, passes args to the shader (like vertex position, vertex normal, tex coords etc), then links the shader components into ...
user avatar