arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

glift::GenDrawAttrib< AT > Class Template Reference

#include <drawAttrib.h>

Inheritance diagram for glift::GenDrawAttrib< AT >:

glift::DrawAttrib gutz::Counted glift::GliftObject List of all members.

Detailed Description

template<class AT>
class glift::GenDrawAttrib< AT >

type of this attribute: see gutzAttrib.h

For example, I want float 4 vectors, I create an attribute: GenDrawAttrib<FloatV4A> my4vectorAttrib;

Definition at line 77 of file drawAttrib.h.

Public Types

typedef AT::STORTYPE STORTYPE
 attribute vector storage type, float, vec2f, etc..

typedef AT::SYSTYPE SYSTYPE
typedef gutz::arrayWrap1<
STORTYPE
ARRAY_TYPE
enum  { DIM = AT::DIM, GLTYPE = AT::GLTYPE }

Public Member Functions

 GenDrawAttrib (unsigned int size, unsigned int attribNum=0, GLboolean normalized=false)
 GenDrawAttrib (const GenDrawAttrib &gda)
virtual ~GenDrawAttrib ()
gutz::arrayWrap1< STORTYPEgetArray () const
 Get the Data Array.

void setArray (gutz::arrayWrap1< STORTYPE > v)
 Set the Data Array.

void setSize (unsigned int size)
 The array should be bigger than what you need, if it is a dynamic array, set the size to indicate how much of the array is valid, should be -1 if none of it is.

unsigned int getSize ()
void enable ()
void disable ()
void activate ()
 turn an attribute on and off

void deactivate ()
void setActive (bool onoff)
bool isActive ()
virtual void setErrStream (std::ostream *os)
 Where do you want gl errors to go? they must go somewhere, so don't set it to zero please.

virtual std::ostream * getErrStream () const
 Where are gl errors going?


Protected Member Functions

virtual void enableDef ()
virtual void disableDef ()
void err (const char *where, const char *when=0) const
 error

std::ostream & err () const
 a simpler way, just use the stream! only for always print, this one automatically adds the objects name

void derr (const char *where, const char *when=0) const
 debug error

bool glerr (const char *where, const char *when=0) const
 gl error report only in debug mode, only if there is an error, if so return true

std::ostream & estr () const
 this one just gives you the stream

virtual void _incCount ()
 gutz::Counted interface, increment reference count by one.

virtual void _decCount ()
 gutz::Counted interface, decrement reference count by one.

virtual int _getCount () const
 gutz::Counted interface, get the current reference count.


Protected Attributes

gutz::arrayOwn1< STORTYPE_v
int _attribNum
int _size
GLboolean _norm
bool _active
std::ostream * m_err

Friends

class SmartPtr
class SmartPtrRef


Member Typedef Documentation

template<class AT>
typedef gutz::arrayWrap1<STORTYPE> glift::GenDrawAttrib< AT >::ARRAY_TYPE
 

Definition at line 98 of file drawAttrib.h.

template<class AT>
typedef AT::STORTYPE glift::GenDrawAttrib< AT >::STORTYPE
 

attribute vector storage type, float, vec2f, etc..

Definition at line 96 of file drawAttrib.h.

Referenced by glift::GenDrawAttrib< VAT >::GenDrawAttrib().

template<class AT>
typedef AT::SYSTYPE glift::GenDrawAttrib< AT >::SYSTYPE
 

Definition at line 97 of file drawAttrib.h.


Member Enumeration Documentation

template<class AT>
anonymous enum
 

Enumeration values:
DIM 
GLTYPE 

Definition at line 99 of file drawAttrib.h.


Constructor & Destructor Documentation

template<class AT>
glift::GenDrawAttrib< AT >::GenDrawAttrib unsigned int  size,
unsigned int  attribNum = 0,
GLboolean  normalized = false
[inline]
 

Definition at line 80 of file drawAttrib.h.

template<class AT>
glift::GenDrawAttrib< AT >::GenDrawAttrib const GenDrawAttrib< AT > &  gda  )  [inline]
 

Definition at line 88 of file drawAttrib.h.

template<class AT>
virtual glift::GenDrawAttrib< AT >::~GenDrawAttrib  )  [inline, virtual]
 

Definition at line 92 of file drawAttrib.h.


Member Function Documentation

virtual void gutz::Counted::_decCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, decrement reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 54 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual int gutz::Counted::_getCount  )  const [inline, protected, virtual, inherited]
 

gutz::Counted interface, get the current reference count.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr.

Definition at line 58 of file smartptr.h.

virtual void gutz::Counted::_incCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, increment reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 48 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

void glift::DrawAttrib::activate  )  [inline, inherited]
 

turn an attribute on and off

Definition at line 55 of file drawAttrib.h.

References glift::DrawAttrib::_active.

void glift::DrawAttrib::deactivate  )  [inline, inherited]
 

Definition at line 56 of file drawAttrib.h.

References glift::DrawAttrib::_active.

void glift::GliftObject::derr const char *  where,
const char *  when = 0
const [inline, protected, inherited]
 

debug error

Definition at line 122 of file gliftObject.h.

References glift::GliftObject::m_err.

void glift::DrawAttrib::disable  )  [inline, inherited]
 

Definition at line 51 of file drawAttrib.h.

References glift::DrawAttrib::enableDef().

template<class AT>
virtual void glift::GenDrawAttrib< AT >::disableDef  )  [inline, protected, virtual]
 

Reimplemented from glift::DrawAttrib.

Reimplemented in glift::VertAttrib< VAT >, glift::TexCoordAttrib< VAT >, glift::IndexAttrib< VAT >, and glift::NormalAttrib< VAT >.

Definition at line 127 of file drawAttrib.h.

void glift::DrawAttrib::enable  )  [inline, inherited]
 

Definition at line 50 of file drawAttrib.h.

References glift::DrawAttrib::enableDef().

template<class AT>
virtual void glift::GenDrawAttrib< AT >::enableDef  )  [inline, protected, virtual]
 

Reimplemented from glift::DrawAttrib.

Reimplemented in glift::VertAttrib< VAT >, glift::TexCoordAttrib< VAT >, glift::IndexAttrib< VAT >, and glift::NormalAttrib< VAT >.

Definition at line 121 of file drawAttrib.h.

std::ostream & glift::GliftObject::err  )  const [inline, protected, inherited]
 

a simpler way, just use the stream! only for always print, this one automatically adds the objects name

Definition at line 111 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::CoordTrans::apply(), glift::SubTex::bindDef(), glift::PrimGL::bindIndices(), glift::SubdivPlanarQuadS::bindQuads(), glift::PrimGL::bindTexCoords(), glift::CoreTex::checkTexType(), glift::EmptyTex::copyToTex(), glift::CoreTex::CoreTex(), glift::FuncTex::FuncTex(), glift::Shader::genTexCoords(), glift::CoreTex::getDataf(), glift::CoreTex::getDataub(), glift::VertexProgARB::init(), glift::FragProgARB::init(), glift::PriorityTex::PriorityTex(), glift::VertexProgARB::reload(), glift::FragProgARB::reload(), glift::RenderableGLI::render(), glift::RenderPass::renderDef(), glift::EmptyTex::resetTexState(), glift::PixelShaderATI8K::setLocalConstf(), glift::TexCube::setTexData(), glift::EmptyTex::setTexData(), glift::ShadedPrim::ShadedPrim(), glift::TexConst::TexConst(), glift::TexCube::TexCube(), and glift::EmptyTex::tryToBindPbuff().

void glift::GliftObject::err const char *  where,
const char *  when = 0
const [inline, protected, inherited]
 

error

Definition at line 101 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::SubPBuff::enable().

std::ostream& glift::GliftObject::estr  )  const [inline, protected, inherited]
 

this one just gives you the stream

Definition at line 84 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::CoreTex::bindDef(), glift::Shader::bindDef(), glift::MultiTex::bindDef(), glift::EmptyTex::bindDef(), glift::DispList::compile(), glift::CoreTex::CoreTex(), glift::VertexProgARB::init(), glift::FragProgARB::init(), glift::MultiTex::releaseDef(), and glift::EmptyTex::releaseDef().

template<class AT>
gutz::arrayWrap1<STORTYPE> glift::GenDrawAttrib< AT >::getArray  )  const [inline]
 

Get the Data Array.

Definition at line 107 of file drawAttrib.h.

virtual std::ostream* glift::GliftObject::getErrStream  )  const [inline, virtual, inherited]
 

Where are gl errors going?

Definition at line 49 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::getProgShaderFromFile(), and glift::getProgShaderFromText().

template<class AT>
unsigned int glift::GenDrawAttrib< AT >::getSize  )  [inline]
 

Definition at line 119 of file drawAttrib.h.

bool GliftObject::glerr const char *  where,
const char *  when = 0
const [protected, inherited]
 

gl error report only in debug mode, only if there is an error, if so return true

Definition at line 31 of file gliftObject.cpp.

References glGetError(), and GLuint.

