Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OVR::CAPI::GL::DistortionRenderer Class Reference

#include "CAPI_GL_DistortionRenderer.h"

Inheritance diagram for OVR::CAPI::GL::DistortionRenderer:
Inheritance graph
Collaboration diagram for OVR::CAPI::GL::DistortionRenderer:
Collaboration graph

Data Structures

struct  FOR_EACH_EYE
 
class  GraphicsState
 
struct  StandardUniformData
 

Public Member Functions

 DistortionRenderer (ovrHmd hmd, FrameTimeManager &timeManager, const HMDRenderState &renderState)
 
 ~DistortionRenderer ()
 
virtual bool Initialize (const ovrRenderAPIConfig *apiConfig, unsigned distortionCaps)
 
virtual void SubmitEye (int eyeId, ovrTexture *eyeTexture)
 
virtual void EndFrame (bool swapBuffers, unsigned char *latencyTesterDrawColor, unsigned char *latencyTester2DrawColor)
 
void WaitUntilGpuIdle ()
 
double FlushGpuAndWaitTillTime (double absTime)
 
- Public Member Functions inherited from OVR::CAPI::DistortionRenderer
 DistortionRenderer (ovrRenderAPIType api, ovrHmd hmd, FrameTimeManager &timeManager, const HMDRenderState &renderState)
 
void SaveGraphicsState ()
 
void RestoreGraphicsState ()
 
ovrRenderAPIType GetRenderAPI () const
 
- Public Member Functions inherited from OVR::RefCountBase< DistortionRenderer >
OVR_FORCE_INLINE RefCountBase ()
 
- Public Member Functions inherited from OVR::RefCountBaseStatImpl< RefCountImpl >
 RefCountBaseStatImpl ()
 
- Public Member Functions inherited from OVR::RefCountImpl
void AddRef ()
 
void Release ()
 
- Public Member Functions inherited from OVR::RefCountImplCore
OVR_FORCE_INLINE RefCountImplCore ()
 
virtual ~RefCountImplCore ()
 
int GetRefCount () const
 
void operator= (const RefCountImplCore &)
 

Static Public Member Functions

static CAPI::DistortionRendererCreate (ovrHmd hmd, FrameTimeManager &timeManager, const HMDRenderState &renderState)
 
- Static Public Member Functions inherited from OVR::RefCountImplCore
static void checkInvalidDelete (RefCountImplCore *)
 

Protected Member Functions

void initBuffersAndShaders ()
 
void initShaders ()
 
void initFullscreenQuad ()
 
void destroy ()
 
void setViewport (const Recti &vp)
 
void renderDistortion (Texture *leftEyeTexture, Texture *rightEyeTexture)
 
void renderPrimitives (const ShaderFill *fill, Buffer *vertices, Buffer *indices, int offset, int count, PrimitiveType rprim, GLuint *vao, bool isDistortionMesh)
 
void createDrawQuad ()
 
void renderLatencyQuad (unsigned char *latencyTesterDrawColor)
 
void renderLatencyPixel (unsigned char *latencyTesterPixelColor)
 

Protected Attributes

unsigned DistortionCaps
 
struct
OVR::CAPI::GL::DistortionRenderer::FOR_EACH_EYE 
eachEye [2]
 
RenderParams RParams
 
Ptr< TexturepEyeTextures [2]
 
Ptr< BufferDistortionMeshVBs [2]
 
Ptr< BufferDistortionMeshIBs [2]
 
GLuint DistortionMeshVAOs [2]
 
Ptr< ShaderSetDistortionShader
 
struct
OVR::CAPI::GL::DistortionRenderer::StandardUniformData 
StdUniforms
 
GLuint LatencyVAO
 
Ptr< BufferLatencyTesterQuadVB
 
Ptr< ShaderSetSimpleQuadShader
 
Ptr< TextureCurRenderTarget
 
Array< Ptr< Texture > > DepthBuffers
 
GLuint CurrentFbo
 
GLint SavedViewport [4]
 
GLfloat SavedClearColor [4]
 
GLint SavedDepthTest
 
GLint SavedCullFace
 
GLint SavedProgram
 
GLint SavedActiveTexture
 
GLint SavedBoundTexture
 
GLint SavedVertexArray
 
GLint SavedBoundFrameBuffer
 
- Protected Attributes inherited from OVR::CAPI::DistortionRenderer
const ovrRenderAPIType RenderAPI
 
const ovrHmd HMD
 
FrameTimeManagerTimeManager
 
const HMDRenderStateRState
 
Ptr< GraphicsStateGfxState
 
- Protected Attributes inherited from OVR::RefCountImplCore
volatile int RefCount
 

Additional Inherited Members

- Public Types inherited from OVR::CAPI::DistortionRenderer
typedef DistortionRenderer *(* CreateFunc )(ovrHmd hmd, FrameTimeManager &timeManager, const HMDRenderState &renderState)
 
- Static Public Attributes inherited from OVR::CAPI::DistortionRenderer
static CreateFunc APICreateRegistry [ovrRenderAPI_Count]
 

Detailed Description

Definition at line 30 of file CAPI_GL_DistortionRenderer.h.


Data Structure Documentation

struct OVR::CAPI::GL::DistortionRenderer::StandardUniformData

Definition at line 151 of file CAPI_GL_DistortionRenderer.h.

Collaboration diagram for OVR::CAPI::GL::DistortionRenderer::StandardUniformData:
Collaboration graph
Data Fields
Matrix4f Proj
Matrix4f View

Constructor & Destructor Documentation

OVR::CAPI::GL::DistortionRenderer::DistortionRenderer ( ovrHmd  hmd,
FrameTimeManager timeManager,
const HMDRenderState renderState 
)

Definition at line 92 of file CAPI_GL_DistortionRenderer.cpp.

OVR::CAPI::GL::DistortionRenderer::~DistortionRenderer ( )
virtual

Reimplemented from OVR::CAPI::DistortionRenderer.

Definition at line 101 of file CAPI_GL_DistortionRenderer.cpp.

Member Function Documentation

CAPI::DistortionRenderer * OVR::CAPI::GL::DistortionRenderer::Create ( ovrHmd  hmd,
FrameTimeManager timeManager,
const HMDRenderState renderState 
)
static

Definition at line 107 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::createDrawQuad ( )
protected

Definition at line 500 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::destroy ( )
protected

Definition at line 758 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::EndFrame ( bool  swapBuffers,
unsigned char *  latencyTesterDrawColor,
unsigned char *  latencyTester2DrawColor 
)
virtual

Implements OVR::CAPI::DistortionRenderer.

Definition at line 187 of file CAPI_GL_DistortionRenderer.cpp.

double OVR::CAPI::GL::DistortionRenderer::FlushGpuAndWaitTillTime ( double  absTime)

Definition at line 265 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::initBuffersAndShaders ( )
protected

Definition at line 393 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::initFullscreenQuad ( )
protected
bool OVR::CAPI::GL::DistortionRenderer::Initialize ( const ovrRenderAPIConfig apiConfig,
unsigned  distortionCaps 
)
virtual

Implements OVR::CAPI::DistortionRenderer.

Definition at line 118 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::initShaders ( )
protected

Definition at line 683 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::renderDistortion ( Texture leftEyeTexture,
Texture rightEyeTexture 
)
protected

Definition at line 445 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::renderLatencyPixel ( unsigned char *  latencyTesterPixelColor)
protected

Definition at line 557 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::renderLatencyQuad ( unsigned char *  latencyTesterDrawColor)
protected

Definition at line 530 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::renderPrimitives ( const ShaderFill fill,
Buffer vertices,
Buffer indices,
int  offset,
int  count,
PrimitiveType  rprim,
GLuint *  vao,
bool  isDistortionMesh 
)
protected

Definition at line 581 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::setViewport ( const Recti vp)
protected

Definition at line 677 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::SubmitEye ( int  eyeId,
ovrTexture eyeTexture 
)
virtual

Implements OVR::CAPI::DistortionRenderer.

Definition at line 161 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::DistortionRenderer::WaitUntilGpuIdle ( )

Definition at line 259 of file CAPI_GL_DistortionRenderer.cpp.

Field Documentation

Ptr<Texture> OVR::CAPI::GL::DistortionRenderer::CurRenderTarget
protected

