VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtOsgLightingComponent Class Reference

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.

Inheritance diagram for makVrv::DtOsgLightingComponent:
Inheritance graph
[legend]

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
 
DtThreadCameraStreamDataManagermyTcsDataManager
 
DtOsgLightingComponentTcsUserDataCreatormyUserDataCreator
 
- Protected Attributes inherited from makVrv::DtOsgStateComponent
DtDemyDe
 
DtOsgShaderFilesCachemyShaderFilesCache
 

Private Member Functions

 DtOsgLightingComponent ()=delete
 
 DtOsgLightingComponent (const DtOsgLightingComponent &)=delete
 
DtOsgLightingComponentoperator= (const DtOsgLightingComponent &)=delete
 

Friends

class DtLightingComponentStateAttribute
 

Constructor & Destructor Documentation

makVrv::DtOsgLightingComponent::DtOsgLightingComponent ( DtDe de)

CTOR.

virtual makVrv::DtOsgLightingComponent::~DtOsgLightingComponent ( )
virtual

DTOR.

makVrv::DtOsgLightingComponent::DtOsgLightingComponent ( )
privatedelete

private default constructor. not allowed.

makVrv::DtOsgLightingComponent::DtOsgLightingComponent ( const DtOsgLightingComponent )
privatedelete

prevent copy-construction

Member Function Documentation

DtOsgLightingComponent& makVrv::DtOsgLightingComponent::operator= ( const DtOsgLightingComponent )
privatedelete

prevent assignment

virtual void makVrv::DtOsgLightingComponent::update ( const std::vector< const DtLight * > &  lights,
const osg::State &  state,
const osg::Camera *  camera 
)
virtual

Update the lighting uniforms with new light data.

virtual void makVrv::DtOsgLightingComponent::updateLightSourceIndexBufferHandle ( const osg::Camera *  camera,
DtGlBuffer handle,
int  maxNumLightSources,
bool  createIfNeeded 
)
virtual

add/update/remove a light source index buffer handle/size entry in the map

virtual void makVrv::DtOsgLightingComponent::setDirty ( bool  isDirty)
inlinevirtual

Sets dirty state for reinstallation.

virtual bool makVrv::DtOsgLightingComponent::dirty ( ) const
inlinevirtual

Checks if component needs to be re-installed.

virtual bool makVrv::DtOsgLightingComponent::install ( osg::StateSet *  stateset)
virtual

Install this component on a state set.

Implements makVrv::DtOsgStateComponent.

virtual bool makVrv::DtOsgLightingComponent::uninstall ( osg::StateSet *  stateset)
virtual

Uninstall this component from a state set.

Implements makVrv::DtOsgStateComponent.

virtual bool makVrv::DtOsgLightingComponent::isInstalled ( void  ) const
virtual

checks whether its installed

virtual const DtLightingComponentShaderConstants* makVrv::DtOsgLightingComponent::shaderConstants ( const osg::Camera *  camera) const
virtual

get the shader constants

virtual DtLightingComponentShaderConstants* makVrv::DtOsgLightingComponent::shaderConstants ( const osg::Camera *  camera)
virtual

get the shader constants, non const

virtual void makVrv::DtOsgLightingComponent::releaseGLObjects ( void  )
virtual
virtual void makVrv::DtOsgLightingComponent::slot_reloadShader ( )
virtual

reload the light source compute shaders

virtual osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightingComponent::createUniform ( const std::string &  name,
osg::Uniform::Type  type,
int  count = 1 
)
protectedvirtual
virtual void makVrv::DtOsgLightingComponent::bindRenderPassBuffers ( const osg::State &  state)
protectedvirtual

This is called by the DtLightingComponentStateAttribute.

virtual void makVrv::DtOsgLightingComponent::slot_componentVisualizationModeChanged ( int  mode)
protectedvirtual

set the component visualization mode

virtual void makVrv::DtOsgLightingComponent::slot_paramsChanged ( void  )
protectedvirtual

Friends And Related Function Documentation

friend class DtLightingComponentStateAttribute
friend

Member Data Documentation

osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightingComponent::myEnableLightingUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightingComponent::myLightingOffClampUniform
protected
std::vector< osg::ref_ptr<osg::Uniform> > makVrv::DtOsgLightingComponent::myUniforms
protected
osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightingComponent::myAmbientFactorUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightingComponent::myUseGlobalAmbientUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightingComponent::myDiffuseFactorUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightingComponent::myUseGlobalDiffuseUniform
protected
osg::ref_ptr<osg::Uniform> makVrv::DtOsgLightingComponent::myModelTypeDefaultUniform
protected
bool makVrv::DtOsgLightingComponent::myDirty
protected
bool makVrv::DtOsgLightingComponent::myIsInstalled
protected
DtSignalConnectionManager makVrv::DtOsgLightingComponent::myConnections
protected
osg::ref_ptr<DtLightingComponentStateAttribute> makVrv::DtOsgLightingComponent::myLightingComponentStateAttribute
protected
DtThreadCameraStreamDataManager& makVrv::DtOsgLightingComponent::myTcsDataManager
protected
DtOsgLightingComponentTcsUserDataCreator& makVrv::DtOsgLightingComponent::myUserDataCreator
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)