- April 2, 2009 at 4:40 pm #29755
Does anyone have recommendations on the most efficient way to render multiple instances of the same model with different transforms.
My current implementation is using VBO’s and Pushing and popping matrices and although Its quite quick I’m getting slightly less that 60fps with around 100 fairly simple objects (50 polys each).
My target device is the iphone and I was wondering if I should try transforming all the vertices on the CPU and send a them in one draw call as one fairly large vertex buffer (not a VBO).
Basically if anyone has any ideas on how to get the most out of the GPU for instance rendering then it’d be much appreciated.
P.S. I know you guys don’t officially support the iphone but you may know of a technique that will allow me to minimise the GL state changesmatrix operations.
crushforth 2009-04-02 16:41:09April 6, 2009 at 2:25 pm #32900
It is possible that the draw call overhead is higher than the cost of doing a few transformations on the CPU with a low number of vertices. It all depends on the number and type of vertices, the transformation required (and possible optimizations), and of course the target platform. I’d recommend to simply try it.
Make sure you keep the transformation as compact as possible, i.e. for a non-projective 3D transformation use a 3×3 matrix for rotation and scaling and add a vec3 for translation. The projection transformation can still be performed by the hardware