Batching DrawElements... Efficient?
In my renderer, I use DrawElements to render my vertices. How would I batch several DrawElements together to get the maximum speed?
Would that be efficient enough or should I call DrawElements for the vertices needed and not one DrawElements for all vertices?
Thanks!
naturally, you can only combine drawelements if both calls use the same renderstate setup. you''ll have to put vertex data for both calls into a single array, and render that. note that you can still render parts of the single array should the need arise.
nvidia has a few documents about application performance on their developer site. you should try to send at least 200 vertices per call, and sending a few thousand per call gives you optimal performance, if i remember correctly.
nvidia has a few documents about application performance on their developer site. you should try to send at least 200 vertices per call, and sending a few thousand per call gives you optimal performance, if i remember correctly.
Batch drawelements , i worked with along time ago.
It's good only if use one texture. in fact, drawelement can use one texture bind (unless multitexture) each call.
i tried one huge texture made with small textures. It turned out ok.
Maybe, learn the lock and unlock feature, too.
Right now, i use drawelements instead of glBegin(triangles);
Big perforamnce increase. but, this is for 3d models (like humans).
Bobby
[edited by - bgcjr on December 7, 2002 11:24:45 AM]
It's good only if use one texture. in fact, drawelement can use one texture bind (unless multitexture) each call.
i tried one huge texture made with small textures. It turned out ok.
Maybe, learn the lock and unlock feature, too.
Right now, i use drawelements instead of glBegin(triangles);
Big perforamnce increase. but, this is for 3d models (like humans).
Bobby
[edited by - bgcjr on December 7, 2002 11:24:45 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement