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

Data Structures

struct  ShaderInfo
 
struct  DistortionVertex
 
struct  LatencyVertex
 
class  DistortionRenderer
 
struct  RenderParams
 
class  Buffer
 
class  Texture
 
class  Shader
 
class  ShaderSet
 
class  ShaderFill
 
struct  DisplayId
 
class  ShaderBase
 
class  ShaderImpl
 

Typedefs

typedef ShaderImpl
< Shader_Vertex,
GL_VERTEX_SHADER > 
VertexShader
 
typedef ShaderImpl
< Shader_Fragment,
GL_FRAGMENT_SHADER > 
FragmentShader
 

Enumerations

enum  { DistortionVertexShaderBitMask = 3, DistortionVertexShaderCount = DistortionVertexShaderBitMask + 1, DistortionPixelShaderBitMask = 1, DistortionPixelShaderCount = DistortionPixelShaderBitMask + 1 }
 
enum  PrimitiveType {
  Prim_Triangles, Prim_Lines, Prim_TriangleStrip, Prim_Unknown,
  Prim_Count
}
 
enum  ShaderStage { Shader_Vertex = 0, Shader_Fragment = 2, Shader_Pixel = 2, Shader_Count = 3 }
 
enum  MapFlags { Map_Discard = 1, Map_Read = 2, Map_Unsynchronized = 4 }
 
enum  BufferUsage {
  Buffer_Unknown = 0, Buffer_Vertex = 1, Buffer_Index = 2, Buffer_Uniform = 4,
  Buffer_TypeMask = 0xff, Buffer_ReadOnly = 0x100
}
 
enum  TextureFormat {
  Texture_RGBA = 0x0100, Texture_Depth = 0x8000, Texture_TypeMask = 0xff00, Texture_SamplesMask = 0x00ff,
  Texture_RenderTarget = 0x10000, Texture_GenMipmaps = 0x20000
}
 
enum  SampleMode {
  Sample_Linear = 0, Sample_Nearest = 1, Sample_Anisotropic = 2, Sample_FilterMask = 3,
  Sample_Repeat = 0, Sample_Clamp = 4, Sample_ClampBorder = 8, Sample_AddressMask =12,
  Sample_Count =13
}
 

Functions

void DistortionShaderBitIndexCheck ()
 
void InitGLExtensions ()
 

Variables

static ShaderInfo DistortionVertexShaderLookup [DistortionVertexShaderCount]
 
static ShaderInfo DistortionPixelShaderLookup [DistortionPixelShaderCount]
 
static const char glsl2Prefix []
 
static const char glsl3Prefix []
 
static const char SimpleQuad_vs []
 
const
OVR::CAPI::GL::ShaderBase::Uniform 
SimpleQuad_vs_refl []
 
static const char SimpleQuad_fs []
 
const
OVR::CAPI::GL::ShaderBase::Uniform 
SimpleQuad_fs_refl []
 
static const char Distortion_vs []
 
const
OVR::CAPI::GL::ShaderBase::Uniform 
Distortion_vs_refl []
 
static const char Distortion_fs []
 
static const char DistortionTimewarp_vs []
 
const
OVR::CAPI::GL::ShaderBase::Uniform 
DistortionTimewarp_vs_refl []
 
static const char DistortionChroma_vs []
 
const
OVR::CAPI::GL::ShaderBase::Uniform 
DistortionChroma_vs_refl []
 
static const char DistortionChroma_fs []
 
static const char DistortionTimewarpChroma_vs []
 
const
OVR::CAPI::GL::ShaderBase::Uniform 
DistortionTimewarpChroma_vs_refl []
 
PFNGLDELETESHADERPROC glDeleteShader
 
PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer
 
PFNGLACTIVETEXTUREPROC glActiveTexture
 
PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray
 
PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer
 
PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray
 
PFNGLBINDBUFFERPROC glBindBuffer
 
PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv
 
PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv
 
PFNGLDELETEBUFFERSPROC glDeleteBuffers
 
PFNGLBUFFERDATAPROC glBufferData
 
PFNGLGENBUFFERSPROC glGenBuffers
 
PFNGLMAPBUFFERPROC glMapBuffer
 
PFNGLUNMAPBUFFERPROC glUnmapBuffer
 
PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog
 
PFNGLGETSHADERIVPROC glGetShaderiv
 
PFNGLCOMPILESHADERPROC glCompileShader
 
PFNGLSHADERSOURCEPROC glShaderSource
 
PFNGLCREATESHADERPROC glCreateShader
 
PFNGLCREATEPROGRAMPROC glCreateProgram
 
PFNGLATTACHSHADERPROC glAttachShader
 
PFNGLDETACHSHADERPROC glDetachShader
 
PFNGLDELETEPROGRAMPROC glDeleteProgram
 
PFNGLUNIFORM1IPROC glUniform1i
 
PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation
 
PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform
 
PFNGLUSEPROGRAMPROC glUseProgram
 
PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog
 
PFNGLGETPROGRAMIVPROC glGetProgramiv
 
PFNGLLINKPROGRAMPROC glLinkProgram
 
PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation
 
PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation
 
PFNGLUNIFORM4FVPROC glUniform4fv
 
PFNGLUNIFORM3FVPROC glUniform3fv
 
PFNGLUNIFORM2FVPROC glUniform2fv
 
PFNGLUNIFORM1FVPROC glUniform1fv
 
PFNGLGENVERTEXARRAYSPROC glGenVertexArrays
 
PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays
 
PFNGLBINDVERTEXARRAYPROC glBindVertexArray
 
void(*)(void) GetFunction (const char *functionName)
 

Data Structure Documentation

struct OVR::CAPI::GL::ShaderInfo

Definition at line 35 of file CAPI_GL_DistortionRenderer.cpp.

Collaboration diagram for OVR::CAPI::GL::ShaderInfo:
Collaboration graph
Data Fields
const Uniform * ReflectionData
size_t ReflectionSize
const char * ShaderData
size_t ShaderSize
struct OVR::CAPI::GL::DistortionVertex

Definition at line 70 of file CAPI_GL_DistortionRenderer.cpp.

Collaboration diagram for OVR::CAPI::GL::DistortionVertex:
Collaboration graph
Data Fields
Color Col
Vector2f Pos
Vector2f TexB
Vector2f TexG
Vector2f TexR
struct OVR::CAPI::GL::RenderParams

Definition at line 222 of file CAPI_GL_Util.h.

Collaboration diagram for OVR::CAPI::GL::RenderParams:
Collaboration graph
Data Fields
int Multisample
ovrSizei RTSize

Typedef Documentation

Definition at line 533 of file CAPI_GL_Util.h.

Definition at line 532 of file CAPI_GL_Util.h.

Enumeration Type Documentation

anonymous enum
Enumerator
DistortionVertexShaderBitMask 
DistortionVertexShaderCount 
DistortionPixelShaderBitMask 
DistortionPixelShaderCount 

Definition at line 28 of file CAPI_GL_DistortionRenderer.cpp.

Enumerator
Buffer_Unknown 
Buffer_Vertex 
Buffer_Index 
Buffer_Uniform 
Buffer_TypeMask 
Buffer_ReadOnly 

Definition at line 184 of file CAPI_GL_Util.h.

Enumerator
Map_Discard 
Map_Read 
Map_Unsynchronized 

Definition at line 175 of file CAPI_GL_Util.h.

Enumerator
Prim_Triangles 
Prim_Lines 
Prim_TriangleStrip 
Prim_Unknown 
Prim_Count 

Definition at line 157 of file CAPI_GL_Util.h.

Enumerator
Sample_Linear 
Sample_Nearest 
Sample_Anisotropic 
Sample_FilterMask 
Sample_Repeat 
Sample_Clamp 
Sample_ClampBorder 
Sample_AddressMask 
Sample_Count 

Definition at line 205 of file CAPI_GL_Util.h.

Enumerator
Shader_Vertex 
Shader_Fragment 
Shader_Pixel 
Shader_Count 

Definition at line 167 of file CAPI_GL_Util.h.

Enumerator
Texture_RGBA 
Texture_Depth 
Texture_TypeMask 
Texture_SamplesMask 
Texture_RenderTarget 
Texture_GenMipmaps 

Definition at line 194 of file CAPI_GL_Util.h.

Function Documentation

void OVR::CAPI::GL::DistortionShaderBitIndexCheck ( )

Definition at line 62 of file CAPI_GL_DistortionRenderer.cpp.

void OVR::CAPI::GL::InitGLExtensions ( )

Definition at line 124 of file CAPI_GL_Util.cpp.

Variable Documentation

const char OVR::CAPI::GL::Distortion_fs[]
static
Initial value:
=
"uniform sampler2D Texture0;\n"
"_FS_IN vec4 oColor;\n"
"_FS_IN vec2 oTexCoord0;\n"
"_FRAGCOLOR_DECLARATION\n"
"void main()\n"
"{\n"
" _FRAGCOLOR = _TEXTURELOD(Texture0, oTexCoord0, 0.0);\n"
" _FRAGCOLOR.a = 1.0;\n"
"}\n"

Definition at line 107 of file CAPI_GL_DistortionShaders.h.

const char OVR::CAPI::GL::Distortion_vs[]
static
Initial value:
=
"uniform vec2 EyeToSourceUVScale;\n"
"uniform vec2 EyeToSourceUVOffset;\n"
"_VS_IN vec2 Position;\n"
"_VS_IN vec4 Color;\n"
"_VS_IN vec2 TexCoord0;\n"
"_VS_OUT vec4 oColor;\n"
"_VS_OUT vec2 oTexCoord0;\n"
"void main()\n"
"{\n"
" gl_Position.x = Position.x;\n"
" gl_Position.y = Position.y;\n"
" gl_Position.z = 0.5;\n"
" gl_Position.w = 1.0;\n"
" oTexCoord0 = TexCoord0 * EyeToSourceUVScale + EyeToSourceUVOffset;\n"
" oTexCoord0.y = 1.0 - oTexCoord0.y;\n"
" oColor = Color;\n"
"}\n"

Definition at line 77 of file CAPI_GL_DistortionShaders.h.

const OVR::CAPI::GL::ShaderBase::Uniform OVR::CAPI::GL::Distortion_vs_refl[]
Initial value:

Definition at line 101 of file CAPI_GL_DistortionShaders.h.

const char OVR::CAPI::GL::DistortionChroma_fs[]
static
Initial value:
=
"uniform sampler2D Texture0;\n"
"_FS_IN vec4 oColor;\n"
"_FS_IN vec2 oTexCoord0;\n"
"_FS_IN vec2 oTexCoord1;\n"
"_FS_IN vec2 oTexCoord2;\n"
"_FRAGCOLOR_DECLARATION\n"
"void main()\n"
"{\n"
" float ResultR = _TEXTURELOD(Texture0, oTexCoord0, 0.0).r;\n"
" float ResultG = _TEXTURELOD(Texture0, oTexCoord1, 0.0).g;\n"
" float ResultB = _TEXTURELOD(Texture0, oTexCoord2, 0.0).b;\n"
" _FRAGCOLOR = vec4(ResultR * oColor.r, ResultG * oColor.g, ResultB * oColor.b, 1.0);\n"
"}\n"

Definition at line 217 of file CAPI_GL_DistortionShaders.h.

const char OVR::CAPI::GL::DistortionChroma_vs[]
static

Definition at line 177 of file CAPI_GL_DistortionShaders.h.

const OVR::CAPI::GL::ShaderBase::Uniform OVR::CAPI::GL::DistortionChroma_vs_refl[]
Initial value:

Definition at line 211 of file CAPI_GL_DistortionShaders.h.

ShaderInfo OVR::CAPI::GL::DistortionPixelShaderLookup[DistortionPixelShaderCount]
static
Initial value:
=
{
}
#define SI_NOREFL(shader)
static const char Distortion_fs[]

Definition at line 56 of file CAPI_GL_DistortionRenderer.cpp.

const char OVR::CAPI::GL::DistortionTimewarp_vs[]
static

Definition at line 122 of file CAPI_GL_DistortionShaders.h.

const OVR::CAPI::GL::ShaderBase::Uniform OVR::CAPI::GL::DistortionTimewarp_vs_refl[]
Initial value:

Definition at line 171 of file CAPI_GL_DistortionShaders.h.

const char OVR::CAPI::GL::DistortionTimewarpChroma_vs[]
static

Definition at line 237 of file CAPI_GL_DistortionShaders.h.

const OVR::CAPI::GL::ShaderBase::Uniform OVR::CAPI::GL::DistortionTimewarpChroma_vs_refl[]
Initial value:
=
{
{ "EyeToSourceUVScale", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 0, 8 },
{ "EyeToSourceUVOffset", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 8, 8 },
{ "EyeRotationStart", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 16, 64 },
{ "EyeRotationEnd", OVR::CAPI::GL::ShaderBase::VARTYPE_FLOAT, 80, 64 },
}

Definition at line 316 of file CAPI_GL_DistortionShaders.h.

ShaderInfo OVR::CAPI::GL::DistortionVertexShaderLookup[DistortionVertexShaderCount]
static
Initial value:
=
{
}
static const char Distortion_vs[]
static const char DistortionTimewarp_vs[]
#define SI_REFL__(shader)
static const char DistortionChroma_vs[]

Definition at line 48 of file CAPI_GL_DistortionRenderer.cpp.

void(*)( void ) OVR::CAPI::GL::GetFunction(const char *functionName)

Definition at line 117 of file CAPI_GL_Util.cpp.

PFNGLACTIVETEXTUREPROC OVR::CAPI::GL::glActiveTexture

Definition at line 69 of file CAPI_GL_Util.cpp.

PFNGLATTACHSHADERPROC OVR::CAPI::GL::glAttachShader

Definition at line 87 of file CAPI_GL_Util.cpp.

PFNGLBINDATTRIBLOCATIONPROC OVR::CAPI::GL::glBindAttribLocation

Definition at line 97 of file CAPI_GL_Util.cpp.

PFNGLBINDBUFFERPROC OVR::CAPI::GL::glBindBuffer

Definition at line 73 of file CAPI_GL_Util.cpp.

PFNGLBINDFRAMEBUFFERPROC OVR::CAPI::GL::glBindFramebuffer

Definition at line 68 of file CAPI_GL_Util.cpp.

PFNGLBINDVERTEXARRAYPROC OVR::CAPI::GL::glBindVertexArray

Definition at line 105 of file CAPI_GL_Util.cpp.

PFNGLBUFFERDATAPROC OVR::CAPI::GL::glBufferData

Definition at line 77 of file CAPI_GL_Util.cpp.

PFNGLCOMPILESHADERPROC OVR::CAPI::GL::glCompileShader

Definition at line 83 of file CAPI_GL_Util.cpp.

PFNGLCREATEPROGRAMPROC OVR::CAPI::GL::glCreateProgram

Definition at line 86 of file CAPI_GL_Util.cpp.

PFNGLCREATESHADERPROC OVR::CAPI::GL::glCreateShader

Definition at line 85 of file CAPI_GL_Util.cpp.

PFNGLDELETEBUFFERSPROC OVR::CAPI::GL::glDeleteBuffers

Definition at line 76 of file CAPI_GL_Util.cpp.

PFNGLDELETEPROGRAMPROC OVR::CAPI::GL::glDeleteProgram

Definition at line 89 of file CAPI_GL_Util.cpp.

PFNGLDELETESHADERPROC OVR::CAPI::GL::glDeleteShader

Definition at line 67 of file CAPI_GL_Util.cpp.

PFNGLDELETEVERTEXARRAYSPROC OVR::CAPI::GL::glDeleteVertexArrays

Definition at line 104 of file CAPI_GL_Util.cpp.

PFNGLDETACHSHADERPROC OVR::CAPI::GL::glDetachShader

Definition at line 88 of file CAPI_GL_Util.cpp.

PFNGLDISABLEVERTEXATTRIBARRAYPROC OVR::CAPI::GL::glDisableVertexAttribArray

Definition at line 70 of file CAPI_GL_Util.cpp.

PFNGLENABLEVERTEXATTRIBARRAYPROC OVR::CAPI::GL::glEnableVertexAttribArray

Definition at line 72 of file CAPI_GL_Util.cpp.

PFNGLGENBUFFERSPROC OVR::CAPI::GL::glGenBuffers

Definition at line 78 of file CAPI_GL_Util.cpp.

PFNGLGENVERTEXARRAYSPROC OVR::CAPI::GL::glGenVertexArrays

Definition at line 103 of file CAPI_GL_Util.cpp.

PFNGLGETACTIVEUNIFORMPROC OVR::CAPI::GL::glGetActiveUniform

Definition at line 92 of file CAPI_GL_Util.cpp.

PFNGLGETATTRIBLOCATIONPROC OVR::CAPI::GL::glGetAttribLocation

Definition at line 98 of file CAPI_GL_Util.cpp.

PFNGLGETPROGRAMINFOLOGPROC OVR::CAPI::GL::glGetProgramInfoLog

Definition at line 94 of file CAPI_GL_Util.cpp.

PFNGLGETPROGRAMIVPROC OVR::CAPI::GL::glGetProgramiv

Definition at line 95 of file CAPI_GL_Util.cpp.

PFNGLGETSHADERINFOLOGPROC OVR::CAPI::GL::glGetShaderInfoLog

Definition at line 81 of file CAPI_GL_Util.cpp.

PFNGLGETSHADERIVPROC OVR::CAPI::GL::glGetShaderiv

Definition at line 82 of file CAPI_GL_Util.cpp.

PFNGLGETUNIFORMLOCATIONPROC OVR::CAPI::GL::glGetUniformLocation

Definition at line 91 of file CAPI_GL_Util.cpp.

PFNGLLINKPROGRAMPROC OVR::CAPI::GL::glLinkProgram

Definition at line 96 of file CAPI_GL_Util.cpp.

PFNGLMAPBUFFERPROC OVR::CAPI::GL::glMapBuffer

Definition at line 79 of file CAPI_GL_Util.cpp.

PFNGLSHADERSOURCEPROC OVR::CAPI::GL::glShaderSource

Definition at line 84 of file CAPI_GL_Util.cpp.

const char OVR::CAPI::GL::glsl2Prefix[]
static
Initial value:
=
"#version 110\n"
"#extension GL_ARB_shader_texture_lod : enable\n"
"#define _FRAGCOLOR_DECLARATION\n"
"#define _VS_IN attribute\n"
"#define _VS_OUT varying\n"
"#define _FS_IN varying\n"
"#define _TEXTURELOD texture2DLod\n"
"#define _FRAGCOLOR gl_FragColor\n"

Definition at line 25 of file CAPI_GL_DistortionShaders.h.

const char OVR::CAPI::GL::glsl3Prefix[]
static
Initial value:
=
"#version 150\n"
"#define _FRAGCOLOR_DECLARATION out vec4 FragColor;\n"
"#define _VS_IN in\n"
"#define _VS_OUT out\n"
"#define _FS_IN in\n"
"#define _TEXTURELOD textureLod\n"
"#define _FRAGCOLOR FragColor\n"

Definition at line 35 of file CAPI_GL_DistortionShaders.h.

PFNGLUNIFORM1FVPROC OVR::CAPI::GL::glUniform1fv

Definition at line 102 of file CAPI_GL_Util.cpp.

PFNGLUNIFORM1IPROC OVR::CAPI::GL::glUniform1i

Definition at line 90 of file CAPI_GL_Util.cpp.

PFNGLUNIFORM2FVPROC OVR::CAPI::GL::glUniform2fv

Definition at line 101 of file CAPI_GL_Util.cpp.

PFNGLUNIFORM3FVPROC OVR::CAPI::GL::glUniform3fv

Definition at line 100 of file CAPI_GL_Util.cpp.

PFNGLUNIFORM4FVPROC OVR::CAPI::GL::glUniform4fv

Definition at line 99 of file CAPI_GL_Util.cpp.

PFNGLUNIFORMMATRIX3FVPROC OVR::CAPI::GL::glUniformMatrix3fv

Definition at line 74 of file CAPI_GL_Util.cpp.

PFNGLUNIFORMMATRIX4FVPROC OVR::CAPI::GL::glUniformMatrix4fv

Definition at line 75 of file CAPI_GL_Util.cpp.

PFNGLUNMAPBUFFERPROC OVR::CAPI::GL::glUnmapBuffer

Definition at line 80 of file CAPI_GL_Util.cpp.

PFNGLUSEPROGRAMPROC OVR::CAPI::GL::glUseProgram

Definition at line 93 of file CAPI_GL_Util.cpp.

PFNGLVERTEXATTRIBPOINTERPROC OVR::CAPI::GL::glVertexAttribPointer

Definition at line 71 of file CAPI_GL_Util.cpp.

const char OVR::CAPI::GL::SimpleQuad_fs[]
static
Initial value:
=
"uniform vec4 Color;\n"
"_FRAGCOLOR_DECLARATION\n"
"void main()\n"
"{\n"
" _FRAGCOLOR = Color;\n"
"}\n"

Definition at line 61 of file CAPI_GL_DistortionShaders.h.

const OVR::CAPI::GL::ShaderBase::Uniform OVR::CAPI::GL::SimpleQuad_fs_refl[]
Initial value:

Definition at line 71 of file CAPI_GL_DistortionShaders.h.

const char OVR::CAPI::GL::SimpleQuad_vs[]
static
Initial value:
=
"uniform vec2 PositionOffset;\n"
"uniform vec2 Scale;\n"
"_VS_IN vec3 Position;\n"
"void main()\n"
"{\n"
" gl_Position = vec4(Position.xy * Scale + PositionOffset, 0.5, 1.0);\n"
"}\n"

Definition at line 44 of file CAPI_GL_DistortionShaders.h.

const OVR::CAPI::GL::ShaderBase::Uniform OVR::CAPI::GL::SimpleQuad_vs_refl[]
Initial value:

Definition at line 55 of file CAPI_GL_DistortionShaders.h.