VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreOsgHudEffectTextureController Class Reference

Detailed Description

DtVreOsgHudEffectTextureController manages texture effects specifically designed for Heads-Up Display (HUD) elements in the visualization system. Based on VR-Vantage's exampleEffectTexturePlugin, it provides specialized shader and texture management tailored for optimal HUD rendering, including features like transparency handling and overlay positioning.

#include <vreOsgHudEffectTextureController.h>

Inheritance diagram for makVre::DtVreOsgHudEffectTextureController:
[legend]

Public Member Functions

 DtVreOsgHudEffectTextureController (makVrv::DtDe &de)
 
virtual ~DtVreOsgHudEffectTextureController () override
 
virtual bool installShaders (int baseUnit, int effectUnit, const osg::Texture *tex, osg::StateSet *stateSet, const std::string &baseTextureName) const override
 

Static Public Member Functions

static void setEnabled (bool enabled)
 

Static Private Attributes

static osg::ref_ptr< osg::Uniform > effectEnabledUniform
 

Constructor & Destructor Documentation

◆ DtVreOsgHudEffectTextureController()

makVre::DtVreOsgHudEffectTextureController::DtVreOsgHudEffectTextureController ( makVrv::DtDe & de)

Constructor.

Parameters
deReference to the display engine

Creates a new HUD-specific effect texture controller for the specified display engine. This controller is preconfigured with appropriate shaders and parameters for HUD rendering.

References de().

◆ ~DtVreOsgHudEffectTextureController()

virtual makVre::DtVreOsgHudEffectTextureController::~DtVreOsgHudEffectTextureController ( )
overridevirtual

Virtual destructor.

Ensures proper cleanup of HUD effect texture controller resources.

Member Function Documentation

◆ installShaders()

virtual bool makVre::DtVreOsgHudEffectTextureController::installShaders ( int baseUnit,
int effectUnit,
const osg::Texture * tex,
osg::StateSet * stateSet,
const std::string & baseTextureName ) const
overridevirtual

Installs the HUD effect shaders into a state set.

Parameters
baseUnitBase texture unit index
effectUnitEffect texture unit index
texPointer to the effect texture
stateSetState set to install the shaders into
baseTextureNameName of the base texture sampler
Returns
True if shaders were installed successfully, false otherwise

Installs the HUD-specific effect shaders into the provided state set, configuring the necessary uniforms and texture units for the effect. This implementation includes special handling for HUD rendering, such as proper transparency and overlay positioning.

◆ setEnabled()

static void makVre::DtVreOsgHudEffectTextureController::setEnabled ( bool enabled)
static

Globally enables or disables HUD effects.

Parameters
enabledTrue to enable HUD effects, false to disable

Static method that controls whether HUD effects are globally enabled or disabled. This affects all instances of HUD effect controllers in the application.

Member Data Documentation

◆ effectEnabledUniform

osg::ref_ptr<osg::Uniform> makVre::DtVreOsgHudEffectTextureController::effectEnabledUniform
staticprivate

Shared uniform for enabling/disabling HUD effect textures.

Static uniform that controls whether HUD effect textures are enabled globally. This allows for toggling all HUD effects with a single uniform value.


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