![]() |
VR-Forces Developer's Guide
|
DtOsgShaderManager injects custom shaders into the scenes, and keeps their uniform parameters set to match fixed function pipeline capabilities as much as possible.

Public Member Functions | |
| virtual | ~DtOsgShaderManager () |
| virtual void | setPerPixelLightingEnabled (bool enabled) |
| virtual bool | getPerPixelLightingEnabled () const |
| virtual void | generateShaders (osg::Node *node, const std::string &name="", bool shareState=true, bool force=false) |
| virtual void | ts_generateShaders (osg::Node *node, DtOsgFileCache &fileCache, const std::string &name="", bool shareState=true, bool force=false) |
| virtual void | removeShaders (osg::Node *node) |
| virtual void | ts_removeShaders (osg::Node *node) |
| virtual void | optimizeStateSharing (osg::Node *node) |
| virtual const std::string & | shaderFolderPath () const |
| virtual void | disableShaders (osg::StateSet *stateSet) |
| virtual void | installEnvironmentMap (osg::Camera *camera) |
| boost::shared_mutex & | optimizeStateSetMutex () |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtOsgShaderManager & | instance (DtDe &de) |
| static std::string | theClassName () |
Protected Member Functions | |
| DtOsgShaderManager (DtDe &de) | |
Protected Attributes | |
| bool | myPerPixelLightingStateChanged |
| bool | myPerPixelLightingEnabled |
| bool | myPendingPerPixelLightingState |
| DtDe & | myDe |
| osg::ref_ptr< DtOpenGLCubeMap > | myEnvironmentMapTexture |
| std::string | myShaderFolderPath |
| boost::shared_mutex | myOptimizeStateSetMutex |
Private Member Functions | |
| DtOsgShaderManager ()=delete | |
| DtOsgShaderManager (const DtOsgShaderManager &)=delete | |
| DtOsgShaderManager | operator= (const DtOsgShaderManager &)=delete |
Private Attributes | |
| DtSignalConnectionManager | myConnections |
|
virtual |
DTOR.
|
protected |
can only create using instance()
|
privatedelete |
not allowed
|
privatedelete |
not allowed
|
static |
Get/create instance of shader manager.
|
static |
Get the name this class is registered by.
|
privatedelete |
not allowed
|
virtual |
Toggles global use of shader-based lighting effects.
|
virtual |
Retrieves whether per-pixel shader-based lighting is active.
|
virtual |
Generates virtual shader programs for a graph. node: Graph for which to generate shader components name: Optional name to give to virtual programs (useful for debugging) shareState: Run a pass on the node to share equivalent state attributes. This is equivalent to calling optimizeStateSharing(node) after calling this. force: Force shader generation on the node graph, disregarding the ignore userdata flag (see osgEarth::ShaderGenerator::setIgnoreHint)
|
virtual |
threadsafe implementation of generateShaders
|
virtual |
Remove virtual shader programs for a graph. node: Graph for which to remove shader components.
|
virtual |
threadsafe implementation of removeShaders
|
virtual |
Runs a pass over the provided graph and consolidates equivalent state attributes. This can result in better draw performance by reducing OpenGL state changes.
|
virtual |
Gets the location of the shader sources.
|
virtual |
Disable per-pixel lighting on this state set.
|
virtual |
Installs an environment map texture/uniform on the specified camera. This needs to be per camera so that the correct environment map is used based on the camera.
| boost::shared_mutex& makVrv::DtOsgShaderManager::optimizeStateSetMutex | ( | ) |
get the optimize stateset mutex, used by DtOsgEarthFeatureDataBroker and DtIndirectGeometryRegistry to avoid both running their visitors at the same time this should go away once we refactor the DtIndirectRegistry stuff enough to fix this problem.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |