Added shells for DOFTransform and PositionAttitudeTransform to the .osg
loader, still need to fill in the saving and loading of paramters. Went through the distribution remove old API usage.
This commit is contained in:
@@ -65,7 +65,7 @@ osg::Node* decorate_with_clip_node(osg::Node* subgraph)
|
||||
//osg::Material* material = new osg::Material;
|
||||
osg::PolygonMode* polymode = new osg::PolygonMode;
|
||||
polymode->setMode(osg::PolygonMode::FRONT_AND_BACK,osg::PolygonMode::LINE);
|
||||
stateset->setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE_ON);
|
||||
stateset->setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
|
||||
|
||||
osg::Group* wireframe_subgraph = osgNew osg::Group;
|
||||
wireframe_subgraph->setStateSet(stateset);
|
||||
|
||||
@@ -315,7 +315,7 @@ int main( int argc, char **argv )
|
||||
|
||||
osg::StateSet* dstate = new osg::StateSet;
|
||||
dstate->setRenderBinDetails(4,"RenderBin");
|
||||
dstate->setMode(GL_CULL_FACE,osg::StateAttribute::OVERRIDE_OFF);
|
||||
dstate->setMode(GL_CULL_FACE,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
|
||||
dstate->setAttributeAndModes(stencil,osg::StateAttribute::ON);
|
||||
dstate->setAttributeAndModes(clipplane,osg::StateAttribute::ON);
|
||||
|
||||
|
||||
@@ -114,11 +114,11 @@ int main( int argc, char **argv )
|
||||
polyoffset->setUnits(-1.0f);
|
||||
osg::PolygonMode* polymode = new osg::PolygonMode;
|
||||
polymode->setMode(osg::PolygonMode::FRONT_AND_BACK,osg::PolygonMode::LINE);
|
||||
stateset->setAttributeAndModes(material,osg::StateAttribute::OVERRIDE_ON);
|
||||
stateset->setAttributeAndModes(polyoffset,osg::StateAttribute::OVERRIDE_ON);
|
||||
stateset->setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE_ON);
|
||||
stateset->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE_OFF);
|
||||
stateset->setTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OVERRIDE_OFF);
|
||||
stateset->setAttributeAndModes(material,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
|
||||
stateset->setAttributeAndModes(polyoffset,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
|
||||
stateset->setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
|
||||
stateset->setMode(GL_LIGHTING,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
|
||||
stateset->setTextureMode(0,GL_TEXTURE_2D,osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
|
||||
|
||||
// osg::LineStipple* linestipple = new osg::LineStipple;
|
||||
// linestipple->setFactor(1);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <osg/Group>
|
||||
#include <osg/Sequence>
|
||||
#include <osg/Transform>
|
||||
#include <osg/MatrixTransform>
|
||||
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
@@ -173,7 +173,7 @@ int main( int argc, char **argv )
|
||||
osg::Matrix matrix;
|
||||
matrix.makeTranslate(x, 0.0, 0.0);
|
||||
|
||||
osg::Transform* xform = osgNew osg::Transform;
|
||||
osg::MatrixTransform* xform = osgNew osg::MatrixTransform;
|
||||
xform->setMatrix(matrix);
|
||||
xform->addChild(seqNode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user