Added compile/release and resize of GL objects to ShaderAttribute.
Removed the StateAttribute::compose() method. Fixed the default type value in ShaderAttribute
This commit is contained in:
@@ -291,6 +291,10 @@ class OSG_EXPORT ShaderComponent : public osg::Object
|
||||
|
||||
unsigned int getNumShaders() const { return _shaders.size(); }
|
||||
|
||||
virtual void compileGLObjects(State& state) const;
|
||||
virtual void resizeGLObjectBuffers(unsigned int maxSize);
|
||||
virtual void releaseGLObjects(State* state=0) const;
|
||||
|
||||
protected:
|
||||
|
||||
typedef std::vector< osg::ref_ptr<osg::Shader> > Shaders;
|
||||
|
||||
@@ -54,8 +54,6 @@ class OSG_EXPORT ShaderAttribute : public StateAttribute
|
||||
|
||||
virtual void apply(State& state) const;
|
||||
|
||||
virtual void compose(ShaderComposer& composer) const;
|
||||
|
||||
virtual void compileGLObjects(State& state) const;
|
||||
|
||||
virtual void resizeGLObjectBuffers(unsigned int maxSize);
|
||||
|
||||
@@ -322,9 +322,6 @@ class OSG_EXPORT StateAttribute : public Object
|
||||
*/
|
||||
virtual void apply(State&) const {}
|
||||
|
||||
/* compose associated shaders via the ShaderComposer. */
|
||||
virtual void compose(ShaderComposer& composer) const {}
|
||||
|
||||
/** Default to nothing to compile - all state is applied immediately. */
|
||||
virtual void compileGLObjects(State&) const {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user