diff --git a/examples/osgdeferred/osgdeferred.cpp b/examples/osgdeferred/osgdeferred.cpp index 4ace27341..2343c438e 100644 --- a/examples/osgdeferred/osgdeferred.cpp +++ b/examples/osgdeferred/osgdeferred.cpp @@ -129,7 +129,7 @@ Pipeline createPipelinePlainOSG( pass2->attach(osg::Camera::COLOR_BUFFER1, p.pass2Normals); pass2->attach(osg::Camera::COLOR_BUFFER2, p.pass2Colors); pass2->addChild(scene.get()); - osg::StateSet *ss = setShaderProgram(pass2, "shaders/pass2.vert", "shaders/pass2.frag"); + osg::ref_ptr ss = setShaderProgram(pass2, "shaders/pass2.vert", "shaders/pass2.frag"); ss->setTextureAttributeAndModes(0, createTexture("Images/whitemetal_diffuse.jpg")); ss->setTextureAttributeAndModes(1, createTexture("Images/whitemetal_normal.jpg")); ss->addUniform(new osg::Uniform("diffMap", 0)); @@ -284,7 +284,7 @@ void setAnimationPath(osg::ref_ptr node, osg::AnimationPath::ControlPoint(pos, rot)); } // Assign it. - node->setUpdateCallback(new osg::AnimationPathCallback(path)); + node->setUpdateCallback(new osg::AnimationPathCallback(path.get())); } osg::ref_ptr setShaderProgram(osg::ref_ptr pass, @@ -314,7 +314,7 @@ int main() osg::ref_ptr shadowMap = new osgShadow::SoftShadowMap; shadowMap->setJitteringScale(16); shadowMap->addShader(osgDB::readShaderFile("shaders/pass1Shadow.frag")); - shadowMap->setLight(light); + shadowMap->setLight(light.get()); osg::ref_ptr shadowedScene = new osgShadow::ShadowedScene; shadowedScene->setShadowTechnique(shadowMap.get()); shadowedScene->addChild(scene.get()); diff --git a/src/osg/OcclusionQueryNode.cpp b/src/osg/OcclusionQueryNode.cpp index 7cd653c15..71c3e4cf7 100644 --- a/src/osg/OcclusionQueryNode.cpp +++ b/src/osg/OcclusionQueryNode.cpp @@ -332,7 +332,7 @@ QueryGeometry::drawImplementation( osg::RenderInfo& renderInfo ) const OSG_FATAL << "osgOQ: QG: Invalid RQCB." << std::endl; return; } - rqcb->add( tr ); + rqcb->add( tr.get() ); OSG_DEBUG << "osgOQ: QG: Querying for: " << _oqnName << std::endl;