`renderer.info` vertices



I have a BufferGeometry with X vertices indexed by Y triangles. renderer.info shows Y triangles and Y / 3 vertices. Is this true, is everything just simply rendered with triangle soups?


No, indexed geometries are rendered via gl.drawElements. The vertices property of renderer.info shows in this case the amount of processed indices.


Isn’t it redundant? If it logs A and B and B = A/3, there may be no need to log it?

What am i missing, how is this number relevant?


Um, the problem is that renderer.info.vertices should always reflect the vertex count of a geometry. But in the case of an indexed geometry, it’s the amount of processed indices. So yeah, right now the information in renderer.info are somewhat redundant.

IMO, there are two options to make things more consistent:

  • Remove vertices
  • Ensure, indexed geometries write their vertex count to vertices


I vote for B. And noting it somewhere. I stumbled upon this and gave up half way after a few “no it doesnt work” “yes it does” :smiley:


I’ve actually changed my mind, maybe for now removing vertices might make more sense. It doesn’t look trivial to add the actual vertex count, while this number is misleading.


Yeah, i’ve looked into the code too and we need a considerable amount of refactoring to implement a “non-hacky” solution :sweat_smile:


Well, aparently it’s even more complicated, and the whole discussion melted my mind. I think im going to log the counts that im interested in, manually, and pretend that renderer.info never existed :laughing: