Public Member Functions | Friends

sp::video::OpenGLShader Class Reference

#include <spOpenGLShader.hpp>

Inheritance diagram for sp::video::OpenGLShader:
sp::video::Shader

List of all members.

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 SShaderConstantgetConstantRef (const io::stringc &Name) const
const SShaderConstantgetConstant (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

Constructor & Destructor Documentation

sp::video::OpenGLShader::OpenGLShader ( ShaderClass Table,
const EShaderTypes  Type,
const EShaderVersions  Version 
)
sp::video::OpenGLShader::~OpenGLShader (  ) 

Member Function Documentation

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.

Parameters:
[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.
Returns:
True if the shader could be compiled successful.

Reimplemented from sp::video::Shader.

const SShaderConstant& sp::video::OpenGLShader::getConstant ( const io::stringc Name  )  const [virtual]

Returns the specified shader constant.

Parameters:
[in] Name Specifies the shader constant name (or rather shader uniform).
Returns:
Constant reference to the SShaderConstant object. If the shader constant does not exist, the default dempty shader constant will be returned.

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.

Parameters:
[in] Name Specifies the shader constant name (or rather shader uniform).
Returns:
Constant pointer to the specified shader constant or null if the shader constant does not exist.

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.

Parameters:
[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+).

Parameters:
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.


Friends And Related Function Documentation

friend class OpenGLShaderClass [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines