#include <Render_Device.h>
Public Types | |
enum | CompareFunc { Compare_Always = 0, Compare_Less = 1, Compare_Greater = 2, Compare_Count } |
enum | PostProcessShader { PostProcessShader_Distortion = 0, PostProcessShader_DistortionAndChromAb = 1, PostProcessShader_Count } |
Public Member Functions | |
void | ApplyStereoParams (const StereoEyeParams ¶ms) |
void | ApplyStereoParams2D (const StereoEyeParams ¶ms) |
virtual void | BeginRendering () |
virtual void | BeginScene (PostProcessType pp=PostProcess_None) |
virtual void | Clear (float r=0, float g=0, float b=0, float a=1, float depth=1)=0 |
void | Clear (const Color &c, float depth=1) |
virtual Buffer * | CreateBuffer () |
virtual ShaderSet * | CreateShaderSet () |
virtual Fill * | CreateSimpleFill (int flags=Fill::F_Solid)=0 |
virtual Texture * | CreateTexture (int format, int width, int height, const void *data, int mipcount=1) |
Fill * | CreateTextureFill (Texture *tex, bool useAlpha=false) |
virtual void | FillGradientRect (float left, float top, float right, float bottom, Color col_top, Color col_btm) |
virtual void | FillRect (float left, float top, float right, float bottom, Color c) |
virtual void | FinishScene () |
virtual void | ForceFlushGPU () |
const RendererParams & | GetParams () const |
PostProcessShader | GetPostProcessShader () |
virtual Matrix4f | GetProjection () const |
virtual bool | GetSamplePositions (Render::Texture *, Vector3f *pos) |
UPInt | GetTotalTextureMemoryUsage () const |
virtual void | Init () |
virtual bool | IsFullscreen () const |
virtual Shader * | LoadBuiltinShader (ShaderStage stage, int shader)=0 |
float | MeasureText (const Font *font, const char *str, float size, float *strsize=NULL) |
virtual void | Present ()=0 |
virtual void | Rect (float left, float top, float right, float bottom)=0 |
virtual void | Render (const Matrix4f &matrix, Model *model)=0 |
virtual void | Render (const Fill *fill, Buffer *vertices, Buffer *indices, const Matrix4f &matrix, int offset, int count, PrimitiveType prim=Prim_Triangles)=0 |
RenderDevice () | |
virtual void | RenderImage (float left, float top, float right, float bottom, ShaderFill *image, unsigned char alpha=255) |
virtual void | RenderText (const Font *font, const char *str, float x, float y, float size, Color c) |
virtual void | RenderWithAlpha (const Fill *fill, Render::Buffer *vertices, Render::Buffer *indices, const Matrix4f &matrix, int offset, int count, PrimitiveType prim=Prim_Triangles)=0 |
virtual void | SetCommonUniformBuffer (int i, Buffer *buffer) |
virtual void | SetDepthMode (bool enable, bool write, CompareFunc func=Compare_Less)=0 |
void | SetDistortionClearColor (Color clearColor) |
void | SetDistortionConfig (const DistortionConfig &config, StereoEye eye=StereoEye_Left) |
virtual void | SetExtraShaders (ShaderSet *s) |
virtual bool | SetFullscreen (DisplayMode fullscreen) |
virtual void | SetLighting (const LightingParams *light) |
virtual void | SetMultipleViewports (int n, const Viewport *vps) |
virtual bool | SetParams (const RendererParams &) |
void | SetPostProcessShader (PostProcessShader newShader) |
virtual void | SetProjection (const Matrix4f &proj) |
virtual void | SetRealViewport (const Viewport &vp) |
virtual void | SetRenderTarget (Texture *color, Texture *depth=NULL, Texture *stencil=NULL) |
void | SetSceneRenderScale (float ss) |
virtual void | SetViewport (const Viewport &vp) |
void | SetViewport (int x, int y, int w, int h) |
virtual void | SetWindowSize (int w, int h) |
virtual void | SetWorldUniforms (const Matrix4f &proj)=0 |
virtual void | Shutdown () |
virtual | ~RenderDevice () |
Protected Member Functions | |
virtual Shader * | CreateStereoShader (PrimitiveType prim, Shader *vs) |
void | FinishScene1 () |
virtual bool | initPostProcessSupport (PostProcessType pptype) |
Protected Attributes | |
PostProcessType | CurPostProcess |
DistortionConfig | Distortion |
Color | DistortionClearColor |
Ptr< Buffer > | LightingBuffer |
RendererParams | Params |
Ptr< Buffer > | pFullScreenVertexBuffer |
Ptr< ShaderSet > | pPostProcessShader |
Matrix4f | Proj |
Ptr< Texture > | pSceneColorTex |
Ptr< Buffer > | pTextVertexBuffer |
int | SceneColorTexH |
int | SceneColorTexW |
float | SceneRenderScale |
UPInt | TotalTextureMemoryUsage |
Viewport | VP |
int | WindowHeight |
int | WindowWidth |
Private Attributes | |
PostProcessShader | PostProcessShaderActive |
PostProcessShader | PostProcessShaderRequested |
Friends | |
class | StereoGeomShaders |
Definition at line 685 of file Render_Device.h.
Definition at line 715 of file Render_Device.h.
PostProcessShader_Distortion | |
PostProcessShader_DistortionAndChromAb | |
PostProcessShader_Count |
Definition at line 861 of file Render_Device.h.
Definition at line 488 of file Render_Device.cpp.
virtual OVR::Render::RenderDevice::~RenderDevice | ( | ) | [inline, virtual] |
Definition at line 723 of file Render_Device.h.
void OVR::Render::RenderDevice::ApplyStereoParams | ( | const StereoEyeParams & | params | ) | [inline] |
Definition at line 739 of file Render_Device.h.
void OVR::Render::RenderDevice::ApplyStereoParams2D | ( | const StereoEyeParams & | params | ) | [inline] |
Definition at line 748 of file Render_Device.h.
virtual void OVR::Render::RenderDevice::BeginRendering | ( | ) | [inline, virtual] |
Reimplemented in OVR::Render::GL::RenderDevice.
Definition at line 793 of file Render_Device.h.
void OVR::Render::RenderDevice::BeginScene | ( | PostProcessType | pp = PostProcess_None | ) | [virtual] |
Definition at line 887 of file Render_Device.cpp.
virtual void OVR::Render::RenderDevice::Clear | ( | float | r = 0 , |
float | g = 0 , |
||
float | b = 0 , |
||
float | a = 1 , |
||
float | depth = 1 |
||
) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
void OVR::Render::RenderDevice::Clear | ( | const Color & | c, |
float | depth = 1 |
||
) | [inline] |
Definition at line 768 of file Render_Device.h.
virtual Buffer* OVR::Render::RenderDevice::CreateBuffer | ( | ) | [inline, virtual] |
Reimplemented in OVR::Render::GL::RenderDevice.
Definition at line 781 of file Render_Device.h.
virtual ShaderSet* OVR::Render::RenderDevice::CreateShaderSet | ( | ) | [inline, virtual] |
Reimplemented in OVR::Render::GL::RenderDevice.
Definition at line 787 of file Render_Device.h.
virtual Fill* OVR::Render::RenderDevice::CreateSimpleFill | ( | int | flags = Fill::F_Solid | ) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
ShaderBase * OVR::Render::D3D11::RenderDevice::CreateStereoShader | ( | PrimitiveType | prim, |
Render::Shader * | vs | ||
) | [inline, protected, virtual] |
Definition at line 882 of file Render_Device.h.
virtual Texture* OVR::Render::RenderDevice::CreateTexture | ( | int | format, |
int | width, | ||
int | height, | ||
const void * | data, | ||
int | mipcount = 1 |
||
) | [inline, virtual] |
Reimplemented in OVR::Render::GL::RenderDevice.
Definition at line 782 of file Render_Device.h.
Fill * OVR::Render::RenderDevice::CreateTextureFill | ( | Render::Texture * | t, |
bool | useAlpha = false |
||
) |
Definition at line 501 of file Render_Device.cpp.
void OVR::Render::RenderDevice::FillGradientRect | ( | float | left, |
float | top, | ||
float | right, | ||
float | bottom, | ||
Color | col_top, | ||
Color | col_btm | ||
) | [virtual] |
Definition at line 1823 of file Render_D3D1X_Device.cpp.
void OVR::Render::RenderDevice::FillRect | ( | float | left, |
float | top, | ||
float | right, | ||
float | bottom, | ||
Color | c | ||
) | [virtual] |
Definition at line 1816 of file Render_D3D1X_Device.cpp.
void OVR::Render::RenderDevice::FinishScene | ( | ) | [virtual] |
Definition at line 914 of file Render_Device.cpp.
void OVR::Render::RenderDevice::FinishScene1 | ( | ) | [protected] |
Definition at line 931 of file Render_Device.cpp.
virtual void OVR::Render::RenderDevice::ForceFlushGPU | ( | ) | [inline, virtual] |
Definition at line 778 of file Render_Device.h.
const RendererParams& OVR::Render::RenderDevice::GetParams | ( | ) | const [inline] |
Definition at line 734 of file Render_Device.h.
Definition at line 868 of file Render_Device.h.
virtual Matrix4f OVR::Render::RenderDevice::GetProjection | ( | ) | const [inline, virtual] |
Definition at line 815 of file Render_Device.h.
virtual bool OVR::Render::RenderDevice::GetSamplePositions | ( | Render::Texture * | , |
Vector3f * | pos | ||
) | [inline, virtual] |
Definition at line 785 of file Render_Device.h.
UPInt OVR::Render::RenderDevice::GetTotalTextureMemoryUsage | ( | ) | const [inline] |
Definition at line 856 of file Render_Device.h.
virtual void OVR::Render::RenderDevice::Init | ( | ) | [inline, virtual] |
Definition at line 730 of file Render_Device.h.
bool OVR::Render::RenderDevice::initPostProcessSupport | ( | PostProcessType | pptype | ) | [protected, virtual] |
Definition at line 808 of file Render_Device.cpp.
virtual bool OVR::Render::RenderDevice::IsFullscreen | ( | ) | const [inline, virtual] |
Definition at line 775 of file Render_Device.h.
virtual Shader* OVR::Render::RenderDevice::LoadBuiltinShader | ( | ShaderStage | stage, |
int | shader | ||
) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
float OVR::Render::RenderDevice::MeasureText | ( | const Font * | font, |
const char * | str, | ||
float | size, | ||
float * | strsize = NULL |
||
) |
Definition at line 528 of file Render_Device.cpp.
virtual void OVR::Render::RenderDevice::Present | ( | ) | [pure virtual] |
virtual void OVR::Render::RenderDevice::Rect | ( | float | left, |
float | top, | ||
float | right, | ||
float | bottom | ||
) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
virtual void OVR::Render::RenderDevice::Render | ( | const Matrix4f & | matrix, |
Model * | model | ||
) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
virtual void OVR::Render::RenderDevice::Render | ( | const Fill * | fill, |
Buffer * | vertices, | ||
Buffer * | indices, | ||
const Matrix4f & | matrix, | ||
int | offset, | ||
int | count, | ||
PrimitiveType | prim = Prim_Triangles |
||
) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
void OVR::Render::RenderDevice::RenderImage | ( | float | left, |
float | top, | ||
float | right, | ||
float | bottom, | ||
ShaderFill * | image, | ||
unsigned char | alpha = 255 |
||
) | [virtual] |
Definition at line 1837 of file Render_D3D1X_Device.cpp.
void OVR::Render::RenderDevice::RenderText | ( | const Font * | font, |
const char * | str, | ||
float | x, | ||
float | y, | ||
float | size, | ||
Color | c | ||
) | [virtual] |
Definition at line 1830 of file Render_D3D1X_Device.cpp.
virtual void OVR::Render::RenderDevice::RenderWithAlpha | ( | const Fill * | fill, |
Render::Buffer * | vertices, | ||
Render::Buffer * | indices, | ||
const Matrix4f & | matrix, | ||
int | offset, | ||
int | count, | ||
PrimitiveType | prim = Prim_Triangles |
||
) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
virtual void OVR::Render::RenderDevice::SetCommonUniformBuffer | ( | int | i, |
Buffer * | buffer | ||
) | [inline, virtual] |
Definition at line 812 of file Render_Device.h.
virtual void OVR::Render::RenderDevice::SetDepthMode | ( | bool | enable, |
bool | write, | ||
CompareFunc | func = Compare_Less |
||
) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
void OVR::Render::RenderDevice::SetDistortionClearColor | ( | Color | clearColor | ) | [inline] |
Definition at line 847 of file Render_Device.h.
void OVR::Render::RenderDevice::SetDistortionConfig | ( | const DistortionConfig & | config, |
StereoEye | eye = StereoEye_Left |
||
) | [inline] |
Definition at line 839 of file Render_Device.h.
virtual void OVR::Render::RenderDevice::SetExtraShaders | ( | ShaderSet * | s | ) | [inline, virtual] |
Definition at line 814 of file Render_Device.h.
virtual bool OVR::Render::RenderDevice::SetFullscreen | ( | DisplayMode | fullscreen | ) | [inline, virtual] |
Reimplemented in OVR::Render::GL::RenderDevice, and OVR::Render::GL::OSX::RenderDevice.
Definition at line 853 of file Render_Device.h.
void OVR::Render::RenderDevice::SetLighting | ( | const LightingParams * | light | ) | [virtual] |
Reimplemented in OVR::Render::GL::RenderDevice.
Definition at line 519 of file Render_Device.cpp.
void OVR::Render::D3D11::RenderDevice::SetMultipleViewports | ( | int | n, |
const Viewport * | vps | ||
) | [inline, virtual] |
Definition at line 763 of file Render_Device.h.
virtual bool OVR::Render::RenderDevice::SetParams | ( | const RendererParams & | ) | [inline, virtual] |
Definition at line 732 of file Render_Device.h.
void OVR::Render::RenderDevice::SetPostProcessShader | ( | PostProcessShader | newShader | ) | [inline] |
Definition at line 873 of file Render_Device.h.
void OVR::Render::RenderDevice::SetProjection | ( | const Matrix4f & | proj | ) | [virtual] |
Definition at line 881 of file Render_Device.cpp.
virtual void OVR::Render::RenderDevice::SetRealViewport | ( | const Viewport & | vp | ) | [inline, virtual] |
Reimplemented in OVR::Render::GL::RenderDevice.
Definition at line 762 of file Render_Device.h.
virtual void OVR::Render::RenderDevice::SetRenderTarget | ( | Texture * | color, |
Texture * | depth = NULL , |
||
Texture * | stencil = NULL |
||
) | [inline, virtual] |
Reimplemented in OVR::Render::GL::RenderDevice.
Definition at line 802 of file Render_Device.h.
void OVR::Render::RenderDevice::SetSceneRenderScale | ( | float | ss | ) |
Definition at line 782 of file Render_Device.cpp.
void OVR::Render::RenderDevice::SetViewport | ( | const Viewport & | vp | ) | [virtual] |
Definition at line 788 of file Render_Device.cpp.
void OVR::Render::RenderDevice::SetViewport | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) | [inline] |
Definition at line 758 of file Render_Device.h.
void OVR::Render::D3D11::RenderDevice::SetWindowSize | ( | int | w, |
int | h | ||
) | [inline, virtual] |
Definition at line 854 of file Render_Device.h.
virtual void OVR::Render::RenderDevice::SetWorldUniforms | ( | const Matrix4f & | proj | ) | [pure virtual] |
Implemented in OVR::Render::GL::RenderDevice.
virtual void OVR::Render::RenderDevice::Shutdown | ( | ) | [inline, virtual] |
Reimplemented in OVR::Render::GL::Linux::RenderDevice, OVR::Render::GL::OSX::RenderDevice, and OVR::Render::GL::Win32::RenderDevice.
Definition at line 731 of file Render_Device.h.
friend class StereoGeomShaders [friend] |
Definition at line 687 of file Render_Device.h.
Definition at line 698 of file Render_Device.h.
Definition at line 705 of file Render_Device.h.
Color OVR::Render::RenderDevice::DistortionClearColor [protected] |
Definition at line 706 of file Render_Device.h.
Ptr<Buffer> OVR::Render::RenderDevice::LightingBuffer [protected] |
Definition at line 710 of file Render_Device.h.
RendererParams OVR::Render::RenderDevice::Params [protected] |
Definition at line 690 of file Render_Device.h.
Ptr<Buffer> OVR::Render::RenderDevice::pFullScreenVertexBuffer [protected] |
Definition at line 703 of file Render_Device.h.
Definition at line 887 of file Render_Device.h.
Definition at line 886 of file Render_Device.h.
Ptr<ShaderSet> OVR::Render::RenderDevice::pPostProcessShader [protected] |
Definition at line 702 of file Render_Device.h.
Matrix4f OVR::Render::RenderDevice::Proj [protected] |
Reimplemented in OVR::Render::GL::RenderDevice.
Definition at line 693 of file Render_Device.h.
Ptr<Texture> OVR::Render::RenderDevice::pSceneColorTex [protected] |
Definition at line 699 of file Render_Device.h.
Ptr<Buffer> OVR::Render::RenderDevice::pTextVertexBuffer [protected] |
Definition at line 694 of file Render_Device.h.
int OVR::Render::RenderDevice::SceneColorTexH [protected] |
Definition at line 701 of file Render_Device.h.
int OVR::Render::RenderDevice::SceneColorTexW [protected] |
Definition at line 700 of file Render_Device.h.
float OVR::Render::RenderDevice::SceneRenderScale [protected] |
Definition at line 704 of file Render_Device.h.
Definition at line 707 of file Render_Device.h.
Viewport OVR::Render::RenderDevice::VP [protected] |
Definition at line 691 of file Render_Device.h.
int OVR::Render::RenderDevice::WindowHeight [protected] |
Definition at line 689 of file Render_Device.h.
int OVR::Render::RenderDevice::WindowWidth [protected] |
Definition at line 689 of file Render_Device.h.