diff --git a/src/osg/Drawable.cpp b/src/osg/Drawable.cpp index 84f8b6859..fcd9bd048 100644 --- a/src/osg/Drawable.cpp +++ b/src/osg/Drawable.cpp @@ -331,7 +331,7 @@ void Drawable::releaseGLObjects(State* state) const } } - VertexArrayState* vas = contextID <_vertexArrayStateList.size() ? _vertexArrayStateList[contextID] : 0; + VertexArrayState* vas = contextID <_vertexArrayStateList.size() ? _vertexArrayStateList[contextID].get() : 0; if (vas) { vas->release(); diff --git a/src/osg/Shape.cpp b/src/osg/Shape.cpp index aa2e4038d..89dd852b0 100644 --- a/src/osg/Shape.cpp +++ b/src/osg/Shape.cpp @@ -1214,7 +1214,7 @@ Geometry* osg::convertShapeToGeometry(const Shape& shape, const TessellationHint if (numColors>0) { ref_ptr colors = new Vec4Array(colorBinding); - geometry->setColorArray(colors); + geometry->setColorArray(colors.get()); for(unsigned int i=0; iisVAOSupported; - const DisplaySettings* ds = getDisplaySettings() ? getDisplaySettings() : osg::DisplaySettings::instance(); + const DisplaySettings* ds = getDisplaySettings() ? getDisplaySettings() : osg::DisplaySettings::instance().get(); _forceVertexArrayObject = _isVertexArrayObjectSupported && (ds->getVertexBufferHint()==DisplaySettings::VERTEX_ARRAY_OBJECT); _forceVertexBufferObject = _forceVertexArrayObject || (_isVertexBufferObjectSupported && (ds->getVertexBufferHint()==DisplaySettings::VERTEX_BUFFER_OBJECT)); diff --git a/src/osgSim/ImpostorSprite.cpp b/src/osgSim/ImpostorSprite.cpp index 0eca21e87..21373e78d 100644 --- a/src/osgSim/ImpostorSprite.cpp +++ b/src/osgSim/ImpostorSprite.cpp @@ -78,7 +78,7 @@ void ImpostorSprite::init() colors->push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)); setVertexArray(_coords.get()); - setColorArray(colors); + setColorArray(colors.get()); setTexCoordArray(0, _texcoords.get()); addPrimitiveSet(new osg::DrawArrays(GL_QUADS, 0, 4));