Can I build a VBO with indexed normals in addition to indexed triangles?

This is our indexed triangle VBO code, is it possible to add indexed normals? How should I specify them?

gl.BindBufferARB(gl.ELEMENT_ARRAY_BUFFER_ARB, indexBuffer);
gl.BufferData(gl.ELEMENT_ARRAY_BUFFER_ARB, vboParams.indices.Length * sizeof(int), vboParams.indices, dynamic ? gl.STREAM_DRAW_ARB : gl.STATIC_DRAW_ARB);

gl.BindBufferARB(gl.ARRAY_BUFFER_ARB, vertexBuffer);

gl.BufferSubData(gl.ARRAY_BUFFER_ARB, 0, verticesSize, vboParams.vertices);
gl.BufferSubData(gl.ARRAY_BUFFER_ARB, verticesSize, normalsSize, vboParams.normals);



Yes, but the same indices are used to fetch all non-instanced vertex attributes (…if you continue to use the pipeline’s built-in vertex fetching).

For more on instanced vertex attribute fetching, see:

See the examples on that wiki page for how to provide multiple interleaved vertex attributes, including normals.

Thanks a lot, this is what I was missing!