Forums > Jitter

OB3D Efficiency Question

Mar 24 2012 | 12:53 am

Currently programming some javascript dealing with large arrays of As all my objects are the same, is it more efficient to use to draw multiple copies of one object, or store an array of objects?

Mar 24 2012 | 5:06 am

There are many ways to do this. The most efficient way is to setup OpenGL state to match that of the object you want to draw, draw a bunch of geometry and pop the OpenGL state you setup. One way to do this is to use the object to control shading and coloring and draw your object with the drawraw method. You can do this in JS, however there is an example in the helpfile. It should be pretty easy to translate to JS. When you open the helpfile, load the basic.draw.lua script.

Viewing 2 posts - 1 through 2 (of 2 total)

Forums > Jitter