Discussion:
[osg-users] Extra draw calls in osgText?
Glenn Waldron
2018-07-19 20:47:07 UTC
Permalink
Robert,

While doing some performance testing on the nifty new osgText code, I found
that for every text being drawn there are one or two extra glDrawElements
calls with a count of zero. I was able to eliminate them by checking for an
empty primitive set before this draw call:

https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgText/Text.cpp#L1151

It works, but I can't help wondering why the empty primitive sets exist in
the first place. So I figured I'd see if you knew :) I am using the tip of
the OSG 3.6.x branch.

Glenn Waldron / osgEarth
Robert Osfield
2018-07-20 07:20:56 UTC
Permalink
Hi Glenn,

This is a new one for me :-)

My guess is that the a GLyphquad has been inserted in into the
Text::_textureGlyphQuadMap but it's primitives member hasn't had
filled in with anything.

Do you know if this happens with any of the standard osgtext examples?

Cheers,
Robert.
Post by Glenn Waldron
Robert,
https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgText/Text.cpp#L1151
It works, but I can't help wondering why the empty primitive sets exist in the first place. So I figured I'd see if you knew :) I am using the tip of the OSG 3.6.x branch.
Glenn Waldron / osgEarth
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Loading...