Renderer.info.render.triangles always on 0

threejs r131
renderer.info.render.triangles → I used this value to count rendered triangles in case I needed to warn an excessive poly count on the displayed model.

I believe as of r131 this value always returns 0.

I couldn’t find if this data is now somwhere else to be fetched from.

Is this a Bug? Is this info available in some other place?

Thanks in advance!

Never mind! I was doing 2 render calls and info.render.triangles was just showing the 2nd render info.

1 Like

BTW: You can set renderer.info.autoReset to false and then manually reset the metrics at the end of your frame via renderer.info.reset().

1 Like

Nice to know, thank you!

Hello, I am also facing the same issue, I am adding the glb to a scene.
Can you explain where to add renderer.info.reset();

You only have to use renderer.info.reset() if you have more than one call of WebGLRenderer.render() for producing a single frame.

If that is the case in your app, renderer.info.reset() needs to be called at the beginning of your animation loop.

Thanks,
But, I have added renderer.info.reset() into the animation loop(at the beginning), Still, it’s showing Triangle count to 0.

The please demonstrate your issue with a live example.