#include <spOpenGLShader.hpp>
Public Member Functions | |
OpenGLShader (ShaderClass *Table, const EShaderTypes Type, const EShaderVersions Version) | |
~OpenGLShader () | |
bool | compile (const std::list< io::stringc > &ShaderBuffer, const io::stringc &EntryPoint="", const c8 **CompilerOptions=0) |
const SShaderConstant * | getConstantRef (const io::stringc &Name) const |
const SShaderConstant & | getConstant (const io::stringc &Name) const |
bool | setConstant (s32 Number, const EConstantTypes Type, const f32 Value) |
bool | setConstant (s32 Number, const EConstantTypes Type, const f32 *Buffer, s32 Count) |
bool | setConstant (s32 Number, const EConstantTypes Type, const dim::vector3df &Position) |
bool | setConstant (s32 Number, const EConstantTypes Type, const video::color &Color) |
bool | setConstant (s32 Number, const EConstantTypes Type, const dim::matrix4f &Matrix) |
bool | setConstant (const io::stringc &Name, const f32 Value) |
bool | setConstant (const io::stringc &Name, const f32 *Buffer, s32 Count) |
bool | setConstant (const io::stringc &Name, const s32 Value) |
bool | setConstant (const io::stringc &Name, const s32 *Buffer, s32 Count) |
bool | setConstant (const io::stringc &Name, const dim::vector3df &Vector) |
bool | setConstant (const io::stringc &Name, const dim::vector4df &Vector) |
bool | setConstant (const io::stringc &Name, const video::color &Color) |
bool | setConstant (const io::stringc &Name, const dim::matrix4f &Matrix) |
bool | setConstant (const SShaderConstant &Constant, const f32 Value) |
bool | setConstant (const SShaderConstant &Constant, const f32 *Buffer, s32 Count) |
bool | setConstant (const SShaderConstant &Constant, const s32 Value) |
bool | setConstant (const SShaderConstant &Constant, const s32 *Buffer, s32 Count) |
bool | setConstant (const SShaderConstant &Constant, const dim::vector3df &Vector) |
bool | setConstant (const SShaderConstant &Constant, const dim::vector4df &Vector) |
bool | setConstant (const SShaderConstant &Constant, const video::color &Color) |
bool | setConstant (const SShaderConstant &Constant, const dim::matrix4f &Matrix) |
bool | setConstant (const f32 *Buffer, s32 StartRegister, s32 ConstAmount) |
bool | setConstantBuffer (const io::stringc &Name, const void *Buffer) |
Friends | |
class | OpenGLShaderClass |
sp::video::OpenGLShader::OpenGLShader | ( | ShaderClass * | Table, | |
const EShaderTypes | Type, | |||
const EShaderVersions | Version | |||
) |
sp::video::OpenGLShader::~OpenGLShader | ( | ) |
bool sp::video::OpenGLShader::compile | ( | const std::list< io::stringc > & | ShaderBuffer, | |
const io::stringc & | EntryPoint = "" , |
|||
const c8 ** | CompilerOptions = 0 | |||
) | [virtual] |
Compiles the given shader source code.
[in] | ShaderBuffer | Specifies the shader source code in form of a string container. Each string line has to end with the end-of-line character (' ')! |
[in] | EntryPoint | Specifies the shader entry point. This not required for GLSL shaders. But for HLSL and Cg. It's actually just the shader's main function name. |
[in] | CompilerOptions | Specifies the pointer to the comiler option strings. |
Reimplemented from sp::video::Shader.
const SShaderConstant& sp::video::OpenGLShader::getConstant | ( | const io::stringc & | Name | ) | const [virtual] |
Returns the specified shader constant.
[in] | Name | Specifies the shader constant name (or rather shader uniform). |
Reimplemented from sp::video::Shader.
const SShaderConstant* sp::video::OpenGLShader::getConstantRef | ( | const io::stringc & | Name | ) | const [virtual] |
Returns a pointer to the specified shader constant.
[in] | Name | Specifies the shader constant name (or rather shader uniform). |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const f32 * | Buffer, | |
s32 | StartRegister, | |||
s32 | ConstAmount | |||
) | [virtual] |
Sets floating-point constant arrays for assembly shaders.
[in] | Buffer | Pointer to a floating-point buffer. |
[in] | StartRegister | Specifies the register start offset (in 4 bytes). |
[in] | ConstAmount | Specifies the count of constants (or rather array size). |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const SShaderConstant & | Constant, | |
const video::color & | Color | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const SShaderConstant & | Constant, | |
const dim::vector4df & | Vector | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const SShaderConstant & | Constant, | |
const dim::vector3df & | Vector | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const SShaderConstant & | Constant, | |
const s32 * | Buffer, | |||
s32 | Count | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const SShaderConstant & | Constant, | |
const s32 | Value | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const SShaderConstant & | Constant, | |
const f32 * | Buffer, | |||
s32 | Count | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const SShaderConstant & | Constant, | |
const f32 | Value | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | s32 | Number, | |
const EConstantTypes | Type, | |||
const f32 | Value | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const io::stringc & | Name, | |
const video::color & | Color | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const io::stringc & | Name, | |
const dim::vector4df & | Vector | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const io::stringc & | Name, | |
const dim::vector3df & | Vector | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const SShaderConstant & | Constant, | |
const dim::matrix4f & | Matrix | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const io::stringc & | Name, | |
const s32 | Value | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const io::stringc & | Name, | |
const f32 * | Buffer, | |||
s32 | Count | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const io::stringc & | Name, | |
const f32 | Value | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | s32 | Number, | |
const EConstantTypes | Type, | |||
const dim::matrix4f & | Matrix | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | s32 | Number, | |
const EConstantTypes | Type, | |||
const video::color & | Color | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const io::stringc & | Name, | |
const s32 * | Buffer, | |||
s32 | Count | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | s32 | Number, | |
const EConstantTypes | Type, | |||
const f32 * | Buffer, | |||
s32 | Count | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | const io::stringc & | Name, | |
const dim::matrix4f & | Matrix | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstant | ( | s32 | Number, | |
const EConstantTypes | Type, | |||
const dim::vector3df & | Position | |||
) | [virtual] |
Reimplemented from sp::video::Shader.
bool sp::video::OpenGLShader::setConstantBuffer | ( | const io::stringc & | Name, | |
const void * | Buffer | |||
) | [virtual] |
Fills a constant buffer with content (actual only for HLSL ShaderModel 4+).
Name,: | Constant buffer's name which is to be used. | |
Buffer,: | Pointer to the buffer where the content for the constant buffer is stored. This buffer needs to have the same size like the constant buffer in the shader! |
Reimplemented from sp::video::Shader.
friend class OpenGLShaderClass [friend] |