PixelLightAPI
.
|
Comfort renderer program wrapper. More...
#include <ProgramWrapper.h>
Public Member Functions | |
void | Get (const PLCore::String &sUniformName, int &nX) |
void | Get (const PLCore::String &sUniformName, float &fX) |
void | Get (const PLCore::String &sUniformName, double &fX) |
void | Set (const PLCore::String &sUniformName, int nX) |
void | Set (const PLCore::String &sUniformName, float fX) |
void | Set (const PLCore::String &sUniformName, double fX) |
void | Get (const PLCore::String &sUniformName, int &nX, int &nY) |
void | Get (const PLCore::String &sUniformName, float &fX, float &fY) |
void | Get (const PLCore::String &sUniformName, double &fX, double &fY) |
void | Get (const PLCore::String &sUniformName, PLMath::Vector2i &vVector) |
void | Get (const PLCore::String &sUniformName, PLMath::Vector2 &vVector) |
void | Get2 (const PLCore::String &sUniformName, int *pnComponents) |
void | Get2 (const PLCore::String &sUniformName, float *pfComponents) |
void | Get2 (const PLCore::String &sUniformName, double *pfComponents) |
void | Set (const PLCore::String &sUniformName, int nX, int nY) |
void | Set (const PLCore::String &sUniformName, float fX, float fY) |
void | Set (const PLCore::String &sUniformName, double fX, double fY) |
void | Set (const PLCore::String &sUniformName, const PLMath::Vector2i &vVector) |
void | Set (const PLCore::String &sUniformName, const PLMath::Vector2 &vVector) |
void | Set2 (const PLCore::String &sUniformName, const int *pnComponents) |
void | Set2 (const PLCore::String &sUniformName, const float *pfComponents) |
void | Set2 (const PLCore::String &sUniformName, const double *pfComponents) |
void | Get (const PLCore::String &sUniformName, int &nX, int &nY, int &nZ) |
void | Get (const PLCore::String &sUniformName, float &fX, float &fY, float &fZ) |
void | Get (const PLCore::String &sUniformName, double &fX, double &fY, double &fZ) |
void | Get (const PLCore::String &sUniformName, PLMath::Vector3i &vVector) |
void | Get (const PLCore::String &sUniformName, PLMath::Vector3 &vVector) |
void | Get (const PLCore::String &sUniformName, PLGraphics::Color3 &cColor) |
void | Get3 (const PLCore::String &sUniformName, int *pnComponents) |
void | Get3 (const PLCore::String &sUniformName, float *pfComponents) |
void | Get3 (const PLCore::String &sUniformName, double *pfComponents) |
void | Set (const PLCore::String &sUniformName, int nX, int nY, int nZ) |
void | Set (const PLCore::String &sUniformName, float fX, float fY, float fZ) |
void | Set (const PLCore::String &sUniformName, double fX, double fY, double fZ) |
void | Set (const PLCore::String &sUniformName, const PLMath::Vector3i &vVector) |
void | Set (const PLCore::String &sUniformName, const PLMath::Vector3 &vVector) |
void | Set (const PLCore::String &sUniformName, const PLGraphics::Color3 &cColor) |
void | Set3 (const PLCore::String &sUniformName, const int *pnComponents) |
void | Set3 (const PLCore::String &sUniformName, const float *pfComponents) |
void | Set3 (const PLCore::String &sUniformName, const double *pfComponents) |
void | Get (const PLCore::String &sUniformName, int &nX, int &nY, int &nZ, int &nW) |
void | Get (const PLCore::String &sUniformName, float &fX, float &fY, float &fZ, float &fW) |
void | Get (const PLCore::String &sUniformName, double &fX, double &fY, double &fZ, double &fW) |
void | Get (const PLCore::String &sUniformName, PLMath::Vector4 &vVector) |
void | Get (const PLCore::String &sUniformName, PLGraphics::Color4 &cColor) |
void | Get (const PLCore::String &sUniformName, PLMath::Quaternion &qQuaternion) |
void | Get4 (const PLCore::String &sUniformName, int *pnComponents) |
void | Get4 (const PLCore::String &sUniformName, float *pfComponents) |
void | Get4 (const PLCore::String &sUniformName, double *pfComponents) |
void | Set (const PLCore::String &sUniformName, int nX, int nY, int nZ, int nW) |
void | Set (const PLCore::String &sUniformName, float fX, float fY, float fZ, float fW) |
void | Set (const PLCore::String &sUniformName, double fX, double fY, double fZ, double fW) |
void | Set (const PLCore::String &sUniformName, const PLMath::Vector4 &vVector) |
void | Set (const PLCore::String &sUniformName, const PLGraphics::Color4 &cColor) |
void | Set (const PLCore::String &sUniformName, const PLMath::Quaternion &qQuaternion) |
void | Set4 (const PLCore::String &sUniformName, const int *pnComponents) |
void | Set4 (const PLCore::String &sUniformName, const float *pfComponents) |
void | Set4 (const PLCore::String &sUniformName, const double *pfComponents) |
void | Get (const PLCore::String &sUniformName, PLMath::Matrix3x3 &mMatrix) |
void | Get (const PLCore::String &sUniformName, PLMath::Matrix4x4 &mMatrix) |
void | Set (const PLCore::String &sUniformName, const PLMath::Matrix3x3 &mMatrix, bool bTranspose=false) |
void | Set (const PLCore::String &sUniformName, const PLMath::Matrix4x4 &mMatrix, bool bTranspose=false) |
int | GetTextureUnit (const PLCore::String &sUniformName) |
int | Set (const PLCore::String &sUniformName, TextureBuffer *pTextureBuffer) |
bool | Set (const PLCore::String &sUniformBlockName, UniformBuffer *pUniformBuffer, PLCore::uint32 nBindingPoint) |
Sets the uniform buffer feeding the specified uniform block with data. | |
bool | Set (const PLCore::String &sAttributeName, VertexBuffer *pVertexBuffer, PLCore::uint32 nIndex) |
Sets a attribute by using an index to reference the vertex buffer attribute to use. | |
bool | Set (const PLCore::String &sAttributeName, VertexBuffer *pVertexBuffer, VertexBuffer::ESemantic nSemantic, PLCore::uint32 nChannel=0) |
Sets a attribute by using a semantic to reference the vertex buffer attribute to use. |
Comfort renderer program wrapper.
The purpose of this "ProgramWrapper"-interface is to make simple usage as shown in the example above more compact and direct by allowing to write m_pProgram->Set("VertexPosition", m_pVertexBuffer, VertexBuffer::Position) instead.
Please note that "ProgramWrapper" is just an interface and no real class which can be instanced. All methods are inlined and simple. In order to use this interface write e.g. ProgramWrapper *pProgram = static_cast<ProgramWrapper*>(pShaderLanguage->CreateProgram(pVertexShader, pFragmentShader)); This means that it is actually a hack because one has to cast an class instance to a certain class, although the class instance is in fact not an instance of it. Due to the simplicity of "ProgramWrapper" and the fact that it doesn't introduce e.g. new variables, this is working.
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
int & | nX | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
float & | fX | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
double & | fX | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
int | nX | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
float | fX | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
double | fX | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
int & | nX, | ||
int & | nY | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
float & | fX, | ||
float & | fY | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
double & | fX, | ||
double & | fY | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLMath::Vector2i & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLMath::Vector2 & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get2 | ( | const PLCore::String & | sUniformName, |
int * | pnComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get2 | ( | const PLCore::String & | sUniformName, |
float * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get2 | ( | const PLCore::String & | sUniformName, |
double * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
int | nX, | ||
int | nY | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
float | fX, | ||
float | fY | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
double | fX, | ||
double | fY | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLMath::Vector2i & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLMath::Vector2 & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set2 | ( | const PLCore::String & | sUniformName, |
const int * | pnComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set2 | ( | const PLCore::String & | sUniformName, |
const float * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set2 | ( | const PLCore::String & | sUniformName, |
const double * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
int & | nX, | ||
int & | nY, | ||
int & | nZ | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
float & | fX, | ||
float & | fY, | ||
float & | fZ | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
double & | fX, | ||
double & | fY, | ||
double & | fZ | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLMath::Vector3i & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLMath::Vector3 & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLGraphics::Color3 & | cColor | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get3 | ( | const PLCore::String & | sUniformName, |
int * | pnComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get3 | ( | const PLCore::String & | sUniformName, |
float * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get3 | ( | const PLCore::String & | sUniformName, |
double * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
int | nX, | ||
int | nY, | ||
int | nZ | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
float | fX, | ||
float | fY, | ||
float | fZ | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
double | fX, | ||
double | fY, | ||
double | fZ | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLMath::Vector3i & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLMath::Vector3 & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLGraphics::Color3 & | cColor | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set3 | ( | const PLCore::String & | sUniformName, |
const int * | pnComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set3 | ( | const PLCore::String & | sUniformName, |
const float * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set3 | ( | const PLCore::String & | sUniformName, |
const double * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
int & | nX, | ||
int & | nY, | ||
int & | nZ, | ||
int & | nW | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
float & | fX, | ||
float & | fY, | ||
float & | fZ, | ||
float & | fW | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
double & | fX, | ||
double & | fY, | ||
double & | fZ, | ||
double & | fW | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLMath::Vector4 & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLGraphics::Color4 & | cColor | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLMath::Quaternion & | qQuaternion | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get4 | ( | const PLCore::String & | sUniformName, |
int * | pnComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get4 | ( | const PLCore::String & | sUniformName, |
float * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get4 | ( | const PLCore::String & | sUniformName, |
double * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
int | nX, | ||
int | nY, | ||
int | nZ, | ||
int | nW | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
float | fX, | ||
float | fY, | ||
float | fZ, | ||
float | fW | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
double | fX, | ||
double | fY, | ||
double | fZ, | ||
double | fW | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLMath::Vector4 & | vVector | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLGraphics::Color4 & | cColor | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLMath::Quaternion & | qQuaternion | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set4 | ( | const PLCore::String & | sUniformName, |
const int * | pnComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set4 | ( | const PLCore::String & | sUniformName, |
const float * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set4 | ( | const PLCore::String & | sUniformName, |
const double * | pfComponents | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLMath::Matrix3x3 & | mMatrix | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Get | ( | const PLCore::String & | sUniformName, |
PLMath::Matrix4x4 & | mMatrix | ||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLMath::Matrix3x3 & | mMatrix, | ||
bool | bTranspose = false |
||
) | [inline] |
void PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
const PLMath::Matrix4x4 & | mMatrix, | ||
bool | bTranspose = false |
||
) | [inline] |
int PLRenderer::ProgramWrapper::GetTextureUnit | ( | const PLCore::String & | sUniformName | ) | [inline] |
int PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformName, |
TextureBuffer * | pTextureBuffer | ||
) | [inline] |
bool PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sUniformBlockName, |
UniformBuffer * | pUniformBuffer, | ||
PLCore::uint32 | nBindingPoint | ||
) | [inline] |
Sets the uniform buffer feeding the specified uniform block with data.
[in] | sUniformBlockName | Uniform block name |
[in] | pUniformBuffer | The uniform buffer feeding this uniform block with data, can be a null pointer |
[in] | nBindingPoint | Binding point to use |
bool PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sAttributeName, |
VertexBuffer * | pVertexBuffer, | ||
PLCore::uint32 | nIndex | ||
) | [inline] |
Sets a attribute by using an index to reference the vertex buffer attribute to use.
[in] | sAttributeName | Attribute name |
[in] | pVertexBuffer | Vertex buffer to use, can be a null pointer |
[in] | nIndex | Index of the vertex buffer attribute to connect with the vertex shader attribute |
bool PLRenderer::ProgramWrapper::Set | ( | const PLCore::String & | sAttributeName, |
VertexBuffer * | pVertexBuffer, | ||
VertexBuffer::ESemantic | nSemantic, | ||
PLCore::uint32 | nChannel = 0 |
||
) | [inline] |
Sets a attribute by using a semantic to reference the vertex buffer attribute to use.
[in] | sAttributeName | Attribute name |
[in] | pVertexBuffer | Vertex buffer to use, can be a null pointer |
[in] | nSemantic | Semantic of the vertex buffer attribute to connect with the vertex shader attribute |
[in] | nChannel | Pipeline channel (see ESemantic, maximum see MaxPipelineChannels) |
|