diff --git a/include/osgDB/ReaderWriter b/include/osgDB/ReaderWriter index 6535ed237..ed6d719a9 100644 --- a/include/osgDB/ReaderWriter +++ b/include/osgDB/ReaderWriter @@ -18,6 +18,9 @@ #include #include +#include + + #include namespace osgDB { diff --git a/include/osgText/Paragraph b/include/osgText/Paragraph index fbbfd06c2..a45f96ee8 100644 --- a/include/osgText/Paragraph +++ b/include/osgText/Paragraph @@ -30,7 +30,7 @@ class OSGTEXT_EXPORT Paragraph : public osg::Geode Paragraph(const Paragraph& paragraph,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); Paragraph(const osg::Vec3& position,const std::string& text,osgText::Font* font); - META_Node(osgText,Paragraph) + META_Node(osgText,Paragraph); void setFont(osgText::Font* font); diff --git a/include/osgUtil/CullVisitor b/include/osgUtil/CullVisitor index 27b227824..8f8addedd 100644 --- a/include/osgUtil/CullVisitor +++ b/include/osgUtil/CullVisitor @@ -244,6 +244,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor, public osg::CullStac osg::ref_ptr _rootRenderStage; RenderBin* _currentRenderBin; + osg::ref_ptr _localPreRenderState; ComputeNearFarMode _computeNearFar; float _computed_znear; diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 1ac7bdcd7..d198b935d 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -510,7 +510,7 @@ void Geometry::drawImplementation(State& state) const if (_normalBinding==BIND_OFF) glNormal3f(0.0f,0.0f,1.0f); #endif -#if ISE_DEFAULT_COLOUR +#if USE_DEFAULT_COLOUR if (_colorBinding==BIND_OFF) glColor4f(1.0f,1.0f,1.0f,1.0f); #endif diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index ffc946f06..ce7039c84 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -802,9 +802,9 @@ ImpostorSprite* CullVisitor::createImpostorSprite(Impostor& node) // into account the new camera orientation. pushModelViewMatrix(rotate_matrix); - ref_ptr dummyState = new StateSet; + if (!_localPreRenderState) _localPreRenderState = new StateSet; - pushStateSet(dummyState.get()); + pushStateSet(_localPreRenderState.get()); { @@ -888,7 +888,7 @@ ImpostorSprite* CullVisitor::createImpostorSprite(Impostor& node) new_viewport->setViewport(center_x-new_s/2,center_y-new_t/2,new_s,new_t); rtts->setViewport(new_viewport); - dummyState->setAttribute(new_viewport); + _localPreRenderState->setAttribute(new_viewport); // create the impostor sprite. ImpostorSprite* impostorSprite =