Any recommendations for instance rendering?

This topic contains 1 reply, has 2 voices, and was last updated by  Xmas 8 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #29755

    crushforth
    Member

    Hi,

    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.

    Cheers

    -Craig
    crushforth2009-04-02 16:41:09

    #32900

    Xmas
    Member

    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

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.