17 #include <matrix/vlVector.h>
19 #include <osg/Matrixd>
20 #include <osg/RenderInfo>
29 #include <Varjo_events.h>
30 #include <Varjo_layers.h>
34 #define VARJO_USE_GAZE 1
39 class DtVirtualRealityChannel;
55 void setEyeCenters(osg::Vec2 leftEye, osg::Vec2 rightEye);
70 virtual void update(osg::State* state)
const;
73 virtual void initProgram(osg::State* state)
const;
83 mutable osg::Vec2 myEyeCenters[2];
134 virtual const std::string& providerName();
137 virtual const std::string& deviceName();
140 virtual bool initializeVR();
143 virtual bool hasFocusViews();
146 virtual bool useVrs();
155 virtual void getProjectionAngles(
vrvVirtualReality::DtEye eye,
double& left,
double& right,
double& bottom,
double& top,
double znear,
double zfar);
167 virtual bool getTrackedPose(
DtVector& pos,
DtQuat& ori,
int index);
170 virtual bool reset();
173 virtual bool shutdown();
176 virtual bool hasTrackedCamera();
185 void setOverlayEnabled(
bool enabled);
190 varjo_Session* findVarjoSystem()
const;
193 void commitEyeTexture(
vrvVirtualReality::DtEye eye, varjo_SwapChain* swapChain, varjo_SwapChain* depthSwapChain, osg::RenderInfo& renderInfo);
196 void commitEyeTexture(
unsigned int viewIndex, varjo_Viewport& viewPort,
int layer, varjo_SwapChain* swapChain, varjo_SwapChain* depthSwapChain);
199 void commitHudTexture(
unsigned int viewIndex,
int width,
int height, varjo_SwapChain* swapChain, osg::RenderInfo& renderInfo);
205 static bool isVrAvailable();
210 virtual void beginFrame();
213 virtual void beginRendering();
216 virtual void endRendering();
219 virtual void initViewports();
222 virtual void updateEyeProjections();
225 virtual void updateEyeProjections(
unsigned int viewIndex,
DtVirtualRealityChannel* vrChannel,
unsigned int layer,
bool updateVarjoViewOnly =
false);
228 varjo_Viewport calculateFocusRect(varjo_Viewport contextViewport,
const double focusProjectionMatrix[16],
const double contextProjectionMatrix[16]);
230 #if VARJO_USE_GAZE == 1
231 varjo_Error initGaze()
const;
235 bool getGazeNormalizedCoords(
const osg::Matrixd& leftProjection,
const osg::Matrixd& rightProjection,
236 osg::Vec2* left, osg::Vec2* right)
const;
osg::Vec3d myInvResetPos
Definition: DtVarjoProvider.h:254
Drawable and pre Drawcallback that draw full screen quad to update vrs image.
std::vector< varjo_LayerMultiProjView > myMultiprojectionViews
Definition: DtVarjoProvider.h:246
std::vector< varjo_ViewExtensionDepth > myExtDepthViews
Definition: DtVarjoProvider.h:247
std::map< DtVirtualRealityChannel *, osg::ref_ptr< DtVarjoVrsUpdater > > myChannelVrsUpdaters
out vrs updater
Definition: DtVarjoProvider.h:257
Wrapper around Nvidia Variable Rate Shading Image functionality Creates a texture of the correct size...
Definition: DtVariableRateShadingImage.h:75
GLint myStepsUniformLocation
Definition: DtVarjoProvider.h:81
DtVirtualRealityDriver * myDriverHandle
store a handle to the driver to avoid repeated lookup
Definition: DtVarjoProvider.h:260
GLint myEyeCenterRightUniformLocation
Definition: DtVarjoProvider.h:79
Contains DLL export macros.
std::vector< ViewSettings > myViewSettings
Definition: DtVarjoProvider.h:244
bool myHaveCalibratedEyeTracking
Definition: DtVarjoProvider.h:253
ViewSettings()
CTOR.
Definition: DtVarjoProvider.h:99
A Varjo implementation of the DtVirtualRealityProvider abstract base class.
Definition: DtVarjoProvider.h:90
An abstract interface that provides VR System API services.
A Tracked camera is typically attached to the HMD and can provide position and orientation data in ad...
Definition: DtTrackedCamera.h:27
double myFarClip
Definition: DtVarjoProvider.h:105
Base class for GPU updates of the variable rate shading image Draw a full screen quad using a shader ...
Definition: DtVariableRateShadingImageUpdater.h:26
std::vector< varjo_Viewport > myViewports
Definition: DtVarjoProvider.h:243
A driver that manages virtual reality HMD and input devices.
Definition: DtVirtualRealityDriver.h:49
#define DT_DLL_VRVVR
Definition: vrvVirtualReality.h:19
A Varjo implementation of the DtVariableRateShadingImageUpdater Supports updating the vrs map as foav...
Definition: DtVarjoProvider.h:45
DtEye
A virtual reality eye.
Definition: vrvVirtualReality.h:37
varjo_Session * myVarjoSession
Definition: DtVarjoProvider.h:241
GLint myEyeCenterLeftUniformLocation
Definition: DtVarjoProvider.h:78
GLint myEdgeUniformLocation
Definition: DtVarjoProvider.h:80
std::vector< varjo_ViewExtensionDepthTestRange > myExtDepthTestRangeViews
Definition: DtVarjoProvider.h:248
An abstract interface that provides VR System API services.
Definition: DtVirtualRealityProvider.h:43
Contains makVrv::DtQuat class.
bool myMixedRealityAvailable
Definition: DtVarjoProvider.h:252
A VRV channel that represents the eyes of the HMD A Virtual Reality channel can render in a few diffe...
Definition: DtVirtualRealityChannel.h:29
Object to handle rendering a mixed reality mask object into the scene.
Definition: DtMixedRealityMask.h:32
An OSG camera callback that will submit the channel to the underlying VR system as an overlay channel...
Definition: DtSubmitOverlayCallback.h:26
bool myUseDepthLayers
Definition: DtVarjoProvider.h:245
std::vector< varjo_LayerMultiProjView > myHudViews
Definition: DtVarjoProvider.h:249
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
A utility Quaternion class.
Definition: DtQuat.h:22
varjo_FrameInfo * myFrameInfo
Definition: DtVarjoProvider.h:250
double myNearClip
Definition: DtVarjoProvider.h:104
Wraps functionality of Variable Rate Shading Image.
std::string myDeviceName
Definition: DtVarjoProvider.h:251
A post processing effect responsible for submitting and mirroring the eye views to the VR subsystem...
Definition: DtVirtualRealityPostProcessor.h:34
An OSG camera callback that will submit the channel to the underlying VR system as an overlay channel...
Definition: DtSubmitViewCallback.h:29
Holds settings related to a view.
Definition: DtVarjoProvider.h:96
GLint myEyeCenterUniformLocation
Definition: DtVarjoProvider.h:77
int32_t myViewCount
Definition: DtVarjoProvider.h:242