views:

25

answers:

0

I have some 3d models I am loading into an OpenGL ES scene. If I simply load all of them I'll get them placed one over the other since they' ve been all centered into the coordinate system origin when created in Blender.

I need to position them in different places so what I am doing right now is this for each model:

    glMatrixMode( GL_MODELVIEW);
    
    for (3DModel *mdobj in models) {
        
        glPushMatrix();
        
        glTranslatef(...); //translating

        [mdobj setupForRenderGL];
        [mdobj renderGL];   //methods for drawing the model
        [mdobj cleanupAfterRenderGL];

        glPopMatrix();
    }

and I'm doing it each time I redraw the scene. Wouldn't be more efficient to multiply the translation transformation for the values of each model vertexes once and for all? PS. pardon me but I am still a newbie with OpenGL