--not an important question--
is updating uniforms quite slow?
*this example animates a field of grass thus each 'mesh' contains only a few vertices, but theres thousands of meshes.
currently im doing the vertex deformation calculations myself
now im thinking this is something a vertexshader would be ideal at so i do something likeCode :for ( int i=0; i<10000; i++ ) [ .. glVertex3fv( vert0 + vertice_offset.. ) .. ]
but its a lot(~3x) slower, from testing it seems to be the glUniform3fvARB(..) function that is causing the slowdown.Code :int loc = glGetUniformLocationARB( the_shader, "friemel_origin" ); for ( int i=0; i<10000; i++ ) [ ..... glUniform3fvARB( loc, 1, origin ); .... .... glVertex3fv( vert0 ) .. ]
is updating a uniform really so slow?
ie u dont want to update them if the object contains only a few vertices (though its a different story though if an object contains thousands of vertices)