Added basic code injection fields to osg::Shader,
creation of main shader to ShaderComposer and collection of ShaderComponent to osg::State. Also added very basic shader set up in osgshadecomposition example.
This commit is contained in:
@@ -142,6 +142,12 @@ class OSG_EXPORT State : public Referenced, public Observer
|
||||
inline unsigned int getContextID() const { return _contextID; }
|
||||
|
||||
|
||||
/* Set whether shader composition is enabled.*/
|
||||
void setShaderCompositionEnabled(bool flag) { _shaderCompositionEnabled = flag; }
|
||||
|
||||
/* Get whether shader composition is enabled.*/
|
||||
bool getShaderCompositionEnabled() const { return _shaderCompositionEnabled; }
|
||||
|
||||
/** Set the ShaderComposor object that implements shader composition.*/
|
||||
void setShaderComposer(ShaderComposer* sc) { _shaderComposer = sc; }
|
||||
|
||||
@@ -250,6 +256,8 @@ class OSG_EXPORT State : public Referenced, public Observer
|
||||
*/
|
||||
void apply();
|
||||
|
||||
/** Apply any shader composed state.*/
|
||||
void applyShaderComposition();
|
||||
|
||||
/** Set whether a particular OpenGL mode is valid in the current graphics context.
|
||||
* Use to disable OpenGL modes that are not supported by current graphics drivers/context.*/
|
||||
|
||||
Reference in New Issue
Block a user