Updates to the GLUT and Producer text demo.
Fix to text to better handle unsetting of vertex arrays.
This commit is contained in:
@@ -129,6 +129,7 @@ void Font::addGlyph(unsigned int width, unsigned int height, unsigned int charco
|
||||
glyphTexture->setStateSet(stateset);
|
||||
stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
|
||||
stateset->setTextureAttributeAndModes(0,glyphTexture,osg::StateAttribute::ON);
|
||||
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
|
||||
|
||||
if (!glyphTexture->getSpaceForGlyph(glyph,posX,posY))
|
||||
{
|
||||
|
||||
@@ -434,6 +434,8 @@ void Text::drawImplementation(osg::State& state) const
|
||||
{
|
||||
|
||||
bool first = false;
|
||||
|
||||
state.disableAllVertexArrays();
|
||||
|
||||
for(TextureGlyphQuadMap::const_iterator titr=_textureGlyphQuadMap.begin();
|
||||
titr!=_textureGlyphQuadMap.end();
|
||||
|
||||
Reference in New Issue
Block a user