VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOculusSwapChain.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include "OVR_CAPI.h"
16 
17 #include <map>
18 
19 namespace makVrv
20 {
21  class DtDe;
22 
26  {
27  private:
30 
33 
35  DtOculusSwapChain& operator=(const DtOculusSwapChain&);
36 
37  public:
39  DtOculusSwapChain(DtDe& de, vrvVirtualReality::DtEye eye, ovrSession session);
40 
42  virtual ~DtOculusSwapChain();
43 
45  virtual bool initalise(unsigned int width, unsigned int height, unsigned int layers, DtSwapChainTextureType type, DtGlImageType format);
46 
48  bool addFormat(DtSwapChainTextureType type, DtGlImageType format);
49 
51  virtual void acquireTextures();
52 
54  virtual unsigned int getTexture(DtSwapChainTextureType type, int index) const;
55 
57  virtual void releaseTextures();
58 
60  virtual void blitTextureToScreen(int swidth, int sheight, bool showleftEye, int overrideIndex = -1);
61 
62  //
63  // Varjo specific
64 
66  ovrTextureSwapChain getSwapChain(DtSwapChainTextureType type) const;
67 
69  ovrTextureFormat_ getOculusFormat(DtGlImageType format) const;
70 
71  protected:
72  ovrSession myOculusSession;
73  mutable std::map<DtSwapChainTextureType, ovrTextureSwapChain> mySwapChains;
75  mutable ovrMirrorTexture myMirrorTexture;
76  ovrMirrorTextureDesc myMirrorDesc;
77  };
78 }
ovrMirrorTextureDesc myMirrorDesc
Definition: DtOculusSwapChain.h:76
Contains DLL export macros.
Oculus implementation of a texture swapchain.
Definition: DtOculusSwapChain.h:25
GLuint myMirrorFbo
Definition: DtOculusSwapChain.h:74
ovrMirrorTexture myMirrorTexture
Definition: DtOculusSwapChain.h:75
unsigned int GLuint
Definition: DtGlTextureBufferObject.h:18
#define DT_DLL_VRVVR
Definition: vrvVirtualReality.h:19
DtEye
A virtual reality eye.
Definition: vrvVirtualReality.h:37
ovrSession myOculusSession
Definition: DtOculusSwapChain.h:72
Base implementation of a texture swapchain.
Base implementation of a texture swapchain.
Definition: DtSwapChain.h:37
DtGlImageType
Definition: DtGlImageType.h:15
std::map< DtSwapChainTextureType, ovrTextureSwapChain > mySwapChains
Definition: DtOculusSwapChain.h:73
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
DtSwapChainTextureType
Definition: DtSwapChain.h:27

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)