Moved Drawable across to using osg::buffered_value.

Added new osg::State::setInterleavedArray() method.

Added new osg::Group::setNode(uint,Node*) method.

Cleaned up and fixed the osg::Texture's handling of dirtyTextureParamters().
This commit is contained in:
Robert Osfield
2002-11-19 10:56:59 +00:00
parent 42fb3c5987
commit 5fca8ea229
11 changed files with 68 additions and 82 deletions

View File

@@ -10,10 +10,7 @@
#include <osg/Types>
#include <osg/NodeVisitor>
#include <osg/Shape>
#include <vector>
#include <map>
#include <set>
#include <osg/buffered_value>
namespace osg {
@@ -381,18 +378,13 @@ class SG_EXPORT Drawable : public Object
bool _supportsDisplayList;
bool _useDisplayList;
typedef std::vector<uint> GLObjectList;
typedef osg::buffered_value<uint> GLObjectList;
mutable GLObjectList _globjList;
ref_ptr<AppCallback> _appCallback;
ref_ptr<DrawCallback> _drawCallback;
ref_ptr<CullCallback> _cullCallback;
// static cache of deleted display lists which can only
// by completely deleted once the appropriate OpenGL context
// is set.
typedef std::map<uint,std::set<uint> > DeletedDisplayListCache;
static DeletedDisplayListCache s_deletedDisplayListCache;
};
@@ -405,9 +397,6 @@ inline void Drawable::draw(State& state)
// current OpenGL context.
uint contextID = state.getContextID();
// fill in array if required.
while (_globjList.size()<=contextID) _globjList.push_back(0);
// get the globj for the current contextID.
uint& globj = _globjList[contextID];