diff options
author | Sven Gothel <[email protected]> | 2015-03-28 02:08:11 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-28 02:08:11 +0100 |
commit | 450aa6f7df9e67dd256b86f94e65eaf707032aad (patch) | |
tree | 04aa207d84ddc8ca246d2573aaaf756b3ce8a0b5 /LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h | |
parent | 3c7b8a17e907f4ef2afd9f77db566a3f6179cbe4 (diff) | |
parent | 4207f9c279e832e3afcb3f5fc6cd8d84cb4cfe4c (diff) |
Merge branch 'vanilla_0.5.0.1' into jogamp_0.5.0.1
Conflicts:
LibOVR/Include/OVR_CAPI_0_5_0.h
LibOVR/Src/CAPI/CAPI_HMDState.cpp
LibOVR/Src/Displays/OVR_Win32_Dxgi_Display.h
LibOVR/Src/Kernel/OVR_System.cpp
LibOVR/Src/OVR_CAPI.cpp
LibOVR/Src/OVR_Profile.cpp
LibOVRKernel/Src/Kernel/OVR_ThreadsWinAPI.cpp
LibOVRKernel/Src/Kernel/OVR_Types.h
Diffstat (limited to 'LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h')
-rw-r--r-- | LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h b/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h index f48e42d..033a7c6 100644 --- a/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h +++ b/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h @@ -29,11 +29,12 @@ limitations under the License. #include "../CAPI_DistortionRenderer.h" -#include "../../Kernel/OVR_Log.h" +#include "Kernel/OVR_Log.h" #include "CAPI_GL_Util.h" namespace OVR { namespace CAPI { namespace GL { + // ***** GL::DistortionRenderer // Implementation of DistortionRenderer for GL. @@ -41,25 +42,20 @@ namespace OVR { namespace CAPI { namespace GL { class DistortionRenderer : public CAPI::DistortionRenderer { public: - DistortionRenderer(ovrHmd hmd, - FrameTimeManager& timeManager, - const HMDRenderState& renderState); + DistortionRenderer(); virtual ~DistortionRenderer(); // Creation function for the device. - static CAPI::DistortionRenderer* Create(ovrHmd hmd, - FrameTimeManager& timeManager, - const HMDRenderState& renderState); + static CAPI::DistortionRenderer* Create(); // ***** Public DistortionRenderer interface - - virtual bool Initialize(const ovrRenderAPIConfig* apiConfig) OVR_OVERRIDE; - virtual void SubmitEye(int eyeId, const ovrTexture* eyeTexture); + virtual void SubmitEye(int eyeId, const ovrTexture* eyeTexture) OVR_OVERRIDE; + virtual void SubmitEyeWithDepth(int eyeId, const ovrTexture* eyeColorTexture, const ovrTexture* eyeDepthTexture) OVR_OVERRIDE; - virtual void EndFrame(bool swapBuffers); + virtual void EndFrame(uint32_t frameIndex, bool swapBuffers); void WaitUntilGpuIdle(); @@ -68,7 +64,6 @@ public: double FlushGpuAndWaitTillTime(double absTime); protected: - struct FOR_EACH_EYE { FOR_EACH_EYE() : numVerts(0), numIndices(0), texture(0), /*UVScaleOffset[],*/ TextureSize(0, 0), RenderViewport(0, 0, 0, 0) { } @@ -90,9 +85,11 @@ protected: RenderParams RParams; Context distortionContext; // We are currently using this private OpenGL context instead of using the CAPI SaveGraphicsState/RestoreGraphicsState mechanism. To consider: Move this Context into SaveGraphicsState/RestoreGraphicState so there's consistency between DirectX and OpenGL. + virtual bool initializeRenderer(const ovrRenderAPIConfig* apiConfig) OVR_OVERRIDE; + // Helpers void initOverdrive(); - void initBuffersAndShaders(); + bool initBuffersAndShaders(); void initShaders(); void initFullscreenQuad(); void destroy(); @@ -119,8 +116,6 @@ protected: Ptr<ShaderSet> DistortionShader; - bool RotateCCW90; - struct StandardUniformData { Matrix4f Proj; @@ -145,6 +140,7 @@ protected: GLint SavedBoundFrameBuffer; }; + }}} // OVR::CAPI::GL #endif // OVR_CAPI_GL_DistortionRenderer_h |