#include <texNd.h>
Inheritance diagram for glift::TexCube:
Definition at line 135 of file texNd.h.
Public Member Functions | |
TexCube (const MultiTexOState &texState, const VecTexDataP &texData=VecTexDataP()) | |
Constructors - If 'texData' is given, it must have size 6. | |
TexCube (const MultiTexOState &texState, PBuffGlift *pbPX, PBuffGlift *pbNX, PBuffGlift *pbPY, PBuffGlift *pbNY, PBuffGlift *pbPZ, PBuffGlift *pbNZ, const VecTexDataP &texData=VecTexDataP()) | |
void | setTexData (const VecTexDataP &dataVec) |
CubeMap set function. | |
void | setTexData (GLenum cubeFace, TexData *texData, int mipLevel=0, bool setTexSize=true) |
CubeMap set function. | |
void | setCopyCubeFace (GLenum cubeFace) |
Copy data from framebuffer to this texture. | |
void | copyToTex (GLenum cubeFace) |
Set the target for a glCopyTexImage(...). | |
virtual void | copyToTex (int mipLevel, const gutz::vec3i &texOrig, const gutz::vec2i &screenOrig, const gutz::vec2i ©Size) |
Fill entire cubeFace with entire framebuffer contents. | |
virtual GLenum | texType () const |
Accessors. | |
virtual GLuint | texNum () const |
1D, 2D, 3D, CUBE_MAP, ... | |
virtual PBuffGlift * | pbuff () 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 () |
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 |
|
Constructors - If 'texData' is given, it must have size 6. The data is mapped in order: PX, NX, PY, NY, PZ, NZ (in positions 0..5) Definition at line 157 of file texNd.cpp. References glift::GliftObject::err(), GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, texData, texState, and glift::VecPbuffP. |
|
Ensure that no pbuffers are NULL Initialize all 6 cube faces Definition at line 174 of file texNd.cpp. References glift::GliftObject::err(), GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, texData, texState, uint, and glift::VecPbuffP. |
|
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(). |
|
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. |
|
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(). |
|
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(). |
|
Bind this texture object Bind the pbuffers for each face Note: If the 1st pbuffer is non-NULL, the constructor gaurantees that they are all non-NULL Reimplemented from glift::CoreTex. Definition at line 295 of file texNd.cpp. References glift::CoreTex::tryToBindPbuff(), and uint. Referenced by copyToTex(), and setTexData(). |
|
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(). |
|
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(). |
|
Fill entire cubeFace with entire framebuffer contents.
Implements glift::SingleTex. Definition at line 245 of file texNd.cpp. References bindDef(), glCopyTexSubImage2D(), and releaseDef(). |
|
Set the target for a glCopyTexImage(...). Ensure that cubeFace is valid Definition at line 232 of file texNd.cpp. References glift::CoreTex::dimen(), gutz::vec2i, x, and y. |
|
Check for valid texType (1D, 2D, 3D, or CUBE) Set functions.
Definition at line 157 of file singleTex.h. Referenced by setTexData(). |
|
debug error
Definition at line 122 of file gliftObject.h. References glift::GliftObject::m_err. |
|
Ptr to the pbuffer.
Implements glift::SingleTex. Reimplemented in glift::EmptyTex. Definition at line 124 of file singleTex.h. Referenced by copyToTex(), glift::TexRect::copyToTex2D(), and glift::Tex2D::copyToTex2D(). |
|
|
error
Definition at line 101 of file gliftObject.h. References glift::GliftObject::m_err. Referenced by glift::SubPBuff::enable(). |
|
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(). |
|
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. |
|
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. |
|
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(). |
|
|
|
Implements glift::SingleTex. Definition at line 129 of file singleTex.h. |
|
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(). |
|
Definition at line 72 of file stateGLI.h. |
|
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(). |
|
Implements glift::Compilable. Definition at line 81 of file stateGLI.h. Referenced by glift::VertexProgARB::reset(), glift::PixelShaderATI8K::reset(), and glift::FragProgARB::reset(). |
|
The 'Texture' interface.
Implements glift::Texture. Definition at line 56 of file singleTex.h. |
|
The OpenGL texture number.
Implements glift::SingleTex. Reimplemented in glift::EmptyTex. Definition at line 123 of file singleTex.h. |
|
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(). |
|
Release the pbuffers for each face Release the texture object Reimplemented from glift::CoreTex. Definition at line 309 of file texNd.cpp. References glift::CoreTex::tryToBindPbuff(), and uint. Referenced by copyToTex(), and setTexData(). |
|
Copy data from framebuffer to this texture.
|
|
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(). |
|
Definition at line 40 of file texture.h. References name. |
|
set/get the texture coordinate number this texture should use
Implements glift::SingleTex. Definition at line 128 of file singleTex.h. |
|
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(). |
|
CubeMap set function.
Ensure that it is 2D data Ensure that cubeFace is valid Set the texture data Definition at line 259 of file texNd.cpp. References bindDef(), glift::CoreTex::dataDimen(), glift::GliftObject::err(), GL_TEXTURE_2D, releaseDef(), and texData. |
|
CubeMap set function.
|
|
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. |
|
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(). |
|
1D, 2D, 3D, CUBE_MAP, ...
Implements glift::SingleTex. Definition at line 122 of file singleTex.h. References GLuint. |
|
Accessors.
Implements glift::SingleTex. Definition at line 121 of file singleTex.h. References GLenum. Referenced by glift::EmptyTex::bindDef(), glift::Tex3D::copyToTex(), glift::TexRect::copyToTex(), glift::Tex2D::copyToTex(), glift::Tex1D::copyToTex(), and glift::EmptyTex::releaseDef(). |
|
Should the pbuffer be bound with the texture?
Implements glift::SingleTex. Reimplemented in glift::EmptyTex. Definition at line 144 of file singleTex.h. |
|
Dimen of the current data.
Implements glift::SingleTex. Reimplemented in glift::EmptyTex. Definition at line 125 of file singleTex.h. Referenced by bindDef(), and releaseDef(). |
|
Definition at line 40 of file smartptr.h. Referenced by Nrro::NrroIter< T >::NrroIter(). |
|
Definition at line 41 of file smartptr.h. |
|
|