Moved the ArrayDispatchers management so that osg::State now has a ArrayDispatchers object that any osg::Geometry can reuse,
and optimized the implementation to reduce the CPU overhead.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <osg/Polytope>
|
||||
#include <osg/Viewport>
|
||||
#include <osg/GLBeginEndAdapter>
|
||||
#include <osg/ArrayDispatchers>
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@@ -1246,6 +1247,8 @@ class OSG_EXPORT State : public Referenced, public Observer
|
||||
/** get the GL adapter object used to map OpenGL 1.0 glBegin/glEnd usage to vertex arrays.*/
|
||||
inline GLBeginEndAdapter& getGLBeginEndAdapter() { return _glBeginEndAdapter; }
|
||||
|
||||
/** get the helper class for dispatching osg::Arrays as OpenGL attribute data.*/
|
||||
inline ArrayDispatchers& getArrayDispatchers() { return _arrayDispatchers; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1558,6 +1561,7 @@ class OSG_EXPORT State : public Referenced, public Observer
|
||||
osg::ref_ptr<DynamicObjectRenderingCompletedCallback> _completeDynamicObjectRenderingCallback;
|
||||
|
||||
GLBeginEndAdapter _glBeginEndAdapter;
|
||||
ArrayDispatchers _arrayDispatchers;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user