PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLRenderer::ProgramUniform Class Reference

Abstract renderer program uniform. More...

#include <ProgramUniform.h>

List of all members.

Public Member Functions

virtual void Get (int &nX)=0
virtual void Get (float &fX)=0
virtual void Get (double &fX)=0
virtual void Set (int nX)=0
virtual void Set (float fX)=0
virtual void Set (double fX)=0
virtual void Get (int &nX, int &nY)=0
virtual void Get (float &fX, float &fY)=0
virtual void Get (double &fX, double &fY)=0
virtual void Get (PLMath::Vector2i &vVector)=0
virtual void Get (PLMath::Vector2 &vVector)=0
virtual void Get2 (int *pnComponents)=0
virtual void Get2 (float *pfComponents)=0
virtual void Get2 (double *pfComponents)=0
virtual void Set (int nX, int nY)=0
virtual void Set (float fX, float fY)=0
virtual void Set (double fX, double fY)=0
virtual void Set (const PLMath::Vector2i &vVector)=0
virtual void Set (const PLMath::Vector2 &vVector)=0
virtual void Set2 (const int *pnComponents)=0
virtual void Set2 (const float *pfComponents)=0
virtual void Set2 (const double *pfComponents)=0
virtual void Get (int &nX, int &nY, int &nZ)=0
virtual void Get (float &fX, float &fY, float &fZ)=0
virtual void Get (double &fX, double &fY, double &fZ)=0
virtual void Get (PLMath::Vector3i &vVector)=0
virtual void Get (PLMath::Vector3 &vVector)=0
virtual void Get (PLGraphics::Color3 &cColor)=0
virtual void Get3 (int *pnComponents)=0
virtual void Get3 (float *pfComponents)=0
virtual void Get3 (double *pfComponents)=0
virtual void Set (int nX, int nY, int nZ)=0
virtual void Set (float fX, float fY, float fZ)=0
virtual void Set (double fX, double fY, double fZ)=0
virtual void Set (const PLMath::Vector3i &vVector)=0
virtual void Set (const PLMath::Vector3 &vVector)=0
virtual void Set (const PLGraphics::Color3 &cColor)=0
virtual void Set3 (const int *pnComponents)=0
virtual void Set3 (const float *pfComponents)=0
virtual void Set3 (const double *pfComponents)=0
virtual void Get (int &nX, int &nY, int &nZ, int &nW)=0
virtual void Get (float &fX, float &fY, float &fZ, float &fW)=0
virtual void Get (double &fX, double &fY, double &fZ, double &fW)=0
virtual void Get (PLMath::Vector4 &vVector)=0
virtual void Get (PLGraphics::Color4 &cColor)=0
virtual void Get (PLMath::Quaternion &qQuaternion)=0
virtual void Get4 (int *pnComponents)=0
virtual void Get4 (float *pfComponents)=0
virtual void Get4 (double *pfComponents)=0
virtual void Set (int nX, int nY, int nZ, int nW)=0
virtual void Set (float fX, float fY, float fZ, float fW)=0
virtual void Set (double fX, double fY, double fZ, double fW)=0
virtual void Set (const PLMath::Vector4 &vVector)=0
virtual void Set (const PLGraphics::Color4 &cColor)=0
virtual void Set (const PLMath::Quaternion &qQuaternion)=0
virtual void Set4 (const int *pnComponents)=0
virtual void Set4 (const float *pfComponents)=0
virtual void Set4 (const double *pfComponents)=0
virtual void Get (PLMath::Matrix3x3 &mMatrix)=0
virtual void Get (PLMath::Matrix4x4 &mMatrix)=0
virtual void Set (const PLMath::Matrix3x3 &mMatrix, bool bTranspose=false)=0
virtual void Set (const PLMath::Matrix4x4 &mMatrix, bool bTranspose=false)=0
virtual int GetTextureUnit () const =0
 If this uniform is a texture, this method will return the texture unit assigned to this uniform.
virtual int Set (TextureBuffer *pTextureBuffer)=0
 If this uniform is a texture, this method sets the texture buffer assigned to the uniform.

Protected Member Functions

PLRENDERER_API ProgramUniform ()
 Constructor.
virtual PLRENDERER_API ~ProgramUniform ()
 Destructor.

Detailed Description

Abstract renderer program uniform.

