List of all members.
Detailed Description
Shader classes are used to link several shaders (Vertex-, Pixel shaders etc.) to one shader program. Modern graphics hardware has the following shader stages:
Constructor & Destructor Documentation
sp::video::ShaderClass::~ShaderClass |
( |
|
) |
[virtual] |
sp::video::ShaderClass::ShaderClass |
( |
|
) |
[protected] |
Member Function Documentation
virtual void sp::video::ShaderClass::bind |
( |
const scene::MaterialNode * |
Object = 0 |
) |
[pure virtual] |
Builds a complete shader class with the specified vertex-format, shader source code and build flags. This is particularly used internally for the deferred-renderer and post-processing effects.
- Parameters:
-
[in] | Name | Specifies the shader name and is used for possible error messages. |
[out] | ShdClass | Specifies the resulting shader class object. |
[in] | VertFmt | Pointer to the vertex format used for the shader class. |
[in] | ShdBufferVertex | Constant pointer to the vertex shader source code (std::list<io::stringc>). |
[in] | ShdBufferPixel | Constant pointer to the pixel shader source code (std::list<io::stringc>). |
[in] | VertexMain | Specifies the name of the vertex shader main function. |
[in] | PixelMain | Specifies the name of the pixel shader main function. |
[in] | Flags | Specifies the compilation flags. This can be one of the following values: SHADERBUILD_CG, SHADERBUILD_GLSL, SHADERBUILD_HLSL3 or SHADERBUILD_HLSL5. |
- Returns:
- True if the shader class could be created successful.
- Note:
- This function always failes if "ShdBufferVertex" is null pointers.
- See also:
- VertexFormat
-
EBuildShaderFlags
- Since:
- Version 3.2
Shader* sp::video::ShaderClass::getComputeShader |
( |
|
) |
const [inline] |
const std::vector<ConstantBuffer*>& sp::video::ShaderClass::getConstantBufferList |
( |
|
) |
const [inline] |
Returns the list of all shader constant buffers used in the shader-class. To get the list of all shader constant buffers used in a single shader object, use the equivalent function of the respective shader.
- See also:
- Shader::getConstantBufferList
Shader* sp::video::ShaderClass::getDomainShader |
( |
|
) |
const [inline] |
Shader* sp::video::ShaderClass::getGeometryShader |
( |
|
) |
const [inline] |
Shader* sp::video::ShaderClass::getHullShader |
( |
|
) |
const [inline] |
Shader* sp::video::ShaderClass::getPixelShader |
( |
|
) |
const [inline] |
Returns the shader version used for the specified flags.
- Parameters:
-
[in] | Flags | Specifies the build flags. This can be a combination of the values in the "EBuildShaderFlags" enumeration. |
- Returns:
- Shader version specified in the "EShaderVersions" enumeration. If no version could be found "DUMMYSHADER_VERSION" will be returned.
- See also:
- EBuildShaderFlags
- Since:
- Version 3.2
Shader* sp::video::ShaderClass::getVertexShader |
( |
|
) |
const [inline] |
bool sp::video::ShaderClass::isHighLevel |
( |
|
) |
const [inline] |
Returns true if the shader is a high level shader.
virtual bool sp::video::ShaderClass::link |
( |
|
) |
[pure virtual] |
void sp::video::ShaderClass::printError |
( |
const io::stringc & |
Message |
) |
[protected] |
void sp::video::ShaderClass::printWarning |
( |
const io::stringc & |
Message |
) |
[protected] |
void sp::video::ShaderClass::setObjectCallback |
( |
const ShaderObjectCallback & |
CallbackProc |
) |
[inline] |
Sets the shader object callback function.
- Parameters:
-
| CallbackProc,: | Callback function in the form of "void Callback(ShaderClass* Table, const scene::MaterialNode* Object);". This callback normally is used to update the world- view matrix. In GLSL these matrices are integrated but in HLSL you have to set these shader-constants manually. |
Sets the shader surface callback function.
- Parameters:
-
[in] | CallbackProc | Specifies the surface callback function. This callback normally is used to update texture settings for each surface. |
- See also:
- ShaderSurfaceCallback
virtual void sp::video::ShaderClass::unbind |
( |
|
) |
[pure virtual] |
bool sp::video::ShaderClass::valid |
( |
|
) |
const [inline] |
Returns true if the shader class has been compiled successfully.
Friends And Related Function Documentation
Member Data Documentation
The documentation for this class was generated from the following files:
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/RenderSystem/spShaderClass.hpp
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/RenderSystem/spShaderClass.cpp