Changeset 11654
- Timestamp:
- 06/24/10 19:15:27 (3 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 3 added
- 4 modified
-
include/osg/ShaderAttribute (added)
-
include/osg/ShaderComposer (added)
-
include/osg/State (modified) (3 diffs)
-
include/osg/StateAttribute (modified) (2 diffs)
-
src/osg/CMakeLists.txt (modified) (2 diffs)
-
src/osg/ShaderAttribute.cpp (added)
-
src/osg/State.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/State
r11565 r11654 22 22 #include <osg/Observer> 23 23 24 #include <osg/ShaderComposer> 24 25 #include <osg/FrameStamp> 25 26 #include <osg/DisplaySettings> … … 141 142 inline unsigned int getContextID() const { return _contextID; } 142 143 144 145 /** Set the ShaderComposor object that implements shader composition.*/ 146 void setShaderComposer(ShaderComposer* sc) { _shaderComposer = sc; } 147 148 /** Get the ShaderComposor object.*/ 149 ShaderComposer* getShaderComposer() { return _shaderComposer.get(); } 150 151 /** Get the const ShaderComposor object.*/ 152 const ShaderComposer* getShaderComposer() const { return _shaderComposer.get(); } 153 154 143 155 /** Push stateset onto state stack.*/ 144 156 void pushStateSet(const StateSet* dstate); … … 1340 1352 GraphicsContext* _graphicsContext; 1341 1353 unsigned int _contextID; 1354 osg::ref_ptr<ShaderComposer> _shaderComposer; 1355 1342 1356 ref_ptr<FrameStamp> _frameStamp; 1343 1357 -
OpenSceneGraph/trunk/include/osg/StateAttribute
r10671 r11654 36 36 class NodeVisitor; 37 37 class State; 38 class ShaderComposer; 38 39 class StateSet; 39 40 class Texture; … … 316 317 virtual void apply(State&) const {} 317 318 319 /* compose associated shaders via the ShaderComposer. */ 320 virtual void compose(ShaderComposer& composer) const {} 321 318 322 /** Default to nothing to compile - all state is applied immediately. */ 319 323 virtual void compileGLObjects(State&) const {} -
OpenSceneGraph/trunk/src/osg/CMakeLists.txt
r11431 r11654 138 138 ${HEADER_PATH}/ShadeModel 139 139 ${HEADER_PATH}/Shader 140 ${HEADER_PATH}/ShaderAttribute 141 ${HEADER_PATH}/ShaderComposer 140 142 ${HEADER_PATH}/ShadowVolumeOccluder 141 143 ${HEADER_PATH}/Shape … … 302 304 ShadeModel.cpp 303 305 Shader.cpp 306 ShaderAttribute.cpp 307 ShaderComposer.cpp 304 308 ShadowVolumeOccluder.cpp 305 309 Shape.cpp -
OpenSceneGraph/trunk/src/osg/State.cpp
r11641 r11654 42 42 _graphicsContext = 0; 43 43 _contextID = 0; 44 45 _shaderComposer = new ShaderComposer; 46 44 47 _identity = new osg::RefMatrix(); // default RefMatrix constructs to identity. 45 48 _initialViewMatrix = _identity;
