Image Component Library (ICL)
|
#include <ShaderUtil.h>
Public Types | |
enum | ShaderType { SHADOW, SHADOW_TEXTURE, NO_SHADOW, NO_SHADOW_TEXTURE, COUNT } |
Enum representing the different shader types. More... | |
Public Member Functions | |
ShaderUtil (const Camera *camera, icl::qt::GLFragmentShader **shaders, const std::vector< Mat > *project2shadow, float shadowBias) | |
ShaderUtil () | |
void | activateShader (Primitive::Type type, bool withShadow) |
void | deactivateShaders () |
const Camera & | getCurrentCamera () const |
Static Public Member Functions | |
static void | recompilePerPixelShader (icl::qt::GLFragmentShader **shaders, const icl::utils::SmartPtr< SceneLight > *lights, int numShadowLights) |
Private Attributes | |
const Camera * | m_camera |
icl::qt::GLFragmentShader ** | m_shaders |
icl::qt::GLFragmentShader * | activeShader |
const std::vector< Mat > * | project2shadow |
float | m_shadowBias |
bool | renderingShadow |
Additional Inherited Members | |
Protected Member Functions inherited from icl::utils::Uncopyable | |
Uncopyable () | |
Empty base constructor. More... | |
The ShaderUtil is an easy to use wrapper for activating the correct shader for the primitive that is to be rendered.
icl::geom::ShaderUtil::ShaderUtil | ( | const Camera * | camera, |
icl::qt::GLFragmentShader ** | shaders, | ||
const std::vector< Mat > * | project2shadow, | ||
float | shadowBias | ||
) |
icl::geom::ShaderUtil::ShaderUtil | ( | ) |
This constructor can be used, when the ShaderUtil is not supposed to activate any shaders. The main use for this is to make it transparent to the render function of an object if it is to be rendered into the shadowbuffer or not.
void icl::geom::ShaderUtil::activateShader | ( | Primitive::Type | type, |
bool | withShadow | ||
) |
void icl::geom::ShaderUtil::deactivateShaders | ( | ) |
const Camera& icl::geom::ShaderUtil::getCurrentCamera | ( | ) | const |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |