Blender V2.61 - r43446
Public Types | Public Member Functions

BL_Shader Class Reference

#include <BL_Shader.h>

Inheritance diagram for BL_Shader:
Inheritance graph
[legend]

List of all members.

Public Types

enum  AttribTypes { SHD_TANGENT = 1 }
enum  GenType {
  MODELVIEWMATRIX, MODELVIEWMATRIX_TRANSPOSE, MODELVIEWMATRIX_INVERSE, MODELVIEWMATRIX_INVERSETRANSPOSE,
  MODELMATRIX, MODELMATRIX_TRANSPOSE, MODELMATRIX_INVERSE, MODELMATRIX_INVERSETRANSPOSE,
  VIEWMATRIX, VIEWMATRIX_TRANSPOSE, VIEWMATRIX_INVERSE, VIEWMATRIX_INVERSETRANSPOSE,
  CAM_POS, CONSTANT_TIMER
}

Public Member Functions

 BL_Shader ()
virtual ~BL_Shader ()
const char * GetVertPtr ()
const char * GetFragPtr ()
void SetVertPtr (char *vert)
void SetFragPtr (char *frag)
int getNumPass ()
bool GetError ()
void SetSampler (int loc, int unit)
bool Ok () const
unsigned int GetProg ()
void SetProg (bool enable)
int GetAttribute ()
void ApplyShader ()
void UnloadShader ()
void Update (const class RAS_MeshSlot &ms, class RAS_IRasterizer *rasty)
void SetUniformfv (int location, int type, float *param, int size, bool transpose=false)
void SetUniformiv (int location, int type, int *param, int size, bool transpose=false)
int GetAttribLocation (const STR_String &name)
void BindAttribute (const STR_String &attr, int loc)
int GetUniformLocation (const STR_String &name)
void SetUniform (int uniform, const MT_Tuple2 &vec)
void SetUniform (int uniform, const MT_Tuple3 &vec)
void SetUniform (int uniform, const MT_Tuple4 &vec)
void SetUniform (int uniform, const MT_Matrix4x4 &vec, bool transpose=false)
void SetUniform (int uniform, const MT_Matrix3x3 &vec, bool transpose=false)
void SetUniform (int uniform, const float &val)
void SetUniform (int uniform, const float *val, int len)
void SetUniform (int uniform, const int *val, int len)
void SetUniform (int uniform, const unsigned int &val)
void SetUniform (int uniform, const int val)

Detailed Description

BL_Shader shader access

Definition at line 117 of file BL_Shader.h.


Member Enumeration Documentation

Enumerator:
SHD_TANGENT 

Definition at line 153 of file BL_Shader.h.

Enumerator:
MODELVIEWMATRIX 
MODELVIEWMATRIX_TRANSPOSE 
MODELVIEWMATRIX_INVERSE 
MODELVIEWMATRIX_INVERSETRANSPOSE 
MODELMATRIX 
MODELMATRIX_TRANSPOSE 
MODELMATRIX_INVERSE 
MODELMATRIX_INVERSETRANSPOSE 
VIEWMATRIX 
VIEWMATRIX_TRANSPOSE 
VIEWMATRIX_INVERSE 
VIEWMATRIX_INVERSETRANSPOSE 
CAM_POS 
CONSTANT_TIMER 

Definition at line 157 of file BL_Shader.h.


Constructor & Destructor Documentation

BL_Shader::BL_Shader ( )

Definition at line 119 of file BL_Shader.cpp.

BL_Shader::~BL_Shader ( ) [virtual]

Definition at line 137 of file BL_Shader.cpp.


Member Function Documentation

void BL_Shader::ApplyShader ( )

Definition at line 228 of file BL_Shader.cpp.

References i.

void BL_Shader::BindAttribute ( const STR_String attr,
int  loc 
)

Definition at line 568 of file BL_Shader.cpp.

References STR_String::ReadPtr().

int BL_Shader::GetAttribLocation ( const STR_String name)

Definition at line 555 of file BL_Shader.cpp.

References STR_String::ReadPtr().

int BL_Shader::GetAttribute ( ) [inline]

Definition at line 197 of file BL_Shader.h.

bool BL_Shader::GetError ( ) [inline]

Definition at line 189 of file BL_Shader.h.

const char * BL_Shader::GetFragPtr ( )

Definition at line 378 of file BL_Shader.cpp.

int BL_Shader::getNumPass ( ) [inline]

Definition at line 188 of file BL_Shader.h.

Referenced by KX_BlenderMaterial::Activate().

unsigned int BL_Shader::GetProg ( )

Definition at line 393 of file BL_Shader.cpp.

int BL_Shader::GetUniformLocation ( const STR_String name)

Definition at line 579 of file BL_Shader.cpp.

References MT_assert, STR_String::ReadPtr(), and spit.

const char * BL_Shader::GetVertPtr ( )

Definition at line 373 of file BL_Shader.cpp.

bool BL_Shader::Ok ( ) const

Definition at line 114 of file BL_Shader.cpp.

Referenced by KX_BlenderMaterial::Activate().

void BL_Shader::SetFragPtr ( char *  frag)

Definition at line 388 of file BL_Shader.cpp.

void BL_Shader::SetProg ( bool  enable)
void BL_Shader::SetSampler ( int  loc,
int  unit 
)

Definition at line 404 of file BL_Shader.cpp.

void BL_Shader::SetUniform ( int  uniform,
const MT_Tuple3 vec 
)

Definition at line 610 of file BL_Shader.cpp.

References MT_Tuple3::getValue().

void BL_Shader::SetUniform ( int  uniform,
const MT_Matrix4x4 vec,
bool  transpose = false 
)

Definition at line 669 of file BL_Shader.cpp.

void BL_Shader::SetUniform ( int  uniform,
const unsigned int &  val 
)

Definition at line 636 of file BL_Shader.cpp.

void BL_Shader::SetUniform ( int  uniform,
const float *  val,
int  len 
)

Definition at line 698 of file BL_Shader.cpp.

References MT_assert.

void BL_Shader::SetUniform ( int  uniform,
const int  val 
)

Definition at line 647 of file BL_Shader.cpp.

void BL_Shader::SetUniform ( int  uniform,
const MT_Tuple2 vec 
)

Definition at line 596 of file BL_Shader.cpp.

References MT_Tuple2::getValue().

void BL_Shader::SetUniform ( int  uniform,
const MT_Tuple4 vec 
)

Definition at line 623 of file BL_Shader.cpp.

References MT_Tuple4::getValue().

void BL_Shader::SetUniform ( int  uniform,
const int *  val,
int  len 
)

Definition at line 716 of file BL_Shader.cpp.

References MT_assert.

void BL_Shader::SetUniform ( int  uniform,
const MT_Matrix3x3 vec,
bool  transpose = false 
)

Definition at line 683 of file BL_Shader.cpp.

void BL_Shader::SetUniform ( int  uniform,
const float &  val 
)

Definition at line 658 of file BL_Shader.cpp.

void BL_Shader::SetUniformfv ( int  location,
int  type,
float *  param,
int  size,
bool  transpose = false 
)

Definition at line 190 of file BL_Shader.cpp.

References BL_Uniform::getData(), BL_Uniform::SetData(), and size().

void BL_Shader::SetUniformiv ( int  location,
int  type,
int *  param,
int  size,
bool  transpose = false 
)

Definition at line 209 of file BL_Shader.cpp.

References BL_Uniform::getData(), BL_Uniform::SetData(), and size().

void BL_Shader::SetVertPtr ( char *  vert)

Definition at line 383 of file BL_Shader.cpp.

void BL_Shader::UnloadShader ( )

Definition at line 241 of file BL_Shader.cpp.

void BL_Shader::Update ( const class RAS_MeshSlot ms,
class RAS_IRasterizer rasty 
)

The documentation for this class was generated from the following files: