![]() |
VR-Forces Developer's Guide
|
State component that injects lighting shaders and uniforms into a state set. It also has a DtLightComputeProgram that does a 2 pass set up/computation of lights affecting screen space tiles, which is then subsequently used by the lighting.

Public Member Functions | |
| DtOsgLightingComponent (DtDe &de) | |
| virtual | ~DtOsgLightingComponent () |
| virtual void | update (const std::vector< const DtLight * > &lights, const osg::State &state, const osg::Camera *camera) |
| virtual void | updateLightSourceIndexBufferHandle (const osg::Camera *camera, DtGlBuffer *handle, int maxNumLightSources, bool createIfNeeded) |
| virtual void | setDirty (bool isDirty) |
| virtual bool | dirty () const |
| virtual bool | install (osg::StateSet *stateset) |
| virtual bool | uninstall (osg::StateSet *stateset) |
| virtual bool | isInstalled (void) const |
| virtual const DtLightingComponentShaderConstants * | shaderConstants (const osg::Camera *camera) const |
| virtual DtLightingComponentShaderConstants * | shaderConstants (const osg::Camera *camera) |
| virtual void | releaseGLObjects (void) |
| virtual void | slot_reloadShader () |
Public Member Functions inherited from makVrv::DtOsgStateComponent | |
| DtOsgStateComponent (DtDe &de) | |
Protected Member Functions | |
| virtual osg::ref_ptr < osg::Uniform > | createUniform (const std::string &name, osg::Uniform::Type type, int count=1) |
| virtual void | bindRenderPassBuffers (const osg::State &state) |
| virtual void | slot_componentVisualizationModeChanged (int mode) |
| virtual void | slot_paramsChanged (void) |
Protected Member Functions inherited from makVrv::DtOsgStateComponent | |
| virtual | ~DtOsgStateComponent () |
| virtual const std::string & | loadShaderSource (const std::string &strFileName) const |
Protected Attributes | |
| osg::ref_ptr< osg::Uniform > | myEnableLightingUniform |
| osg::ref_ptr< osg::Uniform > | myLightingOffClampUniform |
| std::vector< osg::ref_ptr < osg::Uniform > > | myUniforms |
| osg::ref_ptr< osg::Uniform > | myAmbientFactorUniform |
| osg::ref_ptr< osg::Uniform > | myUseGlobalAmbientUniform |
| osg::ref_ptr< osg::Uniform > | myDiffuseFactorUniform |
| osg::ref_ptr< osg::Uniform > | myUseGlobalDiffuseUniform |
| osg::ref_ptr< osg::Uniform > | myModelTypeDefaultUniform |
| bool | myDirty |
| bool | myIsInstalled |
| DtSignalConnectionManager | myConnections |
| osg::ref_ptr < DtLightingComponentStateAttribute > | myLightingComponentStateAttribute |
| DtThreadCameraStreamDataManager & | myTcsDataManager |
| DtOsgLightingComponentTcsUserDataCreator & | myUserDataCreator |
Protected Attributes inherited from makVrv::DtOsgStateComponent | |
| DtDe & | myDe |
| DtOsgShaderFilesCache & | myShaderFilesCache |
Private Member Functions | |
| DtOsgLightingComponent ()=delete | |
| DtOsgLightingComponent (const DtOsgLightingComponent &)=delete | |
| DtOsgLightingComponent & | operator= (const DtOsgLightingComponent &)=delete |
Friends | |
| class | DtLightingComponentStateAttribute |
| makVrv::DtOsgLightingComponent::DtOsgLightingComponent | ( | DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
privatedelete |
private default constructor. not allowed.
|
privatedelete |
prevent copy-construction
|
privatedelete |
prevent assignment
|
virtual |
Update the lighting uniforms with new light data.
|
virtual |
add/update/remove a light source index buffer handle/size entry in the map
|
inlinevirtual |
Sets dirty state for reinstallation.
|
inlinevirtual |
Checks if component needs to be re-installed.
|
virtual |
Install this component on a state set.
Implements makVrv::DtOsgStateComponent.
|
virtual |
Uninstall this component from a state set.
Implements makVrv::DtOsgStateComponent.
|
virtual |
checks whether its installed
|
virtual |
get the shader constants
|
virtual |
get the shader constants, non const
|
virtual |
|
virtual |
reload the light source compute shaders
|
protectedvirtual |
|
protectedvirtual |
This is called by the DtLightingComponentStateAttribute.
|
protectedvirtual |
set the component visualization mode
|
protectedvirtual |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |