From cc3d3c6d4c668d1a0031724bb3459d6e3c74bc12 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 13 Feb 2007 11:32:28 +0000 Subject: [PATCH] Added setDataVariance(DYNAMIC) to the scores text entires to prevent the DrawThreadPerContext for crashing due to double buffering of dynamic data. --- examples/osgcatch/osgcatch.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/osgcatch/osgcatch.cpp b/examples/osgcatch/osgcatch.cpp index 3574e3f1f..aa0f63cde 100644 --- a/examples/osgcatch/osgcatch.cpp +++ b/examples/osgcatch/osgcatch.cpp @@ -1153,6 +1153,7 @@ osg::Node* GameEventHandler::createScene() text->setColor(osg::Vec4(0.0f,0.2f,0.2f,1.0f)); text->setAlignment(osgText::Text::CENTER_CENTER); text->setAxisAlignment(osgText::Text::XZ_PLANE); + text->setDataVariance(osg::Object::DYNAMIC); geode->addDrawable(text); _scoreTextList.push_back(text); @@ -1293,6 +1294,7 @@ osg::Node* GameEventHandler::createScene() text->setPosition(textPosition); text->setCharacterSize(_width.length()*0.04f); text->setColor(osg::Vec4(0.0f,0.2f,0.2f,1.0f)); + text->setDataVariance(osg::Object::DYNAMIC); text->setAxisAlignment(osgText::Text::XZ_PLANE); osg::Geode* geode = new osg::Geode; @@ -1306,6 +1308,7 @@ osg::Node* GameEventHandler::createScene() _levelText->setPosition(textPosition); _levelText->setCharacterSize(_width.length()*0.04f); _levelText->setColor(osg::Vec4(0.0f,0.2f,0.2f,1.0f)); + _levelText->setDataVariance(osg::Object::DYNAMIC); _levelText->setAxisAlignment(osgText::Text::XZ_PLANE); geode->addDrawable(_levelText.get());