diff options
author | Sven Gothel <[email protected]> | 2015-03-28 01:43:35 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-03-28 01:43:35 +0100 |
commit | 4207f9c279e832e3afcb3f5fc6cd8d84cb4cfe4c (patch) | |
tree | cf3671058d55b47ab6cb6f36f369928606137628 /LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h | |
parent | c29cd1a2fbff6282bab956ad61661ac9d48c4e6e (diff) |
Bump OculusVR RIFT SDK to 0.5.0.1vanilla_0.5.0.1
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 |