VShader Class Reference

#include <VShader.h>

Inheritance diagram for VShader:

VFragmentShader VVertexShader

List of all members.

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


Detailed Description

Base class for OpenGL shader object wrapper

Definition at line 20 of file VShader.h.


Constructor & Destructor Documentation

VShader::VShader ( const VShader rhs  )  [inline]

copy constructor

Definition at line 29 of file VShader.h.

References m_refCount.

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

Parameters:
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.


Member Function Documentation

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

Parameters:
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

Returns:
unsigned int containing the Handle

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]

gets the Type of the Shader

Returns:
unsigned int containing the Type

Definition at line 92 of file VShader.h.

References m_uType.

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().


Friends And Related Function Documentation

friend class VProgram [friend]

Definition at line 22 of file VShader.h.


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Mon Jan 21 01:15:17 2008 for FlowVis by  doxygen 1.5.4