i have 170 objects to draw, each is build from 312 vertexes. I have one object and i am drawing it 170 times with diffrent martixes, i have figured out that i dont need to call some functions if i draw them one by one so i call them only at the begining, this gives me about 5fps, i am using non indexed triangles with drawArrays.
if(!started)
{
glUseProgram( __programObject );
glEnableVertexAttribArray(attPosition);
glVertexAttribPointer(attPosition, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), vVertices);//3*sizeof(float)
glEnableVertexAttribArray(attNormals);
glVertexAttribPointer(attNormals, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), vNormals);//3*sizeof(float)
}
Is there any way to make it faster under es 2.0 ? i am getting about 23fps on sgx 540, lowering vertex detail to 36 per object does not increase frame rate, there are about 10fps in matrix calculations(scale, multiply, translate, transponse, invert) but they are made on cpu and i dont think that moving them into shaders is good idea. I know that most time is consumed on passing uniforms each time. I know that there is a way to instantiate objects and pass uniforms and draw it in one call but i cant find any tutorial describing it, do you know where i can find it?
gl_ext_draw_instanced
andgl_ext_instanced_arrays
are not available on the SGX540, only on the SGX543, 544, 554 (what's known as the 5XT series as distinct from the 5 series). – Engineer