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:
@@ -205,25 +205,6 @@ class OSG_EXPORT VertexProgram : public StateAttribute
|
||||
/** Force a recompile on next apply() of associated OpenGL vertex program objects. */
|
||||
void dirtyVertexProgramObject();
|
||||
|
||||
/** Use deleteVertexProgramObject instead of glDeletePrograms to allow
|
||||
* OpenGL Vertex Program objects to cached until they can be deleted
|
||||
* by the OpenGL context in which they were created, specified
|
||||
* by contextID.
|
||||
*/
|
||||
static void deleteVertexProgramObject(unsigned int contextID,GLuint handle);
|
||||
|
||||
/** Flush all the cached vertex programs which need to be deleted
|
||||
* in the OpenGL context related to contextID.
|
||||
*/
|
||||
static void flushDeletedVertexProgramObjects(unsigned int contextID,double currentTime, double& availableTime);
|
||||
|
||||
/** discard all the cached vertex 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 discardDeletedVertexProgramObjects(unsigned int contextID);
|
||||
|
||||
virtual void apply(State& state) const;
|
||||
|
||||
virtual void compileGLObjects(State& state) const { apply(state); }
|
||||
|
||||
Reference in New Issue
Block a user