Remarks:
An uniform is a program parameter which stays the same for all elements processed within the shader pipeline. Whether or not parameter shadowing is used, depends on the internal shader API. GLSL and Cg perform parameter shadowing. Shadowing means that the uniform will keep it's value when another program is set and still has the same value when the program of the uniform is set again as the currently one used for rendering.

Please note that the internal shader API like GLSL or Cg may handle uniforms differently. When using Cg it's possible to set the uniform value at each time, even when the program the uniform is part of is currently not the used renderer program. When using GLSL, it's only possible to access the value of an uniform when the program, the uniform is part of, is the currently used for rendering. For performance reasons, this abstract program uniform interface can't compensate those differences. It has to be as lightweight as possible in order to keep the interface performance impact as low as possible.

In order to be as internal shader API independent as possible, it's highly recommended to access program uniforms only when the program, the uniform is part of, is currently used for rendering.

Note:
  • The value of an uniform is directly coupled to a certain program
  • Do only access uniform values when the program, the uniform is part of, is currently used for rendering

Constructor & Destructor Documentation

PLRENDERER_API PLRenderer::ProgramUniform::ProgramUniform ( ) [protected]

Constructor.

virtual PLRENDERER_API PLRenderer::ProgramUniform::~ProgramUniform ( ) [protected, virtual]

Destructor.


Member Function Documentation

virtual void PLRenderer::ProgramUniform::Get ( int &  nX) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( float &  fX) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( double &  fX) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( int  nX) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( float  fX) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( double  fX) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( int &  nX,
int &  nY 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( float &  fX,
float &  fY 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( double &  fX,
double &  fY 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLMath::Vector2i vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLMath::Vector2 vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get2 ( int *  pnComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get2 ( float *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get2 ( double *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( int  nX,
int  nY 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( float  fX,
float  fY 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( double  fX,
double  fY 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLMath::Vector2i vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLMath::Vector2 vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set2 ( const int *  pnComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set2 ( const float *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set2 ( const double *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( int &  nX,
int &  nY,
int &  nZ 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( float &  fX,
float &  fY,
float &  fZ 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( double &  fX,
double &  fY,
double &  fZ 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLMath::Vector3i vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLMath::Vector3 vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLGraphics::Color3 cColor) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get3 ( int *  pnComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get3 ( float *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get3 ( double *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( int  nX,
int  nY,
int  nZ 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( float  fX,
float  fY,
float  fZ 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( double  fX,
double  fY,
double  fZ 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLMath::Vector3i vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLMath::Vector3 vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLGraphics::Color3 cColor) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set3 ( const int *  pnComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set3 ( const float *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set3 ( const double *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( int &  nX,
int &  nY,
int &  nZ,
int &  nW 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( float &  fX,
float &  fY,
float &  fZ,
float &  fW 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( double &  fX,
double &  fY,
double &  fZ,
double &  fW 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLMath::Vector4 vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLGraphics::Color4 cColor) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLMath::Quaternion qQuaternion) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get4 ( int *  pnComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get4 ( float *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get4 ( double *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( int  nX,
int  nY,
int  nZ,
int  nW 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( float  fX,
float  fY,
float  fZ,
float  fW 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( double  fX,
double  fY,
double  fZ,
double  fW 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLMath::Vector4 vVector) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLGraphics::Color4 cColor) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLMath::Quaternion qQuaternion) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set4 ( const int *  pnComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set4 ( const float *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set4 ( const double *  pfComponents) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLMath::Matrix3x3 mMatrix) [pure virtual]
virtual void PLRenderer::ProgramUniform::Get ( PLMath::Matrix4x4 mMatrix) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLMath::Matrix3x3 mMatrix,
bool  bTranspose = false 
) [pure virtual]
virtual void PLRenderer::ProgramUniform::Set ( const PLMath::Matrix4x4 mMatrix,
bool  bTranspose = false 
) [pure virtual]
virtual int PLRenderer::ProgramUniform::GetTextureUnit ( ) const [pure virtual]

If this uniform is a texture, this method will return the texture unit assigned to this uniform.

Returns:
The texture unit assigned to this uniform, negative on error
virtual int PLRenderer::ProgramUniform::Set ( TextureBuffer pTextureBuffer) [pure virtual]

If this uniform is a texture, this method sets the texture buffer assigned to the uniform.

Returns:
The texture unit assigned to this uniform (same as GetTextureUnit()), negative on error

The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:23
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported