VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSubmitVarjoViewCallback.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 #pragma once
7 
11 
12 
15 
16 #include <osg/RenderInfo>
17 
18 #include <Varjo.h>
19 #include <Varjo_events.h>
20 #include <Varjo_layers.h>
21 #include <Varjo_mr.h>
22 #include <Varjo_gl.h>
23 
24 
25 namespace makVrv
26 {
27  class DtVarjoProvider;
28  class DtGlProgram;
29 
34  {
35  public:
38 
40  virtual ~DtSubmitVarjoViewCallback();
41 
42  private:
45 
48 
51 
52  protected:
54  virtual void submit(osg::RenderInfo& renderInfo) const;
55 
57  virtual bool initSwapChain(osg::RenderInfo& renderInfo) const;
58 
60  virtual void initCopyProgram(bool useArrays, bool copyDepth, bool copyStencil) const;
61 
63  virtual void initFbos(osg::RenderInfo& renderInfo) const;
64 
66  virtual void copyTextures(osg::RenderInfo& renderInfo, unsigned int srcColorId, unsigned int srcDepthId, unsigned int srcStencilId, int32_t swapChainIndex) const;
67 
68  protected:
69 
71  varjo_Session* myVarjoSession;
72 
73  int myWidth;
74  int myHeight;
75 
76  mutable int myStartFrame;
77 
78  mutable varjo_TextureFormat myDepthFormat;
79 
82  mutable varjo_SwapChainConfig2 mySwapChainConfig;
83  mutable varjo_SwapChainConfig2 myDepthSwapChainConfig;
84  mutable varjo_SwapChain* myColorSwapChain;
85  mutable varjo_SwapChain* myDepthSwapChain;
86  mutable int mySwapChainLength;
87 
89  mutable std::vector<GLuint> mySwapChainFbos;
90 
93 
95 
98 
99  mutable unsigned int myCopyQuadVbo;
100 
101  mutable unsigned int mySrcDepthTexId;
102  mutable unsigned int mySrcStencilTexId;
103 
104  };
105 }
osg::ref_ptr< osg::StateSet > myCopyStateSet
state set to encapsulate state changes when doing swapchain fill
Definition: DtSubmitVarjoViewCallback.h:97
int mySwapChainLength
Definition: DtSubmitVarjoViewCallback.h:86
Contains DLL export macros.
DtGlProgram * myCopyProgram
shader to copy color texture into swapchain
Definition: DtSubmitVarjoViewCallback.h:92
A Varjo implementation of the DtVirtualRealityProvider abstract base class.
Definition: DtVarjoProvider.h:91
unsigned int myCopyQuadVbo
Definition: DtSubmitVarjoViewCallback.h:99
varjo_SwapChain * myColorSwapChain
Definition: DtSubmitVarjoViewCallback.h:84
A convenience class to represent an OpenGL Shader Program.
Definition: DtGlProgram.h:65
A driver that manages virtual reality HMD and input devices.
Definition: DtVirtualRealityDriver.h:51
#define DT_DLL_VRVVR
Definition: vrvVirtualReality.h:19
int myStartFrame
Definition: DtSubmitVarjoViewCallback.h:76
DtEye
A virtual reality eye.
Definition: vrvVirtualReality.h:38
int myWidth
Definition: DtSubmitVarjoViewCallback.h:73
An OSG camera post darw callback that will submit the view to the underlying VR system.
Definition: DtSubmitVarjoViewCallback.h:33
bool mySwapChainsInitialized
These are mutable because they are used as part of the const drawImplementation.
Definition: DtSubmitVarjoViewCallback.h:81
unsigned int mySrcStencilTexId
Definition: DtSubmitVarjoViewCallback.h:102
varjo_Session * myVarjoSession
Definition: DtSubmitVarjoViewCallback.h:71
int myLastCopyProgramConfig
Definition: DtSubmitVarjoViewCallback.h:94
An OSG camera callback that will submit the channel to the underlying VR system as an eye channel...
std::vector< GLuint > mySwapChainFbos
fbo for swapchain render operations
Definition: DtSubmitVarjoViewCallback.h:89
varjo_SwapChainConfig2 myDepthSwapChainConfig
Definition: DtSubmitVarjoViewCallback.h:83
varjo_SwapChainConfig2 mySwapChainConfig
Definition: DtSubmitVarjoViewCallback.h:82
varjo_SwapChain * myDepthSwapChain
Definition: DtSubmitVarjoViewCallback.h:85
varjo_TextureFormat myDepthFormat
Definition: DtSubmitVarjoViewCallback.h:78
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
int myHeight
Definition: DtSubmitVarjoViewCallback.h:74
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
DtVarjoProvider * myProvider
Definition: DtSubmitVarjoViewCallback.h:70
unsigned int mySrcDepthTexId
Definition: DtSubmitVarjoViewCallback.h:101

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)