Definition at line 161 of file CAPI_GL_DistortionRenderer.h.

GLuint OVR::CAPI::GL::DistortionRenderer::CurrentFbo
protected

Definition at line 163 of file CAPI_GL_DistortionRenderer.h.

Array<Ptr<Texture> > OVR::CAPI::GL::DistortionRenderer::DepthBuffers
protected

Definition at line 162 of file CAPI_GL_DistortionRenderer.h.

unsigned OVR::CAPI::GL::DistortionRenderer::DistortionCaps
protected

Definition at line 102 of file CAPI_GL_DistortionRenderer.h.

Ptr<Buffer> OVR::CAPI::GL::DistortionRenderer::DistortionMeshIBs[2]
protected

Definition at line 146 of file CAPI_GL_DistortionRenderer.h.

GLuint OVR::CAPI::GL::DistortionRenderer::DistortionMeshVAOs[2]
protected

Definition at line 147 of file CAPI_GL_DistortionRenderer.h.

Ptr<Buffer> OVR::CAPI::GL::DistortionRenderer::DistortionMeshVBs[2]
protected

Definition at line 145 of file CAPI_GL_DistortionRenderer.h.

Ptr<ShaderSet> OVR::CAPI::GL::DistortionRenderer::DistortionShader
protected

Definition at line 149 of file CAPI_GL_DistortionRenderer.h.

struct OVR::CAPI::GL::DistortionRenderer::FOR_EACH_EYE OVR::CAPI::GL::DistortionRenderer::eachEye[2]
protected
Ptr<Buffer> OVR::CAPI::GL::DistortionRenderer::LatencyTesterQuadVB
protected

Definition at line 158 of file CAPI_GL_DistortionRenderer.h.

GLuint OVR::CAPI::GL::DistortionRenderer::LatencyVAO
protected

Definition at line 157 of file CAPI_GL_DistortionRenderer.h.

Ptr<Texture> OVR::CAPI::GL::DistortionRenderer::pEyeTextures[2]
protected

Definition at line 143 of file CAPI_GL_DistortionRenderer.h.

RenderParams OVR::CAPI::GL::DistortionRenderer::RParams
protected

Definition at line 123 of file CAPI_GL_DistortionRenderer.h.

GLint OVR::CAPI::GL::DistortionRenderer::SavedActiveTexture
protected

Definition at line 170 of file CAPI_GL_DistortionRenderer.h.

GLint OVR::CAPI::GL::DistortionRenderer::SavedBoundFrameBuffer
protected

Definition at line 173 of file CAPI_GL_DistortionRenderer.h.

GLint OVR::CAPI::GL::DistortionRenderer::SavedBoundTexture
protected

Definition at line 171 of file CAPI_GL_DistortionRenderer.h.

GLfloat OVR::CAPI::GL::DistortionRenderer::SavedClearColor[4]
protected

Definition at line 166 of file CAPI_GL_DistortionRenderer.h.

GLint OVR::CAPI::GL::DistortionRenderer::SavedCullFace
protected

Definition at line 168 of file CAPI_GL_DistortionRenderer.h.

GLint OVR::CAPI::GL::DistortionRenderer::SavedDepthTest
protected

Definition at line 167 of file CAPI_GL_DistortionRenderer.h.

GLint OVR::CAPI::GL::DistortionRenderer::SavedProgram
protected

Definition at line 169 of file CAPI_GL_DistortionRenderer.h.

GLint OVR::CAPI::GL::DistortionRenderer::SavedVertexArray
protected

Definition at line 172 of file CAPI_GL_DistortionRenderer.h.

GLint OVR::CAPI::GL::DistortionRenderer::SavedViewport[4]
protected

Definition at line 165 of file CAPI_GL_DistortionRenderer.h.

Ptr<ShaderSet> OVR::CAPI::GL::DistortionRenderer::SimpleQuadShader
protected

Definition at line 159 of file CAPI_GL_DistortionRenderer.h.

struct OVR::CAPI::GL::DistortionRenderer::StandardUniformData OVR::CAPI::GL::DistortionRenderer::StdUniforms
protected

The documentation for this class was generated from the following files: