PixelLightAPI
.
|
Abstract fixed functions renderer interface. More...
#include <FixedFunctions.h>
Classes | |
struct | Capabilities |
Holds all hardware capabilities. More... | |
class | Fog |
Fog modes. More... | |
struct | Light |
Light data. More... | |
class | LightType |
Light types. More... | |
class | MaterialState |
Material states. More... | |
class | RenderState |
Fixed functions render states. More... | |
class | Shade |
Shade modes. More... | |
class | TexCoordGen |
Texture coordinate generation modes. More... | |
class | TextureEnvironment |
Texture environment modes. More... | |
class | TextureStage |
Texture stage states. More... | |
class | Transform |
Transform states. More... | |
Public Member Functions | |
virtual const Capabilities & | GetCapabilities () const =0 |
Returns the renderer fixed functions capabilities. | |
virtual void | Reset ()=0 |
Resets all fixed functions render states, texture units etc. to default. | |
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 PLGraphics::Color4 | GetColor () const =0 |
Gets the current color. | |
virtual void | SetColor (const PLGraphics::Color4 &cColor=PLGraphics::Color4::White)=0 |
Sets the current color. | |
virtual void | ResetTransformStates ()=0 |
Resets all transform states to default (identity matrix) | |
virtual const PLMath::Matrix4x4 & | GetTransformState (Transform::Enum nState, bool bOriginal=true) const =0 |
Retrieves a transform-state value. | |
virtual bool | SetTransformState (Transform::Enum nState, const PLMath::Matrix3x4 &mTrans)=0 |
Sets a single transform-state parameter. | |
virtual bool | SetTransformState (Transform::Enum nState, const PLMath::Matrix4x4 &mTrans)=0 |
virtual PLCore::uint32 | GetDefaultTextureStageState (TextureStage::Enum nState) const =0 |
Returns a default texture stage state. | |
virtual void | ResetTextureStageStates ()=0 |
Resets all texture stage states to default. | |
virtual int | GetTextureStageState (PLCore::uint32 nStage, TextureStage::Enum nState) const =0 |
Retrieves a texture stage state value. | |
virtual bool | SetTextureStageState (PLCore::uint32 nStage, TextureStage::Enum nState, PLCore::uint32 nValue)=0 |
Sets a single texture stage state parameter. | |
virtual PLCore::uint32 | GetDefaultMaterialState (MaterialState::Enum nState) const =0 |
Returns a default material state. | |
virtual void | ResetMaterialStates ()=0 |
Resets all material states to default. | |
virtual int | GetMaterialState (MaterialState::Enum nState) const =0 |
Retrieves a material-state value. | |
virtual bool | SetMaterialState (MaterialState::Enum nState, PLCore::uint32 nValue)=0 |
Sets a single material-state parameter. | |
virtual void | GetDefaultLightSettings (Light &sLight) const =0 |
Gets the default light settings. | |
virtual void | ResetLights ()=0 |
Resets the lights. | |
virtual bool | IsLightEnabled (PLCore::uint32 nLightID) const =0 |
Returns whether a light is enabled or not. | |
virtual bool | SetLightEnabled (PLCore::uint32 nLightID, bool bEnabled)=0 |
Sets whether a light is enabled or not. | |
virtual bool | GetLight (PLCore::uint32 nLightID, Light &sLight) const =0 |
Returns light settings. | |
virtual bool | SetLight (PLCore::uint32 nLightID, const Light &sLight)=0 |
Sets light settings. | |
virtual bool | IsClipPlaneEnabled (PLCore::uint8 nIndex) const =0 |
Returns whether a clip plane is enabled/disabled. | |
virtual bool | SetClipPlaneEnabled (char nIndex=-1, bool bEnable=false)=0 |
Enables/disables a clip plane. | |
virtual bool | GetClipPlane (PLCore::uint8 nIndex, float &fA, float &fB, float &fC, float &fD) const =0 |
Returns a clip plane. | |
virtual bool | SetClipPlane (char nIndex=-1, float fA=0.0f, float fB=0.0f, float fC=0.0f, float fD=0.0f)=0 |
Sets a clip plane. | |
virtual VertexBuffer * | GetVertexBuffer (PLCore::uint32 nStreamNumber=0, PLCore::uint32 *pnOffset=nullptr) const =0 |
Gets the current vertex buffer. | |
virtual bool | SetVertexBuffer (VertexBuffer *pVertexBuffer=nullptr, PLCore::uint32 nOffset=0, PLCore::uint32 nStreamNumber=0)=0 |
Sets the current vertex buffer. | |
Protected Member Functions | |
PLRENDERER_API | FixedFunctions () |
Constructor. | |
virtual PLRENDERER_API | ~FixedFunctions () |
Destructor. |
Abstract fixed functions renderer interface.
PLRENDERER_API PLRenderer::FixedFunctions::FixedFunctions | ( | ) | [protected] |
Constructor.
virtual PLRENDERER_API PLRenderer::FixedFunctions::~FixedFunctions | ( | ) | [protected, virtual] |
Destructor.
virtual const Capabilities& PLRenderer::FixedFunctions::GetCapabilities | ( | ) | const [pure virtual] |
Returns the renderer fixed functions capabilities.
virtual void PLRenderer::FixedFunctions::Reset | ( | ) | [pure virtual] |
Resets all fixed functions render states, texture units etc. to default.
virtual PLCore::uint32 PLRenderer::FixedFunctions::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::FixedFunctions::ResetRenderStates | ( | ) | [pure virtual] |
Resets all render states to default.
virtual int PLRenderer::FixedFunctions::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::FixedFunctions::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 FogMode, the second parameter must be one member of the Shade enumerated type. (e.g. Fog::Exp) |
virtual PLGraphics::Color4 PLRenderer::FixedFunctions::GetColor | ( | ) | const [pure virtual] |
Gets the current color.
virtual void PLRenderer::FixedFunctions::SetColor | ( | const PLGraphics::Color4 & | cColor = PLGraphics::Color4::White | ) | [pure virtual] |
Sets the current color.
[in] | cColor | RGBA color |
virtual void PLRenderer::FixedFunctions::ResetTransformStates | ( | ) | [pure virtual] |
Resets all transform states to default (identity matrix)
virtual const PLMath::Matrix4x4& PLRenderer::FixedFunctions::GetTransformState | ( | Transform::Enum | nState, |
bool | bOriginal = true |
||
) | const [pure virtual] |
Retrieves a transform-state value.
[in] | nState | State variable that is being queried. This parameter can be any member of the transform enumerated type. |
[in] | bOriginal | Return the original set state? The returned transform state may differ from the given original state. OpenGL backend example: If a rectangle texture buffer is used the used transform matrix is scaled because in this case OpenGL requires not normalized texture coordinates. If you give this matrix to a shader program, don't use the original matrix! This has only an influence on the texture matrices, view etc. matrices are always original. |
virtual bool PLRenderer::FixedFunctions::SetTransformState | ( | Transform::Enum | nState, |
const PLMath::Matrix3x4 & | mTrans | ||
) | [pure virtual] |
Sets a single transform-state parameter.
[in] | nState | State variable that is being modified. This parameter can be any member of the transform enumerated type. |
[in] | mTrans | New value for the transform state to be set |
virtual bool PLRenderer::FixedFunctions::SetTransformState | ( | Transform::Enum | nState, |
const PLMath::Matrix4x4 & | mTrans | ||
) | [pure virtual] |
virtual PLCore::uint32 PLRenderer::FixedFunctions::GetDefaultTextureStageState | ( | TextureStage::Enum | nState | ) | const [pure virtual] |
Returns a default texture stage state.
[in] | nState | Texture stage state to return the default value from |
virtual void PLRenderer::FixedFunctions::ResetTextureStageStates | ( | ) | [pure virtual] |
Resets all texture stage states to default.
virtual int PLRenderer::FixedFunctions::GetTextureStageState | ( | PLCore::uint32 | nStage, |
TextureStage::Enum | nState | ||
) | const [pure virtual] |
Retrieves a texture stage 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 texture stage enumerated type. |
virtual bool PLRenderer::FixedFunctions::SetTextureStageState | ( | PLCore::uint32 | nStage, |
TextureStage::Enum | nState, | ||
PLCore::uint32 | nValue | ||
) | [pure virtual] |
Sets a single texture stage 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 texture stage enumerated type. |
[in] | nValue | New value for the texture stage state to be set. The meaning of this parameter is dependent on the value specified for nState. For example, if nState is TextureStage::ColorTexEnv, the second parameter must be one member of the texture environment enumerated type. (e.g. TextureEnvironment::Modulate) |
virtual PLCore::uint32 PLRenderer::FixedFunctions::GetDefaultMaterialState | ( | MaterialState::Enum | nState | ) | const [pure virtual] |
Returns a default material state.
[in] | nState | Material state to return the default value from |
virtual void PLRenderer::FixedFunctions::ResetMaterialStates | ( | ) | [pure virtual] |
Resets all material states to default.
virtual int PLRenderer::FixedFunctions::GetMaterialState | ( | MaterialState::Enum | nState | ) | const [pure virtual] |
Retrieves a material-state value.
[in] | nState | State variable that is being queried. This parameter can be any member of the material enumerated type. |
virtual bool PLRenderer::FixedFunctions::SetMaterialState | ( | MaterialState::Enum | nState, |
PLCore::uint32 | nValue | ||
) | [pure virtual] |
Sets a single material-state parameter.
[in] | nState | State variable that is being modified. This parameter can be any member of the material enumerated type. |
[in] | nValue | New value for the material state to be set |
virtual void PLRenderer::FixedFunctions::GetDefaultLightSettings | ( | Light & | sLight | ) | const [pure virtual] |
Gets the default light settings.
[out] | sLight | Light structure which will receive the default settings |
virtual void PLRenderer::FixedFunctions::ResetLights | ( | ) | [pure virtual] |
Resets the lights.
virtual bool PLRenderer::FixedFunctions::IsLightEnabled | ( | PLCore::uint32 | nLightID | ) | const [pure virtual] |
Returns whether a light is enabled or not.
[in] | nLightID | ID of the light |
virtual bool PLRenderer::FixedFunctions::SetLightEnabled | ( | PLCore::uint32 | nLightID, |
bool | bEnabled | ||
) | [pure virtual] |
Sets whether a light is enabled or not.
[in] | nLightID | ID of the light |
[in] | bEnabled | Is this light enabled? |
virtual bool PLRenderer::FixedFunctions::GetLight | ( | PLCore::uint32 | nLightID, |
Light & | sLight | ||
) | const [pure virtual] |
Returns light settings.
[in] | nLightID | ID of the light |
[out] | sLight | Will receive the light settings |
virtual bool PLRenderer::FixedFunctions::SetLight | ( | PLCore::uint32 | nLightID, |
const Light & | sLight | ||
) | [pure virtual] |
Sets light settings.
[in] | nLightID | ID of the light |
[in] | sLight | The light settings |
virtual bool PLRenderer::FixedFunctions::IsClipPlaneEnabled | ( | PLCore::uint8 | nIndex | ) | const [pure virtual] |
Returns whether a clip plane is enabled/disabled.
[in] | nIndex | Index (0 - Capabilities::nMaxClipPlanes-1) of the clip plane which should be checked |
virtual bool PLRenderer::FixedFunctions::SetClipPlaneEnabled | ( | char | nIndex = -1 , |
bool | bEnable = false |
||
) | [pure virtual] |
Enables/disables a clip plane.
[in] | nIndex | Index (0 - Capabilities::nMaxClipPlanes-1) of the clip plane which should be enabled/disabled, < 0 = Set all clip planes to this value |
[in] | bEnable | Should the defined clip clip plane be enabled? |
virtual bool PLRenderer::FixedFunctions::GetClipPlane | ( | PLCore::uint8 | nIndex, |
float & | fA, | ||
float & | fB, | ||
float & | fC, | ||
float & | fD | ||
) | const [pure virtual] |
Returns a clip plane.
[in] | nIndex | Index (0 - Capabilities::nMaxClipPlanes-1) of the clip plane which should be returned |
[out] | fA | Will receive the A coefficient of the requested clip plane |
[out] | fB | Will receive the B coefficient of the requested clip plane |
[out] | fC | Will receive the C coefficient of the requested clip plane |
[out] | fD | Will receive the D coefficient of the requested clip plane |
virtual bool PLRenderer::FixedFunctions::SetClipPlane | ( | char | nIndex = -1 , |
float | fA = 0.0f , |
||
float | fB = 0.0f , |
||
float | fC = 0.0f , |
||
float | fD = 0.0f |
||
) | [pure virtual] |
Sets a clip plane.
[in] | nIndex | Index (0 - Capabilities::nMaxClipPlanes-1) of the clip plane which should be returned < 0 = Set all clip planes to this value |
[in] | fA | The new A coefficient of the given clip plane |
[in] | fB | The new B coefficient of the given clip plane |
[in] | fC | The new C coefficient of the given clip plane |
[in] | fD | The new D coefficient of the given clip plane |
virtual VertexBuffer* PLRenderer::FixedFunctions::GetVertexBuffer | ( | PLCore::uint32 | nStreamNumber = 0 , |
PLCore::uint32 * | pnOffset = nullptr |
||
) | const [pure virtual] |
Gets the current vertex buffer.
[in] | nStreamNumber | Specifies the data stream number (0 - Capabilities::nMaxVertexBufferStreams()-1) |
[out] | pnOffset | If not a null pointer, this variable will receive the vertex offset in bytes |
virtual bool PLRenderer::FixedFunctions::SetVertexBuffer | ( | VertexBuffer * | pVertexBuffer = nullptr , |
PLCore::uint32 | nOffset = 0 , |
||
PLCore::uint32 | nStreamNumber = 0 |
||
) | [pure virtual] |
Sets the current vertex buffer.
[in] | pVertexBuffer | The vertex buffer which should be set, a null pointer if no vertex buffer should be set |
[in] | nOffset | Vertex offset (vertex index, NOT in bytes!) |
[in] | nStreamNumber | Specifies the data stream number (0 - Capabilities::nMaxVertexBufferStreams()-1) |
|