Draw calls and frame rate

Started by tao, March 05, 2014, 08:40:43 AM

Previous topic - Next topic

tao

Hi,

Is there a way to get the number of draw calls in each frame render? I want to improve the frame rate, and first I need to figure out "Am I drawing too many objects?".

Thanks

EgonOlsen

You could attach an implementation of the IRenderHook interface to each object and count the calls to beforeRendering().

tao

Thanks Egon, so each Object3D consumes one draw call? If I have 10 planes and they share the same texture will they 'batched' as one draw call, or still 10 draw calls?

EgonOlsen

It needs at least one draw call per object. There might be more if the object uses different textures for different parts.