#include <VShader.h>
Public Member Functions | |
VShader (const VShader &rhs) | |
~VShader () | |
Protected Member Functions | |
VShader (const unsigned int uType) | |
void | initialize () |
void | uninitialize () |
void | load (const std::string &strFilename) |
const unsigned int | GetObject () const |
const unsigned int | GetType () const |
void | attach () const |
void | detach () const |
Protected Attributes | |
int * | m_refCount |
const unsigned int | m_uType |
unsigned int | m_uObject |
Static Protected Attributes | |
static std::map< unsigned int, unsigned int > | s_mapAttachment |
Friends | |
class | VProgram |
Definition at line 20 of file VShader.h.
VShader::VShader | ( | const VShader & | rhs | ) | [inline] |
VShader::~VShader | ( | ) | [inline] |
default destructor
Definition at line 38 of file VShader.h.
References m_refCount, and uninitialize().
VShader::VShader | ( | const unsigned int | uType | ) | [inline, protected] |
constructor. proteced makes sure that no Shader Object is constructed, only subclasses
uType | Type of Shader (GL_VERTEX_SHADER_ARB, GL_FRAGMENT_SHADER_ARB) |
Definition at line 56 of file VShader.h.
References initialize(), and m_refCount.
void VShader::initialize | ( | ) | [protected] |
initializes the shader object
Definition at line 4 of file VShader.cpp.
References m_uObject, m_uType, and s_mapAttachment.
Referenced by VShader().
void VShader::uninitialize | ( | ) | [protected] |
unitializes the shader object
Definition at line 27 of file VShader.cpp.
References m_uObject, and s_mapAttachment.
Referenced by ~VShader().
void VShader::load | ( | const std::string & | strFilename | ) | [protected] |
loads the shader object from a given Filename
strFilename | Filename of Shader File |
Definition at line 43 of file VShader.cpp.
References m_uObject.
Referenced by VFragmentShader::VFragmentShader(), and VVertexShader::VVertexShader().
const unsigned int VShader::GetObject | ( | ) | const [inline, protected] |
gets the handle to the Shader Object
Definition at line 83 of file VShader.h.
References m_uObject.
Referenced by VProgram::attach(), and VProgram::detach().
const unsigned int VShader::GetType | ( | ) | const [inline, protected] |
void VShader::attach | ( | ) | const [inline, protected] |
attaches the current object
Definition at line 100 of file VShader.h.
References m_uObject, and s_mapAttachment.
Referenced by VProgram::attach().
void VShader::detach | ( | ) | const [inline, protected] |
detaches the current Object
Definition at line 108 of file VShader.h.
References m_uObject, and s_mapAttachment.
Referenced by VProgram::detach().
int* VShader::m_refCount [protected] |
Reference Counter.
Definition at line 112 of file VShader.h.
Referenced by VShader(), and ~VShader().
const unsigned int VShader::m_uType [protected] |
the type of the shader.
Definition at line 115 of file VShader.h.
Referenced by GetType(), and initialize().
unsigned int VShader::m_uObject [protected] |
the handle to the current Shader object.
Definition at line 116 of file VShader.h.
Referenced by attach(), detach(), GetObject(), initialize(), load(), and uninitialize().
std::map< unsigned int, unsigned int > VShader::s_mapAttachment [static, protected] |
static map containing the current attachments.
Definition at line 118 of file VShader.h.
Referenced by attach(), detach(), initialize(), and uninitialize().