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

Detailed Description

DtVreVirtualRealityChannel extends the base DtVirtualRealityChannel to provide VR-Engage specific behavior for head-mounted display (HMD) rendering. It enforces render-to-texture mode which is essential for proper VR visualization, and provides methods to rebuild the render texture when needed. This class ensures that the post-processing manager cannot disable render-to-texture mode, which would break VR functionality.

#include <vreVirtualRealityChannel.h>

Inheritance diagram for makVre::DtVreVirtualRealityChannel:
[legend]

Public Member Functions

 DtVreVirtualRealityChannel (makVrv::DtDe &de, makVrv::DtOsgWindow *window, makVrv::DtChannelConfiguration &config)
 
virtual ~DtVreVirtualRealityChannel () override
 
virtual void setRenderToTexture (bool enabled) override
 
virtual void initializeRenderTexture () override
 
virtual void dirtyRenderTextureFormat ()
 

Constructor & Destructor Documentation

◆ DtVreVirtualRealityChannel()

makVre::DtVreVirtualRealityChannel::DtVreVirtualRealityChannel ( makVrv::DtDe & de,
makVrv::DtOsgWindow * window,
makVrv::DtChannelConfiguration & config )

Constructor.

Parameters
deReference to the display engine
windowPointer to the OSG window this channel renders to
configChannel configuration parameters

Creates a new virtual reality channel for the specified window and configuration. This initializes a channel that renders the scene from the perspective of an HMD eye position.

References de().

◆ ~DtVreVirtualRealityChannel()

virtual makVre::DtVreVirtualRealityChannel::~DtVreVirtualRealityChannel ( )
overridevirtual

Destructor.

Cleans up resources used by the virtual reality channel.

Member Function Documentation

◆ setRenderToTexture()

virtual void makVre::DtVreVirtualRealityChannel::setRenderToTexture ( bool enabled)
overridevirtual

Controls render-to-texture mode for this channel.

Parameters
enabledWhether render-to-texture should be enabled

Overridden to enforce render-to-texture mode for VR channels. This implementation ignores attempts to disable render-to-texture, since VR channels are only useful with render-to-texture enabled. This prevents the post-processing manager from automatically disabling it when there are no active post-processors, which would break VR functionality.

◆ initializeRenderTexture()

virtual void makVre::DtVreVirtualRealityChannel::initializeRenderTexture ( )
overridevirtual

Initializes or reinitializes the render texture.

Overridden to provide additional signaling when the texture changes. This ensures that any components depending on the texture are notified when it's recreated, allowing them to update their references accordingly.

◆ dirtyRenderTextureFormat()

virtual void makVre::DtVreVirtualRealityChannel::dirtyRenderTextureFormat ( )
virtual

Forces a rebuild of the render texture.

Marks the render texture format as dirty, which will cause it to be rebuilt during the next frame. This is useful when the texture format needs to be updated due to changes in rendering requirements or when the texture needs to be recreated for any other reason.


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