16 #ifndef OVR_CAPI_GL_DistortionRenderer_h
17 #define OVR_CAPI_GL_DistortionRenderer_h
19 #include "../CAPI_DistortionRenderer.h"
21 #include "../../Kernel/OVR_Log.h"
24 namespace OVR {
namespace CAPI {
namespace GL {
48 unsigned distortionCaps);
52 virtual void EndFrame(
bool swapBuffers,
unsigned char* latencyTesterDrawColor,
unsigned char* latencyTester2DrawColor);
109 IDirect3DVertexBuffer9 * dxVerts;
110 IDirect3DIndexBuffer9 * dxIndices;
136 int offset,
int count,
178 #endif // OVR_CAPI_GL_DistortionRenderer_h
void initFullscreenQuad()
void ApplyBool(GLenum Name, GLint Value)
virtual void SubmitEye(int eyeId, ovrTexture *eyeTexture)
struct OVR::CAPI::GL::DistortionRenderer::StandardUniformData StdUniforms
GLuint DistortionMeshVAOs[2]
Ptr< Buffer > DistortionMeshVBs[2]
Ptr< ShaderSet > SimpleQuadShader
void renderDistortion(Texture *leftEyeTexture, Texture *rightEyeTexture)
static CAPI::DistortionRenderer * Create(ovrHmd hmd, FrameTimeManager &timeManager, const HMDRenderState &renderState)
Ptr< Buffer > LatencyTesterQuadVB
Array< Ptr< Texture > > DepthBuffers
ovrVector2f UVScaleOffset[2]
void renderLatencyQuad(unsigned char *latencyTesterDrawColor)
Ptr< Texture > CurRenderTarget
GLint SavedBoundFrameBuffer
void renderLatencyPixel(unsigned char *latencyTesterPixelColor)
Ptr< ShaderSet > DistortionShader
virtual void EndFrame(bool swapBuffers, unsigned char *latencyTesterDrawColor, unsigned char *latencyTester2DrawColor)
DistortionRenderer(ovrHmd hmd, FrameTimeManager &timeManager, const HMDRenderState &renderState)
Ptr< Texture > pEyeTextures[2]
Ptr< Buffer > DistortionMeshIBs[2]
GLfloat SavedClearColor[4]
void initBuffersAndShaders()
void setViewport(const Recti &vp)
virtual bool Initialize(const ovrRenderAPIConfig *apiConfig, unsigned distortionCaps)
void renderPrimitives(const ShaderFill *fill, Buffer *vertices, Buffer *indices, int offset, int count, PrimitiveType rprim, GLuint *vao, bool isDistortionMesh)
struct OVR::CAPI::GL::DistortionRenderer::FOR_EACH_EYE eachEye[2]
double FlushGpuAndWaitTillTime(double absTime)