Platform independant pure virtual render device. Implement platform-specific methods and features in derived class. Use CreateRenderDevice() to create device, and call Open() before rendering anything.
|
Public Types |
enum | RENDERTARGET { INVALIDBUFFER = 0xFFFFFFFF,
FRAMEBUFFER = 0x00000000,
PIXELBUFFER = 0x01000000
} |
| Render target identifiers. More...
|
enum | RENDERFRAMEFLAGS { NOFLAGS = 0x00000000,
NOSORT = 0x00000001
} |
| Flags passed to Begin affecting the rendering of the frame. More...
|
enum | CULLMODE { CULLNONE = 0,
CULLBACK = 1,
CULLFRONT = 2,
CULLBOTH = 3
} |
| Culling mode identifiers. More...
|
enum | STENCILOP {
STENCILOP_KEEP = 0,
STENCILOP_ZERO = 1,
STENCILOP_REPLACE = 2
, STENCILOP_DECR = 4,
STENCILOP_INVERT = 5
} |
| Stencil op identifiers. More...
|
enum | STENCILFUNC {
STENCILFUNC_NEVER = 0,
STENCILFUNC_LESS = 1,
STENCILFUNC_LEQUAL = 2,
STENCILFUNC_GREATER = 3,
STENCILFUNC_GEQUAL = 4,
STENCILFUNC_EQUAL = 5,
STENCILFUNC_NOTEQUAL = 6,
STENCILFUNC_ALWAYS = 7
} |
| Stencil test function identifiers. More...
|
enum | BUFFER { COLORBUFFER = 1,
ZBUFFER = 2,
STENCILBUFFER = 4
} |
| Buffer identifiers. More...
|
enum | INPUTEVENTGROUP { SYSTEMINPUT = 0x00000001,
KEYBOARDINPUT = 0x00000002,
MOUSEINPUT = 0x00000004,
JOYSTICKINPUT = 0x00000008
} |
| Inputgroup identifiers. More...
|
Public Member Functions |
virtual bool | Open (const RenderWindow &rkWndData)=0 |
virtual void | Close ()=0 |
virtual void | Begin (const Matrix &rkViewMatrix, unsigned int uiFlags=NOFLAGS)=0 |
virtual void | End ()=0 |
virtual void | Render (const RenderPrimitive &rkPrimitive, unsigned int uiFlags=RenderPrimitive::NOFLAGS)=0 |
virtual unsigned int | SetRenderTarget (unsigned int uiTarget)=0 |
virtual CULLMODE | SetCullMode (CULLMODE eCullMode=CULLBACK)=0 |
virtual void | SetStencilOp (STENCILOP eStencilFail, STENCILOP eZFail, STENCILOP eZPass)=0 |
virtual void | SetStencilFunc (STENCILFUNC eFunc, unsigned int uiRefValue, unsigned int uiTestMask)=0 |
virtual void | SetStencilMask (unsigned int uiWriteMask)=0 |
virtual void | SetTargetMask (bool bWrite)=0 |
virtual void | SetDefaultTextureFiltering (unsigned int uiMode) |
virtual void | SetDefaultMaxAnisotropy (unsigned int uiMaxAnisotropy) |
virtual bool | SetStorageSize (unsigned int uiVertexStorageSize, unsigned int uiPolygonStorageSize)=0 |
void | SetPerspectiveProjection () |
virtual void | SetPerspectiveProjection (float fFOV, float fZNear, float fZFar) |
void | SetOrthographicProjection () |
virtual void | SetOrthographicProjection (float fLeft, float fTop, float fRight, float fBottom, float fZNear=0.0f, float fZFar=1.0f) |
virtual void | SetCustomProjection (const Matrix &rkMatrix) |
virtual void | SetViewport (int iX, int iY, int iWidth, int iHeight)=0 |
virtual void | Clear (unsigned int uiTargets, const Color &rkColor, float fZValue, unsigned int uiStencilValue)=0 |
virtual void | Flip ()=0 |
virtual int | AddLight (Light *pkLight)=0 |
virtual TexturePtr | LoadTexture (const std::string &rstrFilename, Texture::TEXTURETYPE eTextureType=Texture::TEX2D, Texture::TEXTUREFORMAT eTextureFormat=Texture::DEFAULT, unsigned int uiFlags=Texture::NOFLAGS, unsigned int uiFiltering=0, unsigned int uiMaxAnisotropy=1)=0 |
virtual TexturePtr | GetTexture (const std::string &rstrName)=0 |
virtual TexturePtr | CreateTexture (const std::string &rstrName, Texture::TEXTURETYPE eTextureType=Texture::TEX2D, Texture::TEXTUREFORMAT eTextureFormat=Texture::DEFAULT)=0 |
virtual VertexBufferPtr | CreateVertexBuffer (unsigned int uiType=Buffer::NORMAL, unsigned int uiNumVertices=0, const VertexDeclaration *pkFormat=0, const void *pData=0)=0 |
virtual PolygonBufferPtr | CreatePolygonBuffer (unsigned int uiType=Buffer::NORMAL, unsigned int uiNumPolygons=0, const Polygon *pkData=0, bool bStripify=false)=0 |
virtual PolygonStripBufferPtr | CreatePolygonStripBuffer (unsigned int uiType=Buffer::NORMAL, unsigned int uiNumPolygons=0, const unsigned short *pusData=0)=0 |
virtual PixelBuffer * | CreatePixelBuffer (unsigned int uiWidth, unsigned int uiHeight, unsigned int uiBPP, Texture::TEXTURETYPE eTextureType=Texture::TEX2D)=0 |
virtual ProgramPtr | CreateProgram (Program::PROGRAMTYPE eType)=0 |
virtual ProgramPtr | GetProgram (Program::PROGRAMTYPE eType, const std::string &rstrName)=0 |
const Matrix & | GetProjectionMatrix () const |
float | GetZNear () const |
float | GetZFar () const |
unsigned int | GetWidth () |
unsigned int | GetHeight () |
unsigned int | GetBPP () |
float | GetFOV () const |
const Viewport & | GetViewport () const |
virtual std::string | GetStatistics ()=0 |
const RenderWindow & | GetWindow () const |
const RenderCaps & | GetCaps () const |
Projection::PROJECTIONMODE | GetProjectionMode () const |
const Matrix & | GetViewMatrix () const |
unsigned int | GetDefaultTextureFiltering () |
virtual void | SetMousePos (int iX, int iY)=0 |
virtual void | CaptureMouse (bool bCapture)=0 |
virtual void | ShowCursor (bool bShow)=0 |
virtual void | RegisterFrameCallback (FrameCallback::FRAMECALLBACKTYPE eType, FrameCallback *pkCallback, bool bRegister)=0 |
virtual void | QueryAdapters (std::vector< RenderAdapter > *pvkAdapters)=0 |
virtual void | QueryResolutions (std::vector< RenderResolution > *pvkResolutions, unsigned int uiAdapter=0)=0 |
virtual bool | Collect (InputEvent *pkEvent)=0 |
virtual void | AddInputEventGroup (unsigned int uiInputEventGroup) |
virtual void | DeleteInputEventGroup (unsigned int uiInputEventGroup) |
virtual bool | HasInputEventGroup (unsigned int uiInputEventGroup) |
bool | IsActive () const |
virtual void | Activate () |
virtual void | Deactivate () |
bool | Toggle () |
bool | LoadCodec (const std::string &rstrName) |
ImageData * | LoadImageData (File *pkFile) |
ImageData * | LoadImageData (const std::string &rstrFilename) |
void | FreeImageData (ImageData *pkImageData) |
virtual void | ConfigValueChange (const HashString &rstrKey)=0 |
Public Attributes |
ShadowGenerator * | m_pkShadowGenerator |
Protected Member Functions |
| RenderDevice (FileManager *pkFileManager, InputManager *pkInputManager) |
virtual | ~RenderDevice () |
virtual void | SetProjection (const Matrix &rkMatrix)=0 |
Protected Attributes |
ModulePtr | m_pkModule |
TexturePool * | m_pkTexturePool |
Projection * | m_pkProjection |
PerspectiveProjection | m_kPerspectiveProjection |
OrthographicProjection | m_kOrthographicProjection |
Projection | m_kCustomProjection |
Matrix | m_kViewMatrix |
RenderWindow | m_kWindow |
Viewport | m_kViewport |
CULLMODE | m_eCullMode |
unsigned int | m_uiDefaultTextureFilter |
unsigned int | m_uiDefaultMaxAnisotropy |
FileManager * | m_pkFileManager |
InputManager * | m_pkManager |
unsigned int | m_eInputEventGroups |
bool | m_bActive |
std::vector< ImageCodec * > | m_vpkCodecs |