aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h')
-rw-r--r--LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h36
1 files changed, 24 insertions, 12 deletions
diff --git a/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h b/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h
index 1017c6e..2c1646f 100644
--- a/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h
+++ b/LibOVR/Src/CAPI/GL/CAPI_GL_DistortionRenderer.h
@@ -5,12 +5,23 @@ Content : Distortion renderer header for GL
Created : November 11, 2013
Authors : David Borel, Lee Cooper
-Copyright : Copyright 2013 Oculus VR, Inc. All Rights reserved.
+Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
-Use of this software is subject to the terms of the Oculus Inc license
-agreement provided at the time of installation or download, or which
+Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License");
+you may not use the Oculus VR Rift SDK except in compliance with the License,
+which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
+You may obtain a copy of the License at
+
+http://www.oculusvr.com/licenses/LICENSE-3.2
+
+Unless required by applicable law or agreed to in writing, the Oculus VR SDK
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
************************************************************************************/
#ifndef OVR_CAPI_GL_DistortionRenderer_h
@@ -44,8 +55,7 @@ public:
// ***** Public DistortionRenderer interface
- virtual bool Initialize(const ovrRenderAPIConfig* apiConfig,
- unsigned distortionCaps);
+ virtual bool Initialize(const ovrRenderAPIConfig* apiConfig) OVR_OVERRIDE;
virtual void SubmitEye(int eyeId, const ovrTexture* eyeTexture);
@@ -105,9 +115,6 @@ protected:
GLfloat ZoomY;
};
- // TBD: Should we be using oe from RState instead?
- unsigned DistortionCaps;
-
struct FOR_EACH_EYE
{
FOR_EACH_EYE() : TextureSize(0), RenderViewport(Sizei(0)) { }
@@ -126,10 +133,15 @@ protected:
Recti RenderViewport;
} eachEye[2];
+ Ptr<Texture> pOverdriveTextures[NumOverdriveTextures];
+ Ptr<Texture> OverdriveBackBufferTexture;
+
// GL context and utility variables.
- RenderParams RParams;
+ RenderParams RParams;
+ Context distortionContext;
// Helpers
+ void initOverdrive();
void initBuffersAndShaders();
void initShaders();
void initFullscreenQuad();
@@ -157,6 +169,8 @@ protected:
Ptr<ShaderSet> DistortionShader;
+ bool RotateCCW90;
+
struct StandardUniformData
{
Matrix4f Proj;
@@ -168,9 +182,7 @@ protected:
Ptr<ShaderSet> SimpleQuadShader;
Ptr<ShaderSet> SimpleQuadGammaShader;
- Ptr<Texture> CurRenderTarget;
- Array<Ptr<Texture> > DepthBuffers;
- GLuint CurrentFbo;
+ GLuint OverdriveFbo;
GLint SavedViewport[4];
GLfloat SavedClearColor[4];