Implemented a different approach to vertex array object support to enable creation of a single global vertex array object as well as provide individual vertex array objects per Drawable when required.

This commit is contained in:
Robert Osfield
2016-07-23 15:02:08 +01:00
parent 4d8a29b987
commit 7d83d735ad
13 changed files with 1841 additions and 1481 deletions

View File

@@ -385,7 +385,7 @@ void SphereSegment::dirtyAllDrawableDisplayLists()
for(unsigned int i=0; i<getNumDrawables(); ++i)
{
osg::Drawable* drawable = getDrawable(i);
if (drawable) drawable->dirtyDisplayList();
if (drawable) drawable->dirtyGLObjects();
}
}
@@ -907,7 +907,7 @@ struct ActivateTransparencyOnType
ss->setAttributeAndModes(new osg::CullFace(osg::CullFace::BACK),osg::StateAttribute::ON);
ss->setMode(GL_BLEND,osg::StateAttribute::ON);
drawable->dirtyDisplayList();
drawable->dirtyGLObjects();
}
}
@@ -931,7 +931,7 @@ struct DeactivateTransparencyOnType
osg::StateSet* ss = drawable->getOrCreateStateSet();
if(ss) ss->setRenderingHint(osg::StateSet::OPAQUE_BIN);
drawable->dirtyDisplayList();
drawable->dirtyGLObjects();
}
}