diff --git a/VisualStudio/OpenSceneGraph.dsw b/VisualStudio/OpenSceneGraph.dsw index b11367b07..6d8f020a9 100644 --- a/VisualStudio/OpenSceneGraph.dsw +++ b/VisualStudio/OpenSceneGraph.dsw @@ -3997,6 +3997,15 @@ Package=<4> Begin Project Dependency Project_Dep_Name Core osgIntrospection End Project Dependency + Begin Project Dependency + Project_Dep_Name Core osgGA + End Project Dependency + Begin Project Dependency + Project_Dep_Name Core osgText + End Project Dependency + Begin Project Dependency + Project_Dep_Name Core osgUtil + End Project Dependency }}} ############################################################################### diff --git a/examples/osgshadow/osgshadow.cpp b/examples/osgshadow/osgshadow.cpp index 7c2e69af9..0a54ac5b4 100644 --- a/examples/osgshadow/osgshadow.cpp +++ b/examples/osgshadow/osgshadow.cpp @@ -490,6 +490,7 @@ public: new_rs->setDrawBuffer(orig_rs->getDrawBuffer()); new_rs->setReadBuffer(orig_rs->getReadBuffer()); new_rs->setColorMask(orig_rs->getColorMask()); + new_rs->setPositionalStateContainer(orig_rs->getPositionalStateContainer()); if (shadowVolumeBin.valid()) diff --git a/genwrapper.conf b/genwrapper.conf index 0cfeecff6..af02175c4 100644 --- a/genwrapper.conf +++ b/genwrapper.conf @@ -38,7 +38,7 @@ configure library "osgText" end configure library "osgViewer" - dependency unix "-losgUtil -losgDB -losgGA" + dependency unix "-losgUtil -losgDB -losgGA -losgText" end ############################################################################# diff --git a/src/osgWrappers/osg/State.cpp b/src/osgWrappers/osg/State.cpp index 35804671b..520b5fda8 100644 --- a/src/osgWrappers/osg/State.cpp +++ b/src/osgWrappers/osg/State.cpp @@ -29,6 +29,8 @@ #undef OUT #endif +TYPE_NAME_ALIAS(std::vector< const osg::StateSet * >, osg::State::StateSetStack); + BEGIN_ENUM_REFLECTOR(osg::State::CheckForGLErrors) I_EnumLabel(osg::State::NEVER_CHECK_GL_ERRORS); I_EnumLabel(osg::State::ONCE_PER_FRAME); @@ -72,6 +74,18 @@ BEGIN_OBJECT_REFLECTOR(osg::State) __void__popAllStateSets, "pop all statesets off state stack, ensuring it is empty ready for the next frame. ", "Note, to return OpenGL to default state, one should do any state.popAllStatSets(); state.apply(). "); + I_Method0(unsigned int, getStateSetStackSize, + __unsigned_int__getStateSetStackSize, + "Get the number of StateSet's on the StateSet stack. ", + ""); + I_Method1(void, popStateSetStackToSize, IN, unsigned int, size, + __void__popStateSetStackToSize__unsigned_int, + "Pop StateSet's for the StateSet stack till its size equals the specified size. ", + ""); + I_Method0(osg::State::StateSetStack &, getStateSetStack, + __StateSetStack_R1__getStateSetStack, + "Get the StateSet stack. ", + ""); I_Method1(void, captureCurrentState, IN, osg::StateSet &, stateset, __void__captureCurrentState__StateSet_R1, "Copy the modes and attributes which capture the current state. ", @@ -504,8 +518,16 @@ BEGIN_OBJECT_REFLECTOR(osg::State) I_SimpleProperty(const osg::Matrix &, ProjectionMatrix, __C5_osg_Matrix_R1__getProjectionMatrix, 0); + I_SimpleProperty(osg::State::StateSetStack &, StateSetStack, + __StateSetStack_R1__getStateSetStack, + 0); + I_SimpleProperty(unsigned int, StateSetStackSize, + __unsigned_int__getStateSetStackSize, + 0); I_SimpleProperty(osg::Polytope, ViewFrustum, __Polytope__getViewFrustum, 0); END_REFLECTOR +STD_VECTOR_REFLECTOR(std::vector< const osg::StateSet * >); + diff --git a/src/osgWrappers/osgUtil/PositionalStateContainer.cpp b/src/osgWrappers/osgUtil/PositionalStateContainer.cpp index 377ee537b..e07b9660c 100644 --- a/src/osgWrappers/osgUtil/PositionalStateContainer.cpp +++ b/src/osgWrappers/osgUtil/PositionalStateContainer.cpp @@ -61,10 +61,18 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::PositionalStateContainer) __void__reset, "", ""); + I_Method0(osgUtil::PositionalStateContainer::AttrMatrixList &, getAttrMatrixList, + __AttrMatrixList_R1__getAttrMatrixList, + "", + ""); I_Method2(void, addPositionedAttribute, IN, osg::RefMatrix *, matrix, IN, const osg::StateAttribute *, attr, __void__addPositionedAttribute__osg_RefMatrix_P1__C5_osg_StateAttribute_P1, "", ""); + I_Method0(osgUtil::PositionalStateContainer::TexUnitAttrMatrixListMap &, getTexUnitAttrMatrixListMap, + __TexUnitAttrMatrixListMap_R1__getTexUnitAttrMatrixListMap, + "", + ""); I_Method3(void, addPositionedTextureAttribute, IN, unsigned int, textureUnit, IN, osg::RefMatrix *, matrix, IN, const osg::StateAttribute *, attr, __void__addPositionedTextureAttribute__unsigned_int__osg_RefMatrix_P1__C5_osg_StateAttribute_P1, "", @@ -73,6 +81,12 @@ BEGIN_OBJECT_REFLECTOR(osgUtil::PositionalStateContainer) __void__draw__osg_State_R1__RenderLeaf_P1R1__C5_osg_Matrix_P1, "", ""); + I_SimpleProperty(osgUtil::PositionalStateContainer::AttrMatrixList &, AttrMatrixList, + __AttrMatrixList_R1__getAttrMatrixList, + 0); + I_SimpleProperty(osgUtil::PositionalStateContainer::TexUnitAttrMatrixListMap &, TexUnitAttrMatrixListMap, + __TexUnitAttrMatrixListMap_R1__getTexUnitAttrMatrixListMap, + 0); I_PublicMemberProperty(osgUtil::PositionalStateContainer::AttrMatrixList, _attrList); I_PublicMemberProperty(osgUtil::PositionalStateContainer::TexUnitAttrMatrixListMap, _texAttrListMap); END_REFLECTOR diff --git a/src/osgWrappers/osgViewer/GNUmakefile b/src/osgWrappers/osgViewer/GNUmakefile index f81f47717..f805d4e49 100644 --- a/src/osgWrappers/osgViewer/GNUmakefile +++ b/src/osgWrappers/osgViewer/GNUmakefile @@ -10,7 +10,7 @@ CXXFILES =\ View.cpp\ Viewer.cpp\ -LIBS += -losgViewer -losg -losgIntrospection -losgUtil -losgDB -losgGA $(GL_LIBS) $(OTHER_LIBS) +LIBS += -losgViewer -losg -losgIntrospection -losgUtil -losgDB -losgGA -losgText $(GL_LIBS) $(OTHER_LIBS) OPTF = -O