Refactored the GL object deletion management to use new osg::GraphicsObjectManager/GLObjectManager base classes, and osg::ContextData container.
This approach unifies much of the code handling the clean up of OpenGL graphics data, avoids lots of local mutexes and static variables that were previously required, and enables the clean up scheme to be easily extended by users providing their own GraphicsObjectManager subclasses. git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15130 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -202,26 +202,9 @@ class OSG_EXPORT FragmentProgram : public StateAttribute
|
||||
/** Get list of Matrices */
|
||||
inline const MatrixList& getMatrices() const { return _matrixList; }
|
||||
|
||||
|
||||
/** Force a recompile on next apply() of associated OpenGL vertex program objects.*/
|
||||
void dirtyFragmentProgramObject();
|
||||
|
||||
/** use deleteFragmentProgramObject instead of glDeletePrograms to allow
|
||||
* OpenGL Fragment Program objects to be cached until they can be deleted
|
||||
* by the OpenGL context in which they were created, specified
|
||||
* by contextID.*/
|
||||
static void deleteFragmentProgramObject(unsigned int contextID,GLuint handle);
|
||||
|
||||
/** flush all the cached fragment programs which need to be deleted
|
||||
* in the OpenGL context related to contextID.*/
|
||||
static void flushDeletedFragmentProgramObjects(unsigned int contextID,double currentTime, double& availableTime);
|
||||
|
||||
/** discard all the cached fragment programs which need to be deleted
|
||||
* in the OpenGL context related to contextID.
|
||||
* Note, unlike flush no OpenGL calls are made, instead the handles are all removed.
|
||||
* this call is useful for when an OpenGL context has been destroyed. */
|
||||
static void discardDeletedFragmentProgramObjects(unsigned int contextID);
|
||||
|
||||
virtual void apply(State& state) const;
|
||||
|
||||
virtual void compileGLObjects(State& state) const { apply(state); }
|
||||
|
||||
Reference in New Issue
Block a user