|
VR-Engage
2.2
|
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>
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 () |
| makVre::DtVreVirtualRealityChannel::DtVreVirtualRealityChannel | ( | makVrv::DtDe & | de, |
| makVrv::DtOsgWindow * | window, | ||
| makVrv::DtChannelConfiguration & | config ) |
Constructor.
| de | Reference to the display engine |
| window | Pointer to the OSG window this channel renders to |
| config | Channel 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().
|
overridevirtual |
Destructor.
Cleans up resources used by the virtual reality channel.
|
overridevirtual |
Controls render-to-texture mode for this channel.
| enabled | Whether 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.
|
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.
|
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.