View Full Version : Cloning

Rick T
12-21-2011, 09:44 AM
The reusability of vertex data, cloning if you will, is what I am after.

Given: Vertex Data with positions and normals of one 3d object ( cube)
How do I render in 1 frame:
many cubes, in different positions, and perhaps in different colors.

Or think of Chess...
I have the vertex data for a pawn & I want to place 12 of them across a chess board.

Rick Tschudin

12-21-2011, 10:41 AM
Put your positions and normals into a VBO.
Set your modelview matrix for the first instance. Draw.
Set your modelview matrix for the second instance. Draw.
Repeat as needed.