#include <Shader.h>
Public Member Functions | |
| void | ClearConstants () |
| bool | SetConstant (unsigned start_register, const bool *data, unsigned count) |
| bool | SetConstant (unsigned start_register, const float *data, unsigned count) |
| bool | SetConstant (unsigned start_register, const int *data, unsigned count) |
| bool | SetConstant (unsigned start_register, float f) |
| bool | SetConstant (unsigned start_register, const ml7::Vector2 &v) |
| bool | SetConstant (unsigned start_register, const ml7::Vector3 &v) |
| bool | SetConstant (unsigned start_register, const ml7::Vector4 &v) |
| bool | SetConstant (unsigned start_register, const ml7::Matrix3x4 &m) |
| bool | SetConstant (unsigned start_register, const ml7::Matrix4x4 &m) |
| bool | SetConstant (unsigned start_register, D3DCOLOR color) |
| bool | SetConstant (unsigned start_register, const colors::Color &color) |
| virtual bool | Begin ()=0 |
| virtual bool | End ()=0 |
| virtual bool | FlushConstants ()=0 |
Protected Types | |
| typedef std::vector< ConstantB > | ConstantBs |
| typedef std::vector< ConstantF > | ConstantFs |
| typedef std::vector< ConstantI > | ConstantIs |
Protected Member Functions | |
| Shader (ShaderManager *manager) | |
| Shader (ShaderManager *manager, const cl7::string_type &identifier) | |
| virtual | ~Shader (void) |
| const ConstantBs * | GetConstantBs () const |
| const ConstantFs * | GetConstantFs () const |
| const ConstantIs * | GetConstantIs () const |
The base class for shader programs (vertex and pixel shaders).
typedef std::vector<ConstantB> xl7::direct3d::shader::Shader::ConstantBs [protected] |
typedef std::vector<ConstantF> xl7::direct3d::shader::Shader::ConstantFs [protected] |
typedef std::vector<ConstantI> xl7::direct3d::shader::Shader::ConstantIs [protected] |
| xl7::direct3d::shader::Shader::Shader | ( | ShaderManager * | manager | ) | [protected] |
Explicit constructor.
| xl7::direct3d::shader::Shader::Shader | ( | ShaderManager * | manager, | |
| const cl7::string_type & | identifier | |||
| ) | [protected] |
Explicit constructor.
| xl7::direct3d::shader::Shader::~Shader | ( | void | ) | [protected, virtual] |
Destructor.
| virtual bool xl7::direct3d::shader::Shader::Begin | ( | ) | [pure virtual] |
Begins the shader by setting the registered constants and itself to the render device.
Implemented in xl7::direct3d::shader::PixelShader, and xl7::direct3d::shader::VertexShader.
| void xl7::direct3d::shader::Shader::ClearConstants | ( | ) |
Deletes all constant registrations.
| virtual bool xl7::direct3d::shader::Shader::End | ( | ) | [pure virtual] |
Ends the shader by deleting all the registered constants.
Implemented in xl7::direct3d::shader::PixelShader, and xl7::direct3d::shader::VertexShader.
| virtual bool xl7::direct3d::shader::Shader::FlushConstants | ( | ) | [pure virtual] |
Flushes the shader constants by pushing them to the render device. (The shader must be the active one.)
Implemented in xl7::direct3d::shader::PixelShader, and xl7::direct3d::shader::VertexShader.
| const ConstantBs* xl7::direct3d::shader::Shader::GetConstantBs | ( | ) | const [inline, protected] |
Returns the list of boolean constants.
| const ConstantFs* xl7::direct3d::shader::Shader::GetConstantFs | ( | ) | const [inline, protected] |
Returns the list of float constants.
| const ConstantIs* xl7::direct3d::shader::Shader::GetConstantIs | ( | ) | const [inline, protected] |
Returns the list of integer constants.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const ml7::Matrix3x4 & | m | |||
| ) |
Sets a single 3x4-matrix shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const ml7::Vector4 & | v | |||
| ) |
Sets a single 4d-vector shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const ml7::Vector3 & | v | |||
| ) |
Sets a single 3d-vector shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const ml7::Vector2 & | v | |||
| ) |
Sets a single 2d-vector shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| float | f | |||
| ) |
Sets a single floating-point shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const int * | data, | |||
| unsigned | count | |||
| ) |
Sets an integer shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const float * | data, | |||
| unsigned | count | |||
| ) |
Sets a floating-point shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const bool * | data, | |||
| unsigned | count | |||
| ) |
Sets a boolean shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const colors::Color & | color | |||
| ) |
Sets a single color shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| const ml7::Matrix4x4 & | m | |||
| ) |
Sets a single 4x4-matrix shader constant.
| bool xl7::direct3d::shader::Shader::SetConstant | ( | unsigned | start_register, | |
| D3DCOLOR | color | |||
| ) |
Sets a single color shader constant.
1.7.1