![]() |
VR-Forces 4.6 Class Documentation
|
State component that injects lighting shaders and uniforms into a state set. More...

Public Member Functions | |
| DtOsgLightingComponent (int maxLights, DtDe &de) | |
| CTOR. | |
| virtual | ~DtOsgLightingComponent () |
| DTOR. | |
| void | update (const VectorLights &lights, const osg::State &state) |
| Update the lighting uniforms with new light data. | |
| void | setMaxLights (int maxNumLights) |
| Sets the total maximum number of lights to activate (including dynamic lights). | |
| const Vector2_uint32 & | GetTileSize (void) const |
| const Vector2_uint32 & | GetGridMaxDims (void) const |
| osg::Uniform * | getEnableLightingUniform () const |
| Gets the uniform that toggles lighting. | |
| void | setAmbientFactor (float ambientFactor) |
| Sets the ambient factor uniform. | |
| void | setUseGlobalAmbient (bool useGlobalAmbient) |
| Enables/Disables the usage of the material ambient and global ambient. | |
| void | setDiffuseFactor (float diffuseFactor) |
| Sets the difuse factor uniform. | |
| void | setUseGlobalDiffuse (bool useGlobalDiffuse) |
| Enables/Disables the usage of the material diffuse and global diffuse. | |
| void | setUseHDR (bool useHDR) |
| Enables/Disables HDR Lighting. | |
| void | setDirty (bool isDirty) |
| Sets dirty state for reinstallation. | |
| void | setEmissionFactor (float emissionFactor) |
| Sets the emission factor uniform. | |
| bool | dirty () const |
| Checks if component needs to be re-installed. | |
| void | releaseGLObjects (void) |
| virtual bool | install (osg::StateSet *stateset) |
| Install this component on a state set. | |
| virtual bool | uninstall (osg::StateSet *stateset) |
| Uninstall this component from a state set. | |
Public Member Functions inherited from makVrv::DtOsgStateComponent | |
| DtOsgStateComponent (DtDe &de, const DtOsgStateComponentContext *context=0L) | |
| CTOR. | |
| const DtOsgStateComponentContext * | getContext () const |
| Gets the context under which this component operates. | |
Static Public Member Functions | |
| static int | getTextureStartOffset (void) |
Protected Member Functions | |
| void | setLightPointScale (double scale) |
| void | setDynamicLightScale (double scale) |
| void | setEmissiveTextureScale (double scale) |
| void | setSpecularScale (double scale) |
| void | setShininessScale (double scale) |
| void | setHdrOutputScale (double scale) |
| osg::Uniform * | createUniform (const std::string &name, osg::Uniform::Type type, int count=1) |
| void | PackLights (const osg::Matrixd &normalMatrix, const VectorLights &lights, const osg::State &state) |
| void | UpdateTextureLightDataGrid (void) |
| void | UpdateTiledShadingData (const VectorLights &lights, const osg::State &state) |
| void | UpdateTileLightIndexListTexture () |
| void | UpdateTileLightGridCountOffsetsTexture () |
Protected Member Functions inherited from makVrv::DtOsgStateComponent | |
| virtual | ~DtOsgStateComponent () |
| DTOR. | |
| std::string | loadShaderSource (const std::string &strFileName) const |
| Loads shader source code from a path. | |
Static Protected Attributes | |
| static bool | bColorRampTextureWasTried |
State component that injects lighting shaders and uniforms into a state set.
|
virtual |
DTOR.
| void makVrv::DtOsgLightingComponent::update | ( | const VectorLights & | lights, |
| const osg::State & | state | ||
| ) |
Update the lighting uniforms with new light data.
| void makVrv::DtOsgLightingComponent::setMaxLights | ( | int | maxNumLights | ) |
Sets the total maximum number of lights to activate (including dynamic lights).
|
static |
| const Vector2_uint32& makVrv::DtOsgLightingComponent::GetTileSize | ( | void | ) | const |
| const Vector2_uint32& makVrv::DtOsgLightingComponent::GetGridMaxDims | ( | void | ) | const |
| osg::Uniform* makVrv::DtOsgLightingComponent::getEnableLightingUniform | ( | ) | const |
Gets the uniform that toggles lighting.
| void makVrv::DtOsgLightingComponent::setAmbientFactor | ( | float | ambientFactor | ) |
Sets the ambient factor uniform.
| void makVrv::DtOsgLightingComponent::setUseGlobalAmbient | ( | bool | useGlobalAmbient | ) |
Enables/Disables the usage of the material ambient and global ambient.
| void makVrv::DtOsgLightingComponent::setDiffuseFactor | ( | float | diffuseFactor | ) |
Sets the difuse factor uniform.
| void makVrv::DtOsgLightingComponent::setUseGlobalDiffuse | ( | bool | useGlobalDiffuse | ) |
Enables/Disables the usage of the material diffuse and global diffuse.
| void makVrv::DtOsgLightingComponent::setUseHDR | ( | bool | useHDR | ) |
Enables/Disables HDR Lighting.
|
inline |
Sets dirty state for reinstallation.
| void makVrv::DtOsgLightingComponent::setEmissionFactor | ( | float | emissionFactor | ) |
Sets the emission factor uniform.
|
inline |
Checks if component needs to be re-installed.
| void makVrv::DtOsgLightingComponent::releaseGLObjects | ( | void | ) |
|
virtual |
Install this component on a state set.
Implements makVrv::DtOsgStateComponent.
|
virtual |
Uninstall this component from a state set.
Implements makVrv::DtOsgStateComponent.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |