PixelLightAPI
.
|
Abstract renderer main class. More...
#include <Renderer.h>
Public Types | |
enum | EMode { ModeFixedFunctions = 0, ModeShaders = 1, ModeBoth = 2 } |
Renderer mode. More... | |
Public Member Functions | |
pl_enum (EMode) pl_enum_value(ModeFixedFunctions | |
The renderer can only use fixed functions | pl_enum_value (ModeShaders,"The renderer can only use shaders") pl_enum_value(ModeBoth |
The renderer can only use fixed functions The renderer is allowed to use fixed functions as well as shaders pl_enum_end virtual pl_class(PLRENDERER_RTTI_EXPORT, Renderer,"PLRenderer", PLCore::Object,"Abstract renderer main class") pl_class_end public RendererContext & | GetRendererContext () const =0 |
Returns whether or not the renderer instance was initialized successfully within it's constructor. | |
virtual PLCore::String | GetAPI (PLCore::uint32 *pnVersion=nullptr) const =0 |
Returns the renderer API (for example 'OpenGL' or 'Direct3D') | |
virtual PLCore::String | GetVendor () const =0 |
Returns the renderer vendor (for example 'ATI Technologies Inc.') | |
virtual EMode | GetMode () const =0 |
Returns the mode the renderer is running in. | |
virtual PLCore::String | GetDefaultShaderLanguage () const =0 |
Returns the name of the default shader language of the renderer. | |
virtual ShaderLanguage * | GetShaderLanguage (const PLCore::String &sShaderLanguage="")=0 |
Returns a shader language instance. | |
virtual FixedFunctions * | GetFixedFunctions () const =0 |
Returns the fixed functions renderer interface. | |
virtual FontManager & | GetFontManager () const =0 |
Returns the font manager interface. | |
virtual DrawHelpers & | GetDrawHelpers () const =0 |
Returns the draw helpers interface. | |
virtual void | BackupDeviceObjects ()=0 |
Backups the device objects. | |
virtual void | RestoreDeviceObjects ()=0 |
Restores the device objects. | |
virtual PLCore::uint32 | GetNumOfDisplayModes () const =0 |
Returns the number of all available display modes. | |
virtual const DisplayMode * | GetDisplayMode (PLCore::uint32 nIndex) const =0 |
Returns a display mode. | |
virtual const Capabilities & | GetCapabilities () const =0 |
Returns the renderer capabilities. | |
virtual bool | IsValidTextureBuffer1DSize (int nSize) const =0 |
Returns whether or not the given size is valid for a 1D texture buffer. | |
virtual bool | IsValidTextureBuffer2DSize (int nSize) const =0 |
Returns whether or not the given size is valid for a 2D texture buffer. | |
virtual bool | IsValidTextureBufferRectangleSize (int nSize) const =0 |
Returns whether or not the given size is valid for a rectangle texture buffer. | |
virtual bool | IsValidTextureBuffer3DSize (int nSize) const =0 |
Returns whether or not the given size is valid for a 3D texture buffer. | |
virtual bool | IsValidTextureBufferCubeSize (int nSize) const =0 |
Returns whether or not the given size is valid for a cube texture buffer. | |
virtual const Statistics & | GetStatistics () const =0 |
Returns the renderer statistics. | |
virtual const PLMath::Vector2 & | GetTexelToPixelOffset () const =0 |
Returns the offset required to line up texel origins with pixels origins. | |
virtual void | Update ()=0 |
Updates the renderer. | |
virtual void | Reset ()=0 |
Resets all render states, texture units etc. to default. | |
virtual PLCore::uint32 | GetNumOfSurfaces () const =0 |
Returns the number of surfaces. | |
virtual Surface * | GetSurface (PLCore::uint32 nIndex=0) const =0 |
Returns a renderer surface. | |
virtual bool | AddSurface (Surface &cSurface)=0 |
Adds a renderer surface to the renderer. | |
virtual bool | RemoveSurface (Surface &cSurface)=0 |
Removes a renderer surface from the renderer. | |
virtual SurfacePainter * | CreateSurfacePainter (const PLCore::String &sClass)=0 |
Creates a surface painter. | |
virtual PLCore::uint32 | GetNumOfResources () const =0 |
Returns the number of resources. | |
virtual Resource * | GetResource (PLCore::uint32 nIndex=0) const =0 |
Returns a renderer resource. | |
virtual bool | AddResource (Resource &cResource)=0 |
Adds a renderer resource to the renderer. | |
virtual bool | RemoveResource (Resource &cResource)=0 |
Removes a renderer resource from the renderer. | |
virtual SurfaceWindow * | CreateSurfaceWindow (SurfaceWindowHandler &cHandler, PLCore::handle nNativeWindowHandle, const DisplayMode &sDisplayMode, bool bFullscreen=false)=0 |
Creates renderer surface window. | |
virtual SurfaceTextureBuffer * | CreateSurfaceTextureBuffer2D (const PLMath::Vector2i &vSize, TextureBuffer::EPixelFormat nFormat, PLCore::uint32 nFlags=SurfaceTextureBuffer::Depth|SurfaceTextureBuffer::Stencil, PLCore::uint8 nMaxColorTargets=1)=0 |
Creates renderer 2D texture buffer surface. | |
virtual SurfaceTextureBuffer * | CreateSurfaceTextureBufferRectangle (const PLMath::Vector2i &vSize, TextureBuffer::EPixelFormat nFormat, PLCore::uint32 nFlags=SurfaceTextureBuffer::Depth|SurfaceTextureBuffer::Stencil, PLCore::uint8 nMaxColorTargets=1)=0 |
Creates renderer rectangle texture buffer surface. | |
virtual SurfaceTextureBuffer * | CreateSurfaceTextureBufferCube (PLCore::uint16 nSize, TextureBuffer::EPixelFormat nFormat, PLCore::uint32 nFlags=SurfaceTextureBuffer::Depth|SurfaceTextureBuffer::Stencil)=0 |
Creates renderer cube texture buffer surface. | |
virtual TextureBuffer1D * | CreateTextureBuffer1D (PLGraphics::Image &cImage, TextureBuffer::EPixelFormat nInternalFormat=TextureBuffer::Unknown, PLCore::uint32 nFlags=TextureBuffer::Mipmaps|TextureBuffer::Compression)=0 |
Creates a 1D texture buffer. | |
virtual TextureBuffer2D * | CreateTextureBuffer2D (PLGraphics::Image &cImage, TextureBuffer::EPixelFormat nInternalFormat=TextureBuffer::Unknown, PLCore::uint32 nFlags=TextureBuffer::Mipmaps|TextureBuffer::Compression)=0 |
Creates a 2D texture buffer. | |
virtual TextureBuffer2DArray * | CreateTextureBuffer2DArray (PLGraphics::Image &cImage, TextureBuffer::EPixelFormat nInternalFormat=TextureBuffer::Unknown, PLCore::uint32 nFlags=TextureBuffer::Mipmaps|TextureBuffer::Compression)=0 |
Creates a 2D array texture buffer. | |
virtual TextureBuffer * | CreateTextureBufferRectangle (PLGraphics::Image &cImage, TextureBuffer::EPixelFormat nInternalFormat=TextureBuffer::Unknown, PLCore::uint32 nFlags=TextureBuffer::Compression)=0 |
Creates a rectangle texture buffer. | |
virtual TextureBuffer3D * | CreateTextureBuffer3D (PLGraphics::Image &cImage, TextureBuffer::EPixelFormat nInternalFormat=TextureBuffer::Unknown, PLCore::uint32 nFlags=TextureBuffer::Mipmaps|TextureBuffer::Compression)=0 |
Creates a 3D texture buffer. | |
virtual TextureBufferCube * | CreateTextureBufferCube (PLGraphics::Image &cImage, TextureBuffer::EPixelFormat nInternalFormat=TextureBuffer::Unknown, PLCore::uint32 nFlags=TextureBuffer::Mipmaps|TextureBuffer::Compression)=0 |
Creates a cube texture buffer. | |
virtual IndexBuffer * | CreateIndexBuffer ()=0 |
Creates an index buffer. | |
virtual VertexBuffer * | CreateVertexBuffer ()=0 |
Creates a vertex buffer. | |
virtual OcclusionQuery * | CreateOcclusionQuery ()=0 |
Creates an occlusion query. | |
virtual PLCore::uint32 | GetDefaultRenderState (RenderState::Enum nState) const =0 |
Returns a default render state. | |
virtual void | ResetRenderStates ()=0 |
Resets all render states to default. | |
virtual int | GetRenderState (RenderState::Enum nState) const =0 |
Retrieves a render-state value. | |
virtual bool | SetRenderState (RenderState::Enum nState, PLCore::uint32 nValue)=0 |
Sets a single render-state parameter. | |
virtual PLCore::uint32 | GetDefaultSamplerState (Sampler::Enum nState) const =0 |
Returns a default sampler state. | |
virtual void | ResetSamplerStates ()=0 |
Resets all sampler states to default. | |
virtual int | GetSamplerState (PLCore::uint32 nStage, Sampler::Enum nState) const =0 |
Retrieves a sampler-state value. | |
virtual bool | SetSamplerState (PLCore::uint32 nStage, Sampler::Enum nState, PLCore::uint32 nValue)=0 |
Sets a single sampler-state parameter. | |
virtual PLCore::uint32 | GetSwapInterval () const =0 |
Returns the swap interval (vertical synchronization) | |
virtual void | SetSwapInterval (PLCore::uint32 nSwapInterval=1)=0 |
Sets the swap interval (vertical synchronization) | |
virtual bool | BeginScene ()=0 |
Begins a scene. | |
virtual bool | EndScene ()=0 |
Ends a scene that was begun by calling the BeginScene method. | |
virtual const PLMath::Rectangle & | GetViewport (float *pfMinZ=nullptr, float *pfMaxZ=nullptr) const =0 |
Gets the window dimensions of a render target surface onto which a 3-D volume projects. | |
virtual bool | SetViewport (const PLMath::Rectangle *pRectangle=nullptr, float fMinZ=0.0f, float fMaxZ=1.0f)=0 |
Defines the window dimensions of a render target surface onto which a 3-D volume projects. | |
virtual const PLMath::Rectangle & | GetScissorRect () const =0 |
Gets the scissor rectangle. | |
virtual bool | SetScissorRect (const PLMath::Rectangle *pRectangle=nullptr)=0 |
Sets the scissor rectangle. | |
virtual bool | GetDepthBounds (float &fZMin, float &fZMax) const =0 |
Gets the depth bounds. | |
virtual bool | SetDepthBounds (float fZMin=0.0f, float fZMax=1.0f)=0 |
Sets the depth bounds. | |
virtual void | GetColorMask (bool &bRed, bool &bGreen, bool &bBlue, bool &bAlpha) const =0 |
Returns the color mask. | |
virtual bool | SetColorMask (bool bRed=true, bool bGreen=true, bool bBlue=true, bool bAlpha=true)=0 |
Sets the color mask. | |
virtual bool | Clear (PLCore::uint32 nFlags=Clear::Color|Clear::ZBuffer, const PLGraphics::Color4 &cColor=PLGraphics::Color4::Black, float fZ=1.0f, PLCore::uint32 nStencil=0)=0 |
Clears the viewport to a specified RGBA color, clears the depth buffer, and erases the stencil buffer. | |
virtual Surface * | GetRenderTarget (PLCore::uint8 *pnFace=nullptr) const =0 |
Returns the current render target. | |
virtual TextureBuffer * | GetColorRenderTarget (PLCore::uint8 nColorIndex=0) const =0 |
Returns the current color render target. | |
virtual bool | SetRenderTarget (Surface *pSurface, PLCore::uint8 nFace=0)=0 |
Sets the current render target. | |
virtual bool | SetColorRenderTarget (TextureBuffer *pTextureBuffer, PLCore::uint8 nColorIndex=0, PLCore::uint8 nFace=0)=0 |
Sets the current color render target (for multi render targets) | |
virtual bool | SetDepthRenderTarget (TextureBuffer *pTextureBuffer, PLCore::uint8 nFace=0)=0 |
Sets the current depth render target. | |
virtual bool | MakeScreenshot (PLGraphics::Image &cImage)=0 |
Makes a screenshot of the current render target (see GetRenderTarget()) | |
virtual TextureBuffer * | GetTextureBuffer (PLCore::uint32 nStage) const =0 |
Gets the current texture buffer at the given stage. | |
virtual bool | SetTextureBuffer (int nStage=-1, TextureBuffer *pTextureBuffer=nullptr)=0 |
Sets the current texture buffer at the given stage. | |
virtual IndexBuffer * | GetIndexBuffer () const =0 |
Gets the current index buffer. | |
virtual bool | SetIndexBuffer (IndexBuffer *pIndexBuffer=nullptr)=0 |
Sets the current index buffer. | |
virtual Program * | GetProgram () const =0 |
Returns the currently used program. | |
virtual bool | SetProgram (Program *pProgram=nullptr)=0 |
Sets the currently used program. | |
virtual bool | DrawPrimitives (Primitive::Enum nType, PLCore::uint32 nStartIndex, PLCore::uint32 nNumVertices)=0 |
Renders the specified geometric primitive, based on an array of vertices. | |
virtual bool | DrawIndexedPrimitives (Primitive::Enum nType, PLCore::uint32 nMinIndex, PLCore::uint32 nMaxIndex, PLCore::uint32 nStartIndex, PLCore::uint32 nNumVertices)=0 |
Renders the specified geometric primitive, based on indexing into an array of vertices. | |
Protected Member Functions | |
PLRENDERER_API | Renderer () |
Constructor. | |
virtual PLRENDERER_API | ~Renderer () |
Destructor. |
Abstract renderer main class.
Renderer mode.
PLRENDERER_API PLRenderer::Renderer::Renderer | ( | ) | [protected] |
Constructor.
virtual PLRENDERER_API PLRenderer::Renderer::~Renderer | ( | ) | [protected, virtual] |
Destructor.
The renderer can only use fixed functions PLRenderer::Renderer::pl_enum_value | ( | ModeShaders | , |
"The renderer can only use shaders" | |||
) |
The renderer can only use fixed functions The renderer is allowed to use fixed functions as well as shaders pl_enum_end virtual pl_class (PLRENDERER_RTTI_EXPORT, Renderer, "PLRenderer", PLCore::Object, "Abstract renderer main class") pl_class_end public RendererContext& PLRenderer::Renderer::GetRendererContext | ( | ) | const [pure virtual] |
Returns whether or not the renderer instance was initialized successfully within it's constructor.
Returns the owner renderer context
virtual PLCore::String PLRenderer::Renderer::GetAPI | ( | PLCore::uint32 * | pnVersion = nullptr | ) | const [pure virtual] |
Returns the renderer API (for example 'OpenGL' or 'Direct3D')
[out] | pnVersion | Version information, can be a null pointer |
virtual PLCore::String PLRenderer::Renderer::GetVendor | ( | ) | const [pure virtual] |
Returns the renderer vendor (for example 'ATI Technologies Inc.')
virtual EMode PLRenderer::Renderer::GetMode | ( | ) | const [pure virtual] |
Returns the mode the renderer is running in.
virtual PLCore::String PLRenderer::Renderer::GetDefaultShaderLanguage | ( | ) | const [pure virtual] |
Returns the name of the default shader language of the renderer.
virtual ShaderLanguage* PLRenderer::Renderer::GetShaderLanguage | ( | const PLCore::String & | sShaderLanguage = "" | ) | [pure virtual] |
Returns a shader language instance.
[in] | sShaderLanguage | The name of the shader language (for example "GLSL" or "Cg"), if empty string, the default renderer shader language is used (see GetDefaultShaderLanguage()) |
virtual FixedFunctions* PLRenderer::Renderer::GetFixedFunctions | ( | ) | const [pure virtual] |
Returns the fixed functions renderer interface.
virtual FontManager& PLRenderer::Renderer::GetFontManager | ( | ) | const [pure virtual] |
Returns the font manager interface.
virtual DrawHelpers& PLRenderer::Renderer::GetDrawHelpers | ( | ) | const [pure virtual] |
Returns the draw helpers interface.
virtual void PLRenderer::Renderer::BackupDeviceObjects | ( | ) | [pure virtual] |
Backups the device objects.
virtual void PLRenderer::Renderer::RestoreDeviceObjects | ( | ) | [pure virtual] |
Restores the device objects.
virtual PLCore::uint32 PLRenderer::Renderer::GetNumOfDisplayModes | ( | ) | const [pure virtual] |
Returns the number of all available display modes.
virtual const DisplayMode* PLRenderer::Renderer::GetDisplayMode | ( | PLCore::uint32 | nIndex | ) | const [pure virtual] |
Returns a display mode.
[in] | nIndex | Index of the display mode to return (0..'GetNumOfDisplayModes()') |
virtual const Capabilities& PLRenderer::Renderer::GetCapabilities | ( | ) | const [pure virtual] |
Returns the renderer capabilities.
virtual bool PLRenderer::Renderer::IsValidTextureBuffer1DSize | ( | int | nSize | ) | const [pure virtual] |
Returns whether or not the given size is valid for a 1D texture buffer.
[in] | nSize | Size to check |
virtual bool PLRenderer::Renderer::IsValidTextureBuffer2DSize | ( | int | nSize | ) | const [pure virtual] |
Returns whether or not the given size is valid for a 2D texture buffer.
[in] | nSize | Size to check |
virtual bool PLRenderer::Renderer::IsValidTextureBufferRectangleSize | ( | int | nSize | ) | const [pure virtual] |
Returns whether or not the given size is valid for a rectangle texture buffer.
[in] | nSize | Size to check |
virtual bool PLRenderer::Renderer::IsValidTextureBuffer3DSize | ( | int | nSize | ) | const [pure virtual] |
Returns whether or not the given size is valid for a 3D texture buffer.
[in] | nSize | Size to check |
virtual bool PLRenderer::Renderer::IsValidTextureBufferCubeSize | ( | int | nSize | ) | const [pure virtual] |
Returns whether or not the given size is valid for a cube texture buffer.
[in] | nSize | Size to check |
virtual const Statistics& PLRenderer::Renderer::GetStatistics | ( | ) | const [pure virtual] |
Returns the renderer statistics.
virtual const PLMath::Vector2& PLRenderer::Renderer::GetTexelToPixelOffset | ( | ) | const [pure virtual] |
Returns the offset required to line up texel origins with pixels origins.
virtual void PLRenderer::Renderer::Update | ( | ) | [pure virtual] |
Updates the renderer.
virtual void PLRenderer::Renderer::Reset | ( | ) | [pure virtual] |
Resets all render states, texture units etc. to default.
virtual PLCore::uint32 PLRenderer::Renderer::GetNumOfSurfaces | ( | ) | const [pure virtual] |
Returns the number of surfaces.
virtual Surface* PLRenderer::Renderer::GetSurface | ( | PLCore::uint32 | nIndex = 0 | ) | const [pure virtual] |
Returns a renderer surface.
[in] | nIndex | Index of the surface to return |
virtual bool PLRenderer::Renderer::AddSurface | ( | Surface & | cSurface | ) | [pure virtual] |
Adds a renderer surface to the renderer.
[in] | cSurface | Renderer surface to add |
virtual bool PLRenderer::Renderer::RemoveSurface | ( | Surface & | cSurface | ) | [pure virtual] |
Removes a renderer surface from the renderer.
[in] | cSurface | Renderer surface to remove |
virtual SurfacePainter* PLRenderer::Renderer::CreateSurfacePainter | ( | const PLCore::String & | sClass | ) | [pure virtual] |
Creates a surface painter.
[in] | sClass | Class name of the surface painter to create |
virtual PLCore::uint32 PLRenderer::Renderer::GetNumOfResources | ( | ) | const [pure virtual] |
Returns the number of resources.
virtual Resource* PLRenderer::Renderer::GetResource | ( | PLCore::uint32 | nIndex = 0 | ) | const [pure virtual] |
Returns a renderer resource.
[in] | nIndex | Index of the renderer resource to return |
virtual bool PLRenderer::Renderer::AddResource | ( | Resource & | cResource | ) | [pure virtual] |
Adds a renderer resource to the renderer.
[in] | cResource | Renderer resource to add |
virtual bool PLRenderer::Renderer::RemoveResource | ( | Resource & | cResource | ) | [pure virtual] |
Removes a renderer resource from the renderer.
[in] | cResource | Renderer resource to remove |
virtual SurfaceWindow* PLRenderer::Renderer::CreateSurfaceWindow | ( | SurfaceWindowHandler & | cHandler, |
PLCore::handle | nNativeWindowHandle, | ||
const DisplayMode & | sDisplayMode, | ||
bool | bFullscreen = false |
||
) | [pure virtual] |
Creates renderer surface window.
[in] | cHandler | Renderer surface handler the new renderer surface is assigned with |
[in] | nNativeWindowHandle | Handle to the native window the renderer surface is assigned with |
[in] | sDisplayMode | Display mode information |
[in] | bFullscreen | Fullscreen mode? |
virtual SurfaceTextureBuffer* PLRenderer::Renderer::CreateSurfaceTextureBuffer2D | ( | const PLMath::Vector2i & | vSize, |
TextureBuffer::EPixelFormat | nFormat, | ||
PLCore::uint32 | nFlags = SurfaceTextureBuffer::Depth|SurfaceTextureBuffer::Stencil , |
||
PLCore::uint8 | nMaxColorTargets = 1 |
||
) | [pure virtual] |
Creates renderer 2D texture buffer surface.
[in] | vSize | Size of renderer texture buffer surface |
[in] | nFormat | Texture buffer pixel format |
[in] | nFlags | Texture buffer surface flags (see SurfaceTextureBuffer::EFlags) |
[in] | nMaxColorTargets | Maximum number of color render targets. This must be at least 1 - main renderer target color. Have a look at SetColorRenderTarget() |
virtual SurfaceTextureBuffer* PLRenderer::Renderer::CreateSurfaceTextureBufferRectangle | ( | const PLMath::Vector2i & | vSize, |
TextureBuffer::EPixelFormat | nFormat, | ||
PLCore::uint32 | nFlags = SurfaceTextureBuffer::Depth|SurfaceTextureBuffer::Stencil , |
||
PLCore::uint8 | nMaxColorTargets = 1 |
||
) | [pure virtual] |
Creates renderer rectangle texture buffer surface.
[in] | vSize | Size of renderer texture buffer surface |
[in] | nFormat | Texture buffer pixel format |
[in] | nFlags | Texture buffer surface flags (see SurfaceTextureBuffer::EFlags) |
[in] | nMaxColorTargets | Maximum number of color render targets. This must be at least 1 - main renderer target color. Have a look at SetColorRenderTarget() |
virtual SurfaceTextureBuffer* PLRenderer::Renderer::CreateSurfaceTextureBufferCube | ( | PLCore::uint16 | nSize, |
TextureBuffer::EPixelFormat | nFormat, | ||
PLCore::uint32 | nFlags = SurfaceTextureBuffer::Depth|SurfaceTextureBuffer::Stencil |
||
) | [pure virtual] |
Creates renderer cube texture buffer surface.
[in] | nSize | Size of renderer texture buffer surface |
[in] | nFormat | Texture buffer pixel format |
[in] | nFlags | Texture buffer surface flags (see SurfaceTextureBuffer::EFlags) |
virtual TextureBuffer1D* PLRenderer::Renderer::CreateTextureBuffer1D | ( | PLGraphics::Image & | cImage, |
TextureBuffer::EPixelFormat | nInternalFormat = TextureBuffer::Unknown , |
||
PLCore::uint32 | nFlags = TextureBuffer::Mipmaps|TextureBuffer::Compression |
||
) | [pure virtual] |
Creates a 1D texture buffer.
[in] | cImage | Texture buffer image |
[in] | nInternalFormat | Desired internal texture buffer pixel format, if TextureBuffer::Unknown use the format of the given image |
[in] | nFlags | Texture buffer flags, TextureBuffer::RenderTarget has no effect (see TextureBuffer::EFlags) |
virtual TextureBuffer2D* PLRenderer::Renderer::CreateTextureBuffer2D | ( | PLGraphics::Image & | cImage, |
TextureBuffer::EPixelFormat | nInternalFormat = TextureBuffer::Unknown , |
||
PLCore::uint32 | nFlags = TextureBuffer::Mipmaps|TextureBuffer::Compression |
||
) | [pure virtual] |
Creates a 2D texture buffer.
[in] | cImage | Texture buffer image |
[in] | nInternalFormat | Desired internal texture buffer pixel format, if TextureBuffer::Unknown use the format of the given image |
[in] | nFlags | Texture buffer flags (see TextureBuffer::EFlags) |
virtual TextureBuffer2DArray* PLRenderer::Renderer::CreateTextureBuffer2DArray | ( | PLGraphics::Image & | cImage, |
TextureBuffer::EPixelFormat | nInternalFormat = TextureBuffer::Unknown , |
||
PLCore::uint32 | nFlags = TextureBuffer::Mipmaps|TextureBuffer::Compression |
||
) | [pure virtual] |
Creates a 2D array texture buffer.
[in] | cImage | Texture buffer image |
[in] | nInternalFormat | Desired internal texture buffer pixel format, if TextureBuffer::Unknown use the format of the given image |
[in] | nFlags | Texture buffer flags (see TextureBuffer::EFlags) |
virtual TextureBuffer* PLRenderer::Renderer::CreateTextureBufferRectangle | ( | PLGraphics::Image & | cImage, |
TextureBuffer::EPixelFormat | nInternalFormat = TextureBuffer::Unknown , |
||
PLCore::uint32 | nFlags = TextureBuffer::Compression |
||
) | [pure virtual] |
Creates a rectangle texture buffer.
[in] | cImage | Texture buffer image |
[in] | nInternalFormat | Desired internal texture buffer pixel format, if TextureBuffer::Unknown use the format of the given image |
[in] | nFlags | Texture buffer flags, TextureBuffer::Mipmaps has no effect (see TextureBuffer::EFlags) |
virtual TextureBuffer3D* PLRenderer::Renderer::CreateTextureBuffer3D | ( | PLGraphics::Image & | cImage, |
TextureBuffer::EPixelFormat | nInternalFormat = TextureBuffer::Unknown , |
||
PLCore::uint32 | nFlags = TextureBuffer::Mipmaps|TextureBuffer::Compression |
||
) | [pure virtual] |
Creates a 3D texture buffer.
[in] | cImage | Texture buffer image |
[in] | nInternalFormat | Desired internal texture buffer pixel format, if TextureBuffer::Unknown use the format of the given image |
[in] | nFlags | Texture buffer flags, TextureBuffer::RenderTarget has no effect (see TextureBuffer::EFlags) |
virtual TextureBufferCube* PLRenderer::Renderer::CreateTextureBufferCube | ( | PLGraphics::Image & | cImage, |
TextureBuffer::EPixelFormat | nInternalFormat = TextureBuffer::Unknown , |
||
PLCore::uint32 | nFlags = TextureBuffer::Mipmaps|TextureBuffer::Compression |
||
) | [pure virtual] |
Creates a cube texture buffer.
[in] | cImage | Cube map image (image with 6 image parts) |
[in] | nInternalFormat | Desired internal texture buffer pixel format, if TextureBuffer::Unknown use the format of the given image |
[in] | nFlags | Texture buffer flags (see TextureBuffer::EFlags) |
virtual IndexBuffer* PLRenderer::Renderer::CreateIndexBuffer | ( | ) | [pure virtual] |
Creates an index buffer.
virtual VertexBuffer* PLRenderer::Renderer::CreateVertexBuffer | ( | ) | [pure virtual] |
Creates a vertex buffer.
virtual OcclusionQuery* PLRenderer::Renderer::CreateOcclusionQuery | ( | ) | [pure virtual] |
Creates an occlusion query.
virtual PLCore::uint32 PLRenderer::Renderer::GetDefaultRenderState | ( | RenderState::Enum | nState | ) | const [pure virtual] |
Returns a default render state.
[in] | nState | Render state to return the default value from |
virtual void PLRenderer::Renderer::ResetRenderStates | ( | ) | [pure virtual] |
Resets all render states to default.
virtual int PLRenderer::Renderer::GetRenderState | ( | RenderState::Enum | nState | ) | const [pure virtual] |
Retrieves a render-state value.
[in] | nState | State variable that is being queried. This parameter can be any member of the render state enumerated type. |
virtual bool PLRenderer::Renderer::SetRenderState | ( | RenderState::Enum | nState, |
PLCore::uint32 | nValue | ||
) | [pure virtual] |
Sets a single render-state parameter.
[in] | nState | State variable that is being modified. This parameter can be any member of the render state enumerated type. |
[in] | nValue | New value for the render state to be set. The meaning of this parameter is dependent on the value specified for nState. For example, if nState is Shade, the second parameter must be one member of the Shade enumerated type. (e.g. Shade::Flat) |
virtual PLCore::uint32 PLRenderer::Renderer::GetDefaultSamplerState | ( | Sampler::Enum | nState | ) | const [pure virtual] |
Returns a default sampler state.
[in] | nState | Sampler state to return the default value from |
virtual void PLRenderer::Renderer::ResetSamplerStates | ( | ) | [pure virtual] |
Resets all sampler states to default.
virtual int PLRenderer::Renderer::GetSamplerState | ( | PLCore::uint32 | nStage, |
Sampler::Enum | nState | ||
) | const [pure virtual] |
Retrieves a sampler-state value.
[in] | nStage | Texture stage to get the value from |
[in] | nState | State variable that is being queried. This parameter can be any member of the sampler enumerated type. |
virtual bool PLRenderer::Renderer::SetSamplerState | ( | PLCore::uint32 | nStage, |
Sampler::Enum | nState, | ||
PLCore::uint32 | nValue | ||
) | [pure virtual] |
Sets a single sampler-state parameter.
[in] | nStage | Texture stage to set the value |
[in] | nState | State variable that is being modified. This parameter can be any member of the sampler enumerated type. |
[in] | nValue | New value for the sampler state to be set. The meaning of this parameter is dependent on the value specified for nState. For example, if nState is Sampler::AddressU, the second parameter must be one member of the Sampler::AddressU enumerated type. (e.g. TextureAddressing::Wrap) |
virtual PLCore::uint32 PLRenderer::Renderer::GetSwapInterval | ( | ) | const [pure virtual] |
Returns the swap interval (vertical synchronization)
virtual void PLRenderer::Renderer::SetSwapInterval | ( | PLCore::uint32 | nSwapInterval = 1 | ) | [pure virtual] |
Sets the swap interval (vertical synchronization)
[in] | nSwapInterval | The swap interval, default value is 1 |
virtual bool PLRenderer::Renderer::BeginScene | ( | ) | [pure virtual] |
Begins a scene.
virtual bool PLRenderer::Renderer::EndScene | ( | ) | [pure virtual] |
Ends a scene that was begun by calling the BeginScene method.
virtual const PLMath::Rectangle& PLRenderer::Renderer::GetViewport | ( | float * | pfMinZ = nullptr , |
float * | pfMaxZ = nullptr |
||
) | const [pure virtual] |
Gets the window dimensions of a render target surface onto which a 3-D volume projects.
[out] | pfMinZ | If not a null pointer, receives minimum z value describing the range of depth values into which a scene is to be rendered |
[out] | pfMaxZ | If not a null pointer, receives maximum z value describing the range of depth values into which a scene is to be rendered |
virtual bool PLRenderer::Renderer::SetViewport | ( | const PLMath::Rectangle * | pRectangle = nullptr , |
float | fMinZ = 0.0f , |
||
float | fMaxZ = 1.0f |
||
) | [pure virtual] |
Defines the window dimensions of a render target surface onto which a 3-D volume projects.
[in] | pRectangle | Viewport rectangle, if a null pointer, use the whole render target surface |
[in] | fMinZ | Minimum z value |
[in] | fMaxZ | Maximum z value |
virtual const PLMath::Rectangle& PLRenderer::Renderer::GetScissorRect | ( | ) | const [pure virtual] |
Gets the scissor rectangle.
virtual bool PLRenderer::Renderer::SetScissorRect | ( | const PLMath::Rectangle * | pRectangle = nullptr | ) | [pure virtual] |
Sets the scissor rectangle.
[in] | pRectangle | Viewport rectangle, if a null pointer, use the whole set viewport |
virtual bool PLRenderer::Renderer::GetDepthBounds | ( | float & | fZMin, |
float & | fZMax | ||
) | const [pure virtual] |
Gets the depth bounds.
[out] | fZMin | Will receive the Z minimum value |
[out] | fZMax | Will receive the Z maximum value |
virtual bool PLRenderer::Renderer::SetDepthBounds | ( | float | fZMin = 0.0f , |
float | fZMax = 1.0f |
||
) | [pure virtual] |
Sets the depth bounds.
[in] | fZMin | Z minimum value (range: 0.0-1.0, must be less than or equal to fZMax) |
[in] | fZMax | Z maximum value (range: 0.0-1.0, must be greater than or equal to fZMin) |
virtual void PLRenderer::Renderer::GetColorMask | ( | bool & | bRed, |
bool & | bGreen, | ||
bool & | bBlue, | ||
bool & | bAlpha | ||
) | const [pure virtual] |
Returns the color mask.
[out] | bRed | Will receive whether the red component is written |
[out] | bGreen | Will receive whether the green component is written |
[out] | bBlue | Will receive whether the blue component is written |
[out] | bAlpha | Will receive whether the alpha component is written |
virtual bool PLRenderer::Renderer::SetColorMask | ( | bool | bRed = true , |
bool | bGreen = true , |
||
bool | bBlue = true , |
||
bool | bAlpha = true |
||
) | [pure virtual] |
Sets the color mask.
[in] | bRed | Write red component? |
[in] | bGreen | Write green component? |
[in] | bBlue | Write blue component? |
[in] | bAlpha | Write alpha component? |
virtual bool PLRenderer::Renderer::Clear | ( | PLCore::uint32 | nFlags = Clear::Color|Clear::ZBuffer , |
const PLGraphics::Color4 & | cColor = PLGraphics::Color4::Black , |
||
float | fZ = 1.0f , |
||
PLCore::uint32 | nStencil = 0 |
||
) | [pure virtual] |
Clears the viewport to a specified RGBA color, clears the depth buffer, and erases the stencil buffer.
[in] | nFlags | Flags that indicate what should be cleared. This parameter can be any combination of the following flags, but at least one flag must be used: Clear::Color, Clear::ZBuffer and Clear::Stencil, see Clear flags |
[in] | cColor | RGBA clear color (used if Clear::Color is set) |
[in] | fZ | Z clear value. (if Clear::ZBuffer is set) This parameter can be in the range from 0.0 through 1.0. A value of 0.0 represents the nearest distance to the viewer, and 1.0 the farthest distance. |
[in] | nStencil | Value to clear the stencil-buffer with. This parameter can be in the range from 0 through 2^n–1, where n is the bit depth of the stencil buffer. |
virtual Surface* PLRenderer::Renderer::GetRenderTarget | ( | PLCore::uint8 * | pnFace = nullptr | ) | const [pure virtual] |
Returns the current render target.
[out] | pnFace | If not a null pointer, this will receive the current cube map face |
virtual TextureBuffer* PLRenderer::Renderer::GetColorRenderTarget | ( | PLCore::uint8 | nColorIndex = 0 | ) | const [pure virtual] |
Returns the current color render target.
[in] | nColorIndex | Color index of the color render target to return |
virtual bool PLRenderer::Renderer::SetRenderTarget | ( | Surface * | pSurface, |
PLCore::uint8 | nFace = 0 |
||
) | [pure virtual] |
Sets the current render target.
[in] | pSurface | Current renderer target, can be a null pointer |
[in] | nFace | Cube map face to render in (0-5) - only used if 'pSurface' is a cube texture buffer render target |
virtual bool PLRenderer::Renderer::SetColorRenderTarget | ( | TextureBuffer * | pTextureBuffer, |
PLCore::uint8 | nColorIndex = 0 , |
||
PLCore::uint8 | nFace = 0 |
||
) | [pure virtual] |
Sets the current color render target (for multi render targets)
[in] | pTextureBuffer | Current color renderer target, can be a null pointer |
[in] | nColorIndex | Color index of this render target, if 0 this will set the main color render target of the current set render target. (see SetRenderTarget()) |
[in] | nFace | Cube map face to render in ([TODO]) |
virtual bool PLRenderer::Renderer::SetDepthRenderTarget | ( | TextureBuffer * | pTextureBuffer, |
PLCore::uint8 | nFace = 0 |
||
) | [pure virtual] |
Sets the current depth render target.
[in] | pTextureBuffer | Current depth renderer target, can be a null pointer |
[in] | nFace | Cube map face to render in ([TODO]) |
virtual bool PLRenderer::Renderer::MakeScreenshot | ( | PLGraphics::Image & | cImage | ) | [pure virtual] |
Makes a screenshot of the current render target (see GetRenderTarget())
[out] | cImage | Image which will receive the screenshot data (usually RGBA unsigned byte) |
virtual TextureBuffer* PLRenderer::Renderer::GetTextureBuffer | ( | PLCore::uint32 | nStage | ) | const [pure virtual] |
Gets the current texture buffer at the given stage.
[in] | nStage | Texture stage |
virtual bool PLRenderer::Renderer::SetTextureBuffer | ( | int | nStage = -1 , |
TextureBuffer * | pTextureBuffer = nullptr |
||
) | [pure virtual] |
Sets the current texture buffer at the given stage.
[in] | nStage | Texture stage. (0 - max texture stages -> see Capabilities::nMaxTextureUnits) < 0 = set all available texture stages to this setting. |
[in] | pTextureBuffer | The texture buffer which should be set, a null pointer if no texture buffer should be set |
virtual IndexBuffer* PLRenderer::Renderer::GetIndexBuffer | ( | ) | const [pure virtual] |
Gets the current index buffer.
virtual bool PLRenderer::Renderer::SetIndexBuffer | ( | IndexBuffer * | pIndexBuffer = nullptr | ) | [pure virtual] |
Sets the current index buffer.
[in] | pIndexBuffer | The index buffer which should be set, a null pointer if no index buffer should be set |
virtual Program* PLRenderer::Renderer::GetProgram | ( | ) | const [pure virtual] |
Returns the currently used program.
virtual bool PLRenderer::Renderer::SetProgram | ( | Program * | pProgram = nullptr | ) | [pure virtual] |
Sets the currently used program.
[in] | pProgram | Program to use, can be a null pointer |
virtual bool PLRenderer::Renderer::DrawPrimitives | ( | Primitive::Enum | nType, |
PLCore::uint32 | nStartIndex, | ||
PLCore::uint32 | nNumVertices | ||
) | [pure virtual] |
Renders the specified geometric primitive, based on an array of vertices.
[in] | nType | Member of the primitive enumerated type, describing the type of primitive to render |
[in] | nStartIndex | Start vertex index for vertices used during this call |
[in] | nNumVertices | Number of vertices used during this call |
virtual bool PLRenderer::Renderer::DrawIndexedPrimitives | ( | Primitive::Enum | nType, |
PLCore::uint32 | nMinIndex, | ||
PLCore::uint32 | nMaxIndex, | ||
PLCore::uint32 | nStartIndex, | ||
PLCore::uint32 | nNumVertices | ||
) | [pure virtual] |
Renders the specified geometric primitive, based on indexing into an array of vertices.
[in] | nType | Member of the primitive enumerated type, describing the type of primitive to render, e.g. "Primitive::TriangleList" |
[in] | nMinIndex | Minimum vertex index for vertices used during this call, usually "0" |
[in] | nMaxIndex | Maximum vertex index for vertices used during this call, usually "pVertexBuffer->GetNumOfElements() - 1" when "pVertexBuffer" is your currently used vertex buffer |
[in] | nStartIndex | Start vertex index for vertices used during this call, usually "0" |
[in] | nNumVertices | Number of vertices used during this call, usually "pIndexBuffer->GetNumOfElements()" when "pIndexBuffer" is your currently used index buffer |
|