Improved handling of clean up of osg::Program/osg::Shader on closing of a graphis context.

This commit is contained in:
Robert Osfield
2006-01-16 17:05:17 +00:00
parent 0c9ab51e09
commit 93a2c3d011
5 changed files with 35 additions and 5 deletions

View File

@@ -132,7 +132,7 @@ class OSG_EXPORT Program : public osg::StateAttribute
void requestLink();
void linkProgram();
void validateProgram();
bool validateProgram();
bool needsLink() const {return _needsLink;}
bool isLinked() const {return _isLinked;}
bool getInfoLog( std::string& infoLog ) const;

View File

@@ -81,6 +81,11 @@ class OSG_EXPORT Shader : public osg::Object
/** Get the Shader type as a descriptive string. */
const char* getTypename() const;
/** release OpenGL objects in specified graphics context if State
object is passed, otherwise release OpenGL objects for all graphics context if
State object pointer NULL.*/
void releaseGLObjects(osg::State* state=0) const;
/** Mark our PCSs as needing recompilation.
* Also mark Programs that depend on us as needing relink */
void dirtyShader();