09-29-2009, 08:01 PM
i have a 3D model of marble. i need to display 72 marbles at the same time. how can i load the model without repeating load it for every single one?
09-29-2009, 08:43 PM
So you load the model, and there is some series of commands that draw the model (vertex arrays, vbos, old-style glBegin/End). When you draw the marble at a particular position, you do something like the following:
You can repeat this process with a different x,y,z and the marble will get drawn in a different position in addition to the original one. Basically, you are telling OpenGL to draw something, then you draw something else (which is really the same thing) with a different position/rotation/etc.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.