Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
icl::geom::ShaderUtil Class Reference

#include <ShaderUtil.h>

List of all members.

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::GLFragmentShaderactiveShader
const std::vector< Mat > * project2shadow
float m_shadowBias
bool renderingShadow

Detailed Description

The ShaderUtil is an easy to use wrapper for activating the correct shader for the primitive that is to be rendered.


Member Enumeration Documentation

Enum representing the different shader types.

Enumerator:
SHADOW 
SHADOW_TEXTURE 
NO_SHADOW 
NO_SHADOW_TEXTURE 
COUNT 

Constructor & Destructor Documentation

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.


Member Function Documentation

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]

Member Data Documentation

const std::vector<Mat>* icl::geom::ShaderUtil::project2shadow [private]

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