Merged the decoration vertices with the same vertex arrays used for text glyphs

This commit is contained in:
Robert Osfield
2017-03-01 16:43:05 +00:00
parent f4966a96d4
commit f233005988
5 changed files with 54 additions and 61 deletions

View File

@@ -1094,7 +1094,7 @@ void Text::drawImplementation(osg::State& state, const osg::Vec4& colorMultiplie
if ((_drawMode&(~TEXT))!=0)
{
if (_decorationVertices.valid() && !_decorationVertices->empty())
if (!_decorationPrimitives.empty())
{
state.disableNormalPointer();
@@ -1102,7 +1102,8 @@ void Text::drawImplementation(osg::State& state, const osg::Vec4& colorMultiplie
osg::State::ApplyTextureModeProxy applyTextureMode(state, 0, GL_TEXTURE_2D, false);
state.disableAllVertexArrays();
state.setVertexPointer(_decorationVertices.get());
state.setVertexPointer(_coords.get());
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) && !defined(OSG_GL3_AVAILABLE)
switch(_backdropImplementation)