Referenced by RenderState2D::bindDef(), glift::NormalAttrib< VAT >::disableDef(), glift::IndexAttrib< VAT >::disableDef(), glift::TexCoordAttrib< VAT >::disableDef(), glift::VertAttrib< VAT >::disableDef(), glift::GenDrawAttrib< VAT >::disableDef(), glift::DrawAlgImm::draw(), glift::DrawAlgArr::draw(), glift::ShadedPrim::drawDef(), glift::NormalAttrib< VAT >::enableDef(), glift::IndexAttrib< VAT >::enableDef(), glift::TexCoordAttrib< VAT >::enableDef(), glift::VertAttrib< VAT >::enableDef(), glift::GenDrawAttrib< VAT >::enableDef(), and RenderState2D::releaseDef().

bool glift::DrawAttrib::isActive  )  [inline, inherited]
 

Definition at line 58 of file drawAttrib.h.

References glift::DrawAttrib::_active.

void glift::DrawAttrib::setActive bool  onoff  )  [inline, inherited]
 

Definition at line 57 of file drawAttrib.h.

References glift::DrawAttrib::_active.

template<class AT>
void glift::GenDrawAttrib< AT >::setArray gutz::arrayWrap1< STORTYPE v  )  [inline]
 

Set the Data Array.

Definition at line 111 of file drawAttrib.h.

virtual void glift::GliftObject::setErrStream std::ostream *  os  )  [inline, virtual, inherited]
 

Where do you want gl errors to go? they must go somewhere, so don't set it to zero please.

Definition at line 44 of file gliftObject.h.

References glift::GliftObject::m_err.

Referenced by glift::getProgShaderFromFile(), and glift::getProgShaderFromText().

template<class AT>
void glift::GenDrawAttrib< AT >::setSize unsigned int  size  )  [inline]
 

The array should be bigger than what you need, if it is a dynamic array, set the size to indicate how much of the array is valid, should be -1 if none of it is.

Definition at line 118 of file drawAttrib.h.


Friends And Related Function Documentation

friend class SmartPtr [friend, inherited]
 

Definition at line 40 of file smartptr.h.

Referenced by Nrro::NrroIter< T >::NrroIter().

friend class SmartPtrRef [friend, inherited]
 

Definition at line 41 of file smartptr.h.


Member Data Documentation

bool glift::DrawAttrib::_active [protected, inherited]
 

Definition at line 63 of file drawAttrib.h.

Referenced by glift::DrawAttrib::activate(), glift::DrawAttrib::deactivate(), glift::DrawAttrib::DrawAttrib(), glift::DrawAttrib::isActive(), and glift::DrawAttrib::setActive().

template<class AT>
int glift::GenDrawAttrib< AT >::_attribNum [protected]
 

Definition at line 133 of file drawAttrib.h.

Referenced by glift::GenDrawAttrib< VAT >::disableDef(), glift::GenDrawAttrib< VAT >::enableDef(), and glift::GenDrawAttrib< VAT >::GenDrawAttrib().

template<class AT>
GLboolean glift::GenDrawAttrib< AT >::_norm [protected]
 

Definition at line 135 of file drawAttrib.h.

Referenced by glift::GenDrawAttrib< VAT >::enableDef(), and glift::GenDrawAttrib< VAT >::GenDrawAttrib().

template<class AT>
int glift::GenDrawAttrib< AT >::_size [protected]
 

Definition at line 134 of file drawAttrib.h.

Referenced by glift::GenDrawAttrib< VAT >::GenDrawAttrib(), glift::GenDrawAttrib< VAT >::getSize(), and glift::GenDrawAttrib< VAT >::setSize().

template<class AT>
gutz::arrayOwn1<STORTYPE> glift::GenDrawAttrib< AT >::_v [protected]
 

Definition at line 132 of file drawAttrib.h.

Referenced by glift::GenDrawAttrib< VAT >::enableDef(), glift::GenDrawAttrib< VAT >::GenDrawAttrib(), glift::GenDrawAttrib< VAT >::getArray(), and glift::GenDrawAttrib< VAT >::setArray().

std::ostream* glift::GliftObject::m_err [mutable, protected, inherited]
 

Definition at line 87 of file gliftObject.h.

Referenced by glift::GliftObject::derr(), glift::GliftObject::err(), glift::GliftObject::estr(), glift::GliftObject::getErrStream(), glift::GliftObject::GliftObject(), and glift::GliftObject::setErrStream().


The documentation for this class was generated from the following file:
Send questions, comments, and bug reports to:
jmk