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

glift::Tex3D Class Reference

#include <texNd.h>

Inheritance diagram for glift::Tex3D:

glift::CoreTex glift::SingleTex glift::Texture glift::StateGLI glift::GliftObject glift::Compilable gutz::Counted List of all members.

Detailed Description

Tex3D - 3D Textures.

Definition at line 116 of file texNd.h.

Public Member Functions

 Tex3D (const MultiTexOState &texState, TexData *texData)
 Tex3D - 3D Textures.

virtual void copyToTex (int mipLevel, const gutz::vec3i &texOrig, const gutz::vec2i &screenOrig, const gutz::vec2i &copySize)
 Copy data from framebuffer to this texture.

virtual GLenum texType () const
 Accessors.

virtual GLuint texNum () const
 1D, 2D, 3D, CUBE_MAP, ...

virtual PBuffGliftpbuff () const
 The OpenGL texture number.

virtual gutz::vec3i dimen () const
 Ptr to the pbuffer.

virtual bool tryToBindPbuff () const
 Dimen of the current data.

virtual void tryToBindPbuff (bool tryToUsePbuff)
 Should the pbuffer be bound with the texture?

virtual void setTexCoordNum (int texCNum)
 set/get the texture coordinate number this texture should use

virtual int getTexCoordNum ()
virtual void getDataub (GLenum format, int mipLevel, gutz::arraybub &data)
virtual void getDataf (GLenum format, int mipLevel, gutz::arraybf &data)
virtual void setTexData (TexData *texData, int mipLevel=0, bool setTexSize=true)
 Set Functions Assume no cube map (Cube map subclass handles this).

virtual void setTexState (TexObjState *state)
 Set individual texObjState (gets added to m_texObjState).

virtual void setTexState (const MultiTexOState &texState)
 Set all texture object state specified by 'texState'.

virtual int numTexUnits () const
 The 'Texture' interface.

std::string getName ()
void setName (std::string name)
void bind ()
void release ()
bool isBound ()
virtual void compile ()
virtual bool hasNonCompilable ()
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 bindDef ()
 The 'StateGLI' interface.

virtual void releaseDef ()
void checkTexType (GLenum texType)
 Sanity checkers.

void dataDimen (const gutz::vec3i &dimen)
 Check for valid texType (1D, 2D, 3D, or CUBE) Set functions.

virtual bool isCompiled () const
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

std::string _name

Friends

class SmartPtr
class SmartPtrRef


Constructor & Destructor Documentation

Tex3D::Tex3D const MultiTexOState texState,
TexData texData
 

Tex3D - 3D Textures.

Definition at line 138 of file texNd.cpp.

References GL_TEXTURE_3D, texData, and texState.


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 StateGLI::bind  )  [inherited]
 

Definition at line 34 of file stateGLI.cpp.

References glift::StateGLI::bindDef(), glift::DispList::isCompiled(), and glift::DispList::issue().

Referenced by glift::SubTex::bindDef(), glift::CoreTex::bindDef(), glift::Shader::bindDef(), glift::ProgShader::bindDef(), glift::ShadedPrim::drawDef(), and VolRenAlgBase::drawTris().

void CoreTex::bindDef  )  [protected, virtual, inherited]
 

The 'StateGLI' interface.

Implements glift::SingleTex.

Reimplemented in glift::EmptyTex, and glift::TexCube.

Definition at line 86 of file singleTex.cpp.

References glift::StateGLI::bind(), glift::GliftObject::estr(), GL_TEXTURE_RECTANGLE_NV, glBindTexture(), glEnable(), and glErr().

Referenced by copyToTex(), glift::TexRect::copyToTex(), glift::Tex2D::copyToTex(), glift::Tex1D::copyToTex(), glift::CoreTex::CoreTex(), glift::CoreTex::getDataf(), glift::CoreTex::getDataub(), glift::CoreTex::setTexData(), and glift::CoreTex::setTexState().

void CoreTex::checkTexType GLenum  texType  )  [protected, inherited]
 

Sanity checkers.

Definition at line 72 of file singleTex.cpp.

References glift::GliftObject::err(), GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_RECTANGLE_EXT, and GL_TEXTURE_RECTANGLE_NV.

Referenced by glift::CoreTex::CoreTex(), and glift::CoreTex::setTexData().

void StateGLI::compile  )  [virtual, inherited]
 

Compile new disply lists

Force deletion/construction of new objects in case a display list already exists for this object.

Implements glift::Compilable.

Definition at line 81 of file stateGLI.cpp.

References glift::DispList::compile(), and glift::g_compiling.

Referenced by glift::VertexProgARB::reset(), glift::PixelShaderATI8K::reset(), and glift::FragProgARB::reset().

void Tex3D::copyToTex int  mipLevel,
const gutz::vec3i texOrig,
const gutz::vec2i screenOrig,
const gutz::vec2i copySize
[virtual]
 

Copy data from framebuffer to this texture.

Implements glift::SingleTex.

Definition at line 143 of file texNd.cpp.

References glift::CoreTex::bindDef(), glCopyTexSubImage3D, glift::CoreTex::releaseDef(), and glift::CoreTex::texType().

void glift::CoreTex::dataDimen const gutz::vec3i dimen  )  [inline, protected, inherited]
 

Check for valid texType (1D, 2D, 3D, or CUBE) Set functions.

Definition at line 157 of file singleTex.h.

Referenced by glift::TexCube::setTexData().

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.

virtual gutz::vec3i glift::CoreTex::dimen  )  const [inline, virtual, inherited]
 

Ptr to the pbuffer.

Implements glift::SingleTex.

Reimplemented in glift::EmptyTex.

Definition at line 124 of file singleTex.h.

Referenced by glift::TexCube::copyToTex(), glift::TexRect::copyToTex2D(), and glift::Tex2D::copyToTex2D().

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

void CoreTex::getDataf GLenum  format,
int  mipLevel,
gutz::arraybf data
[virtual, inherited]
 

Implements glift::SingleTex.

Definition at line 165 of file singleTex.cpp.

References glift::CoreTex::bindDef(), data, glift::PBuffGlift::disable(), glift::PBuffGlift::enable(), glift::GliftObject::err(), format, getNumChannels(), GL_FLOAT, GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, glGetTexImage(), glReadPixels(), glift::CoreTex::releaseDef(), and gutz::vec3i.

void CoreTex::getDataub GLenum  format,
int  mipLevel,
gutz::arraybub data
[virtual, inherited]
 

Implements glift::SingleTex.

Definition at line 117 of file singleTex.cpp.

References glift::CoreTex::bindDef(), data, glift::PBuffGlift::disable(), glift::PBuffGlift::enable(), glift::GliftObject::err(), format, getNumChannels(), GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_UNSIGNED_BYTE, glGetTexImage(), glReadPixels(), glift::StateGLI::release(), glift::CoreTex::releaseDef(), and gutz::vec3i.

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

std::string glift::Texture::getName  )  [inline, inherited]
 

Definition at line 39 of file texture.h.

virtual int glift::CoreTex::getTexCoordNum  )  [inline, virtual, inherited]
 

Implements glift::SingleTex.

Definition at line 129 of file singleTex.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().

virtual bool glift::StateGLI::hasNonCompilable  )  [inline, virtual, inherited]
 

Definition at line 72 of file stateGLI.h.

bool glift::StateGLI::isBound  )  [inline, inherited]
 

Definition at line 70 of file stateGLI.h.

Referenced by glift::GenPrimGL< VERTA, TEXCA, IDXA, RANGEA >::drawDef(), VolShader::setBlend(), VolRenAlgBase::setGeom(), VolShader::setPixelShader(), VolRenAlgBase::setShader(), VolShader::setVertexShader(), and VolRenAlgBase::setVolytope().

virtual bool glift::StateGLI::isCompiled  )  const [inline, protected, virtual, inherited]
 

Implements glift::Compilable.

Definition at line 81 of file stateGLI.h.

Referenced by glift::VertexProgARB::reset(), glift::PixelShaderATI8K::reset(), and glift::FragProgARB::reset().

virtual int glift::SingleTex::numTexUnits  )  const [inline, virtual, inherited]
 

The 'Texture' interface.

Implements glift::Texture.

Definition at line 56 of file singleTex.h.

virtual PBuffGlift* glift::CoreTex::pbuff  )  const [inline, virtual, inherited]
 

The OpenGL texture number.

Implements glift::SingleTex.

Reimplemented in glift::EmptyTex.

Definition at line 123 of file singleTex.h.

void StateGLI::release  )  [inherited]
 

Definition at line 57 of file stateGLI.cpp.

References glift::DispList::isCompiled(), glift::DispList::issue(), and glift::StateGLI::releaseDef().

Referenced by glift::ShadedPrim::drawDef(), VolRenAlgBase::drawTris(), glift::CoreTex::getDataub(), glift::SubTex::releaseDef(), glift::CoreTex::releaseDef(), glift::Shader::releaseDef(), and glift::ProgShader::releaseDef().

void CoreTex::releaseDef  )  [protected, virtual, inherited]
 

Implements glift::SingleTex.

Reimplemented in glift::EmptyTex, and glift::TexCube.

Definition at line 103 of file singleTex.cpp.

References GL_TEXTURE_RECTANGLE_NV, glBindTexture(), glDisable(), and glift::StateGLI::release().

Referenced by copyToTex(), glift::TexRect::copyToTex(), glift::Tex2D::copyToTex(), glift::Tex1D::copyToTex(), glift::CoreTex::CoreTex(), glift::CoreTex::getDataf(), glift::CoreTex::getDataub(), glift::CoreTex::setTexData(), and glift::CoreTex::setTexState().

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

void glift::Texture::setName std::string  name  )  [inline, inherited]
 

Definition at line 40 of file texture.h.

References name.

virtual void glift::CoreTex::setTexCoordNum int  texCNum  )  [inline, virtual, inherited]
 

set/get the texture coordinate number this texture should use

Implements glift::SingleTex.

Definition at line 128 of file singleTex.h.

void CoreTex::setTexData TexData texData,
int  mipLevel = 0,
bool  setTexSize = true
[virtual, inherited]
 

Set Functions Assume no cube map (Cube map subclass handles this).

Implements glift::SingleTex.

Reimplemented in glift::EmptyTex.

Definition at line 229 of file singleTex.cpp.

References glift::CoreTex::bindDef(), glift::CoreTex::checkTexType(), glift::CoreTex::releaseDef(), and texData.

Referenced by glift::CoreTex::CoreTex().

void CoreTex::setTexState const MultiTexOState texState  )  [virtual, inherited]
 

Set all texture object state specified by 'texState'.

Implements glift::SingleTex.

Definition at line 218 of file singleTex.cpp.

References glift::CoreTex::bindDef(), glift::CoreTex::releaseDef(), and texState.

void CoreTex::setTexState TexObjState state  )  [virtual, inherited]
 

Set individual texObjState (gets added to m_texObjState).

Implements glift::SingleTex.

Definition at line 209 of file singleTex.cpp.

References glift::TexObjState::bind(), glift::CoreTex::bindDef(), and glift::CoreTex::releaseDef().

Referenced by glift::CoreTex::CoreTex().

virtual GLuint glift::CoreTex::texNum  )  const [inline, virtual, inherited]
 

1D, 2D, 3D, CUBE_MAP, ...

Implements glift::SingleTex.

Definition at line 122 of file singleTex.h.

References GLuint.

virtual GLenum glift::CoreTex::texType  )  const [inline, virtual, inherited]
 

Accessors.

Implements glift::SingleTex.

Definition at line 121 of file singleTex.h.

References GLenum.

Referenced by glift::EmptyTex::bindDef(), copyToTex(), glift::TexRect::copyToTex(), glift::Tex2D::copyToTex(), glift::Tex1D::copyToTex(), and glift::EmptyTex::releaseDef().

virtual void glift::CoreTex::tryToBindPbuff bool  tryToUsePbuff  )  [inline, virtual, inherited]
 

Should the pbuffer be bound with the texture?

Implements glift::SingleTex.

Reimplemented in glift::EmptyTex.

Definition at line 144 of file singleTex.h.

virtual bool glift::CoreTex::tryToBindPbuff  )  const [inline, virtual, inherited]
 

Dimen of the current data.

Implements glift::SingleTex.

Reimplemented in glift::EmptyTex.

Definition at line 125 of file singleTex.h.

Referenced by glift::TexCube::bindDef(), and glift::TexCube::releaseDef().


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

std::string glift::Texture::_name [protected, inherited]
 

Definition at line 48 of file texture.h.


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