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 (icl::qt::GLFragmentShader **shaders, const std::vector< Mat > *project2shadow, float shadowBias) | |
ShaderUtil () | |
void | activateShader (Primitive::Type type, bool withShadow) |
void | deactivateShaders () |
Static Public Member Functions | |
static void | recompilePerPixelShader (icl::qt::GLFragmentShader **shaders, const icl::utils::SmartPtr< SceneLight > *lights, int numShadowLights) |
Private Attributes | |
icl::qt::GLFragmentShader ** | m_shaders |
icl::qt::GLFragmentShader * | activeShader |
const std::vector< Mat > * | project2shadow |
float | m_shadowBias |
bool | renderingShadow |
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 | ( | icl::qt::GLFragmentShader ** | shaders, |
const std::vector< Mat > * | project2shadow, | ||
float | shadowBias | ||
) |
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 | ||
) |
static void icl::geom::ShaderUtil::recompilePerPixelShader | ( | icl::qt::GLFragmentShader ** | shaders, |
const icl::utils::SmartPtr< SceneLight > * | lights, | ||
int | numShadowLights | ||
) | [static] |
float icl::geom::ShaderUtil::m_shadowBias [private] |
const std::vector<Mat>* icl::geom::ShaderUtil::project2shadow [private] |
bool icl::geom::ShaderUtil::renderingShadow [private] |