PixelLightAPI
.
|
Abstract renderer surface where we can render in. More...
#include <Surface.h>
Public Types | |
enum | EType { Window = 0, TextureBuffer = 1 } |
Surface types. More... | |
Public Member Functions | |
virtual PLRENDERER_API | ~Surface () |
Destructor. | |
Renderer & | GetRenderer () const |
Returns the owner renderer. | |
EType | GetType () const |
Returns the surface type. | |
bool | IsActive () const |
Returns whether the surface is active or not. | |
void | SetActive (bool bActive=true) |
Sets whether the surface is active or not. | |
SurfacePainter * | GetPainter () const |
Returns the surface painter. | |
PLRENDERER_API bool | SetPainter (SurfacePainter *pPainter, bool bDestroy=true) |
Set a surface painter. | |
PLRENDERER_API void | Draw () |
Draws the surface. | |
bool | IsSwapY () const |
Returns the whether the surface is flipped along the y axis. | |
void | SetSwapY (bool bSwapY=false) |
Sets the whether the surface is flipped along the y axis. | |
virtual PLMath::Vector2i | GetSize () const =0 |
Returns the size of this renderer surface. | |
virtual PLRENDERER_API bool | IsAPISwapY () const |
Returns the whether the surface is flipped along the y axis. | |
Public Attributes | |
PLCore::Event | EventPaintBegin |
PLCore::Event | EventPaint |
PLCore::Event | EventPaintEnd |
Protected Member Functions | |
PLRENDERER_API | Surface (Renderer &cRenderer, EType nType) |
Constructor. | |
virtual bool | Init ()=0 |
Initializes the surface. | |
virtual void | DeInit ()=0 |
De-initializes the surface. | |
virtual bool | MakeCurrent (PLCore::uint8 nFace=0)=0 |
Makes this surface to the renderers current render target. | |
virtual PLRENDERER_API bool | UnmakeCurrent () |
Unmakes this surface from the renderers current render target. | |
virtual bool | Present ()=0 |
Presents the contents of the next buffer in the sequence of back buffers owned by the device. | |
virtual PLRENDERER_API void | BackupDeviceData () |
Backups the surface device data. | |
virtual PLRENDERER_API void | RestoreDeviceData () |
Restores the surface device data. |
Abstract renderer surface where we can render in.
Surface types.
virtual PLRENDERER_API PLRenderer::Surface::~Surface | ( | ) | [virtual] |
Destructor.
PLRENDERER_API PLRenderer::Surface::Surface | ( | Renderer & | cRenderer, |
EType | nType | ||
) | [protected] |
Constructor.
[in] | cRenderer | Owner renderer |
[in] | nType | Surface type |
Renderer & PLRenderer::Surface::GetRenderer | ( | ) | const [inline] |
Returns the owner renderer.
Surface::EType PLRenderer::Surface::GetType | ( | ) | const [inline] |
Returns the surface type.
bool PLRenderer::Surface::IsActive | ( | ) | const [inline] |
Returns whether the surface is active or not.
void PLRenderer::Surface::SetActive | ( | bool | bActive = true | ) | [inline] |
Sets whether the surface is active or not.
[in] | bActive | 'true' if the surface is active, else 'false' |
SurfacePainter * PLRenderer::Surface::GetPainter | ( | ) | const [inline] |
Returns the surface painter.
PLRENDERER_API bool PLRenderer::Surface::SetPainter | ( | SurfacePainter * | pPainter, |
bool | bDestroy = true |
||
) |
Set a surface painter.
[in] | pPainter | Pointer to the surface painter, can be a null pointer |
[in] | bDestroy | Destroy the current set surface painter? (if there's one) |
PLRENDERER_API void PLRenderer::Surface::Draw | ( | ) |
Draws the surface.
bool PLRenderer::Surface::IsSwapY | ( | ) | const [inline] |
Returns the whether the surface is flipped along the y axis.
void PLRenderer::Surface::SetSwapY | ( | bool | bSwapY = false | ) | [inline] |
Sets the whether the surface is flipped along the y axis.
[in] | bSwapY | 'true' if the surface is flipped along the y axis, else 'false' |
virtual PLMath::Vector2i PLRenderer::Surface::GetSize | ( | ) | const [pure virtual] |
Returns the size of this renderer surface.
virtual PLRENDERER_API bool PLRenderer::Surface::IsAPISwapY | ( | ) | const [virtual] |
Returns the whether the surface is flipped along the y axis.
virtual bool PLRenderer::Surface::Init | ( | ) | [protected, pure virtual] |
Initializes the surface.
virtual void PLRenderer::Surface::DeInit | ( | ) | [protected, pure virtual] |
De-initializes the surface.
virtual bool PLRenderer::Surface::MakeCurrent | ( | PLCore::uint8 | nFace = 0 | ) | [protected, pure virtual] |
Makes this surface to the renderers current render target.
[in] | nFace | Cube map face to render in (0-5) - only used if this is a cube texture buffer render target |
virtual PLRENDERER_API bool PLRenderer::Surface::UnmakeCurrent | ( | ) | [protected, virtual] |
Unmakes this surface from the renderers current render target.
virtual bool PLRenderer::Surface::Present | ( | ) | [protected, pure virtual] |
Presents the contents of the next buffer in the sequence of back buffers owned by the device.
virtual PLRENDERER_API void PLRenderer::Surface::BackupDeviceData | ( | ) | [protected, virtual] |
Backups the surface device data.
virtual PLRENDERER_API void PLRenderer::Surface::RestoreDeviceData | ( | ) | [protected, virtual] |
Restores the surface device data.
Paint begin event - emitted BEFORE any painting begins
Paint event - emitted BEFORE any painting
Paint end event - emitted AFTER any painting ends
|