HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE_OGLTexture Class Referenceabstract

#include <RE_OGLTexture.h>

+ Inheritance diagram for RE_OGLTexture:

Public Member Functions

virtual ~RE_OGLTexture ()
 
virtual int64 getMemoryUsage (bool inclusive) const
 
virtual const char * className () const
 
RE_TextureDimension getTextureType () const
 
virtual bool hasTextureSupport (RE_Render *r)
 
virtual bool hasMipMapSupport (RE_Render *)
 
virtual int getMaxTextureSize (RE_Render *r)=0
 
virtual int getMaxTextureIndex (RE_Render *r)
 
bool hasAutoCompression (RE_Render *r)
 
virtual bool isValid () const
 
bool isMutable () const
 
RE_TextureID getID () const
 
virtual void free ()
 
RE_OGLTexturecopyAttributes () const
 
void setDataType (RE_TextureDataType type)
 
RE_TextureDataType getDataType () const
 
void setFormat (RE_GPUType data, int vectorsize, RE_TextureFormatExtra format_extra=RE_TEXTURE_FORMAT_EXTRA_NONE)
 
RE_GPUType getFormatType () const
 
int getFormatSize () const
 
RE_TextureFormatExtra getFormatExtra () const
 
int getInternalFormat () const
 
void setClientFormat (RE_GPUType data, int vectorsize)
 
void setCompression (RE_TextureCompress comp, bool auto_compress)
 
RE_TextureCompress getCompression () const
 
bool getAutoCompression () const
 
void setResolution (int w, int h=1, int depth=1, bool force_pow2=false)
 
int getWidth () const
 
int getHeight () const
 
int getDepth () const
 
int getGLWidth () const
 
int getGLHeight () const
 
int getGLDepth () const
 
float getTexS () const
 
float getTexT () const
 
float getTexR () const
 
virtual void setSamples (int samples)
 
int getSamples () const
 
void setMipMap (bool m, bool autogen=true)
 
bool getMipMap () const
 
bool getMipMapAutoGenerate () const
 
bool isMipMapped () const
 
bool queryTextureStats (RE_Render *r, int *width, int *height, int *depth, int *format)
 
void setLabel (RE_Render *r, const char *label)
 
virtual void setTexture (RE_Render *r, const void *data, int level=-1, int index=-1, bool proxy=false)=0
 
virtual int64 getSizeBytes () const
 
int64 getScanBytes () const
 
int64 getScanBytes (int sublen) const
 
int64 getBitsPerPixel () const
 
int64 getTextureSize () const
 
virtual void setSubTexture (RE_Render *r, const void *data, int level, int xoffset, int xsize, int yoffset=0, int ysize=1, int zoffset=0, int zsize=1)=0
 
virtual void getTexture (RE_Render *r, void *data, int level=0, int index=-1)
 
virtual bool copyFromBuffer (RE_Render *r, int x, int y, int z=0, const UT_DimRect *bufferarea=NULL, int level=0)=0
 
bool generateMipMaps (RE_Render *r)
 
void setMinFilter (RE_Render *r, RE_TexFiltType t)
 
RE_TexFiltType getMinFilter () const
 
void setMagFilter (RE_Render *r, RE_TexFiltType t)
 
RE_TexFiltType getMagFilter () const
 
void setMaxAnisotropy (RE_Render *r, int atf)
 
int getMaxAnisotropy () const
 
void setLodBias (RE_Render *r, float bias)
 
float getLodBias () const
 
void setTextureWrap (RE_Render *r, RE_TexClampType clamp_s, RE_TexClampType clamp_t=RE_CLAMP_EDGE, RE_TexClampType clamp_r=RE_CLAMP_EDGE)
 
bool getWrapS () const
 
bool getWrapT () const
 
bool getWrapR () const
 
void setBorder (RE_Render *r, RE_TextureBorder border, const UT_Vector4F *color_alpha=NULL)
 
UT_Vector4F getBorderColor () const
 
void setTextureFilter (RE_Render *r, const RE_TextureFilter &filter)
 
void setDepthCompareMode (RE_Render *r, bool enabled, RE_TextureCompare compare=RE_TEXTURE_COMPARE_LESS_EQUAL)
 
bool setTextureSwizzle (RE_Render *r, RE_TextureSwizzle red, RE_TextureSwizzle green, RE_TextureSwizzle blue, RE_TextureSwizzle alpha)
 
void setAlphaInfo (IMG_FileAlphaInfo a)
 
IMG_FileAlphaInfo getAlphaInfo () const
 
bool createTextureHandle (RE_Render *r)
 
uint64 getTextureHandle () const
 
bool makeResidentTexture (RE_Render *r)
 
bool removeResidentTexture (RE_Render *r)
 
bool writeToFile (RE_Render *r, const char *name, int level=0)
 
RE_OGLTextureexpandMultisampleTexture (RE_Render *r)
 
void addReference (void(*cb)(void *, RE_OGLTexture *), void *ref_obj)
 
void removeReference (void *ref_obj)
 
void print (std::ostream *os=NULL)
 
- Public Member Functions inherited from RE_CachedObject
 RE_CachedObject ()
 
virtual ~RE_CachedObject ()
 
void setInUse (bool inc)
 
virtual bool inUse ()
 
int getUsage () const
 
void incRef ()
 
void decRef ()
 
int getRefCount () const
 
void setCached (bool cached, const char *mapname)
 
bool isCached () const
 
const char * getName () const
 
bool setRemovalCallback (bool(*relCB)(void *, void *), void *relObject)
 
bool clearRemovalCallback (void *relObject)
 
- Public Member Functions inherited from RE_CachedObjectBase
 RE_CachedObjectBase ()
 
virtual ~RE_CachedObjectBase ()
 
void setVersion (RE_CacheVersion v)
 
RE_CacheVersion getVersion () const
 
void setExtraData (RE_CachedExtraData *data)
 
const RE_CachedExtraDataHandlegetExtraData () const
 
void setCacheTag (RE_CacheTagHandle h)
 
void resetCacheTag ()
 
void setInCache (bool c)
 
bool isInCache () const
 

Static Public Member Functions

static RE_OGLTexturenewTexture (RE_TextureDimension t)
 
static int getGLTextureType (RE_TextureDimension t)
 
static RE_TextureDimension getRETextureType (int gl_type)
 
static RE_OGLTexturefindTextureWithID (RE_TextureID id)
 
static void adjustPow2 (int &w, int &h, int &d)
 
static void dumpTextureTable (std::ostream &os, int64 min_tex_size=-1)
 

Protected Member Functions

 RE_OGLTexture (RE_TextureDimension d)
 
void deleteObject ()
 
void setupTextureParameters (RE_Render *r, bool force)
 
void validate ()
 
virtual int getGLType () const =0
 
virtual int getGLProxy () const =0
 
virtual int getGLTypeBinding () const =0
 
virtual int getGLCreateType () const
 
virtual bool buildMipMaps (RE_Render *r, const void *data)=0
 
bool createTextureID ()
 
RE_GPUType getClientType () const
 
voidcompressTexData (const void *src, int &w, int &h)
 
void determineCompressionInternal ()
 
void determineTextureSize (RE_Render *r)
 
void updateTextureWrap (RE_Render *r, bool force)
 
void updateFilters (RE_Render *r, bool force)
 

Protected Attributes

RE_TextureID myID
 
int myGLType
 
int myGLFormat
 
int myGLInternal
 
int myGLWidth
 
int myGLHeight
 
int myGLDepth
 
bool myCanMipMap
 
int mySamples
 

Friends

class RE_OGLRender
 
class RE_OGLFramebuffer
 
class RE_TextureMap
 

Additional Inherited Members

- Public Attributes inherited from RE_CachedObjectBase
RE_CacheVersion myVersion
 
RE_CacheTagHandle myCacheTagHandle
 
bool myCachedFlag
 
RE_CachedExtraDataHandle myExtraData
 

Detailed Description

Examples:
DM/DM_BackgroundHook.C, and DM/DM_LightBloomHook.C.

Definition at line 30 of file RE_OGLTexture.h.

Constructor & Destructor Documentation

virtual RE_OGLTexture::~RE_OGLTexture ( )
virtual
RE_OGLTexture::RE_OGLTexture ( RE_TextureDimension  d)
protected

Member Function Documentation

void RE_OGLTexture::addReference ( void(*)(void *, RE_OGLTexture *)  cb,
void ref_obj 
)
static void RE_OGLTexture::adjustPow2 ( int w,
int h,
int d 
)
static
virtual bool RE_OGLTexture::buildMipMaps ( RE_Render r,
const void data 
)
protectedpure virtual
const char * RE_OGLTexture::className ( void  ) const
inlinevirtual

Definition at line 583 of file RE_OGLTexture.h.

void* RE_OGLTexture::compressTexData ( const void src,
int w,
int h 
)
protected
RE_OGLTexture* RE_OGLTexture::copyAttributes ( ) const
virtual bool RE_OGLTexture::copyFromBuffer ( RE_Render r,
int  x,
int  y,
int  z = 0,
const UT_DimRect bufferarea = NULL,
int  level = 0 
)
pure virtual
bool RE_OGLTexture::createTextureHandle ( RE_Render r)
bool RE_OGLTexture::createTextureID ( )
protected
void RE_OGLTexture::deleteObject ( )
protected
void RE_OGLTexture::determineCompressionInternal ( )
protected
void RE_OGLTexture::determineTextureSize ( RE_Render r)
protected
static void RE_OGLTexture::dumpTextureTable ( std::ostream &  os,
int64  min_tex_size = -1 
)
static
RE_OGLTexture* RE_OGLTexture::expandMultisampleTexture ( RE_Render r)
static RE_OGLTexture* RE_OGLTexture::findTextureWithID ( RE_TextureID  id)
static
virtual void RE_OGLTexture::free ( )
virtual
bool RE_OGLTexture::generateMipMaps ( RE_Render r)
IMG_FileAlphaInfo RE_OGLTexture::getAlphaInfo ( ) const
inline

Definition at line 280 of file RE_OGLTexture.h.

bool RE_OGLTexture::getAutoCompression ( ) const
inline

Definition at line 511 of file RE_OGLTexture.h.

int64 RE_OGLTexture::getBitsPerPixel ( ) const
UT_Vector4F RE_OGLTexture::getBorderColor ( ) const
RE_GPUType RE_OGLTexture::getClientType ( ) const
inlineprotected

Definition at line 451 of file RE_OGLTexture.h.

RE_TextureCompress RE_OGLTexture::getCompression ( ) const
inline

Definition at line 505 of file RE_OGLTexture.h.

RE_TextureDataType RE_OGLTexture::getDataType ( ) const
inline

Definition at line 427 of file RE_OGLTexture.h.

int RE_OGLTexture::getDepth ( ) const
inline

Definition at line 481 of file RE_OGLTexture.h.

RE_TextureFormatExtra RE_OGLTexture::getFormatExtra ( ) const
inline

Definition at line 463 of file RE_OGLTexture.h.

int RE_OGLTexture::getFormatSize ( ) const
inline

Definition at line 457 of file RE_OGLTexture.h.

RE_GPUType RE_OGLTexture::getFormatType ( ) const
inline

Definition at line 445 of file RE_OGLTexture.h.

virtual int RE_OGLTexture::getGLCreateType ( ) const
inlineprotectedvirtual

Definition at line 346 of file RE_OGLTexture.h.

int RE_OGLTexture::getGLDepth ( ) const
inline

Definition at line 499 of file RE_OGLTexture.h.

int RE_OGLTexture::getGLHeight ( ) const
inline

Definition at line 493 of file RE_OGLTexture.h.

virtual int RE_OGLTexture::getGLProxy ( ) const
protectedpure virtual
static int RE_OGLTexture::getGLTextureType ( RE_TextureDimension  t)
static
virtual int RE_OGLTexture::getGLType ( ) const
protectedpure virtual
virtual int RE_OGLTexture::getGLTypeBinding ( ) const
protectedpure virtual
int RE_OGLTexture::getGLWidth ( ) const
inline

Definition at line 487 of file RE_OGLTexture.h.

int RE_OGLTexture::getHeight ( ) const
inline

Definition at line 475 of file RE_OGLTexture.h.

RE_TextureID RE_OGLTexture::getID ( ) const
inline

Definition at line 439 of file RE_OGLTexture.h.

int RE_OGLTexture::getInternalFormat ( ) const
inline

Definition at line 99 of file RE_OGLTexture.h.

float RE_OGLTexture::getLodBias ( ) const
inline

Definition at line 553 of file RE_OGLTexture.h.

RE_TexFiltType RE_OGLTexture::getMagFilter ( ) const
inline

Definition at line 547 of file RE_OGLTexture.h.

int RE_OGLTexture::getMaxAnisotropy ( ) const
inline

Definition at line 559 of file RE_OGLTexture.h.

int RE_OGLTexture::getMaxTextureIndex ( RE_Render r)
inlinevirtual

Definition at line 601 of file RE_OGLTexture.h.

virtual int RE_OGLTexture::getMaxTextureSize ( RE_Render r)
pure virtual
virtual int64 RE_OGLTexture::getMemoryUsage ( bool  inclusive) const
virtual

Returns the amount of main memory (NOT graphics memory!) owned by this RE_OGLTexture.

Reimplemented from RE_CachedObject.

RE_TexFiltType RE_OGLTexture::getMinFilter ( ) const
inline

Definition at line 541 of file RE_OGLTexture.h.

bool RE_OGLTexture::getMipMap ( ) const
inline

Definition at line 523 of file RE_OGLTexture.h.

bool RE_OGLTexture::getMipMapAutoGenerate ( ) const
inline

Definition at line 535 of file RE_OGLTexture.h.

static RE_TextureDimension RE_OGLTexture::getRETextureType ( int  gl_type)
static
int RE_OGLTexture::getSamples ( ) const
int64 RE_OGLTexture::getScanBytes ( ) const
inline

Definition at line 631 of file RE_OGLTexture.h.

int64 RE_OGLTexture::getScanBytes ( int  sublen) const
virtual int64 RE_OGLTexture::getSizeBytes ( ) const
virtual
float RE_OGLTexture::getTexR ( ) const
inline

Definition at line 619 of file RE_OGLTexture.h.

float RE_OGLTexture::getTexS ( ) const
inline

Definition at line 607 of file RE_OGLTexture.h.

float RE_OGLTexture::getTexT ( ) const
inline

Definition at line 613 of file RE_OGLTexture.h.

virtual void RE_OGLTexture::getTexture ( RE_Render r,
void data,
int  level = 0,
int  index = -1 
)
virtual
uint64 RE_OGLTexture::getTextureHandle ( ) const
inline

Definition at line 292 of file RE_OGLTexture.h.

int64 RE_OGLTexture::getTextureSize ( ) const
inline

Definition at line 625 of file RE_OGLTexture.h.

RE_TextureDimension RE_OGLTexture::getTextureType ( ) const
inline

Definition at line 412 of file RE_OGLTexture.h.

int RE_OGLTexture::getWidth ( ) const
inline

Definition at line 469 of file RE_OGLTexture.h.

bool RE_OGLTexture::getWrapR ( ) const
inline

Definition at line 577 of file RE_OGLTexture.h.

bool RE_OGLTexture::getWrapS ( ) const
inline

Definition at line 565 of file RE_OGLTexture.h.

bool RE_OGLTexture::getWrapT ( ) const
inline

Definition at line 571 of file RE_OGLTexture.h.

bool RE_OGLTexture::hasAutoCompression ( RE_Render r)
bool RE_OGLTexture::hasMipMapSupport ( RE_Render )
inlinevirtual

Definition at line 517 of file RE_OGLTexture.h.

bool RE_OGLTexture::hasTextureSupport ( RE_Render r)
inlinevirtual

Definition at line 589 of file RE_OGLTexture.h.

bool RE_OGLTexture::isMipMapped ( ) const
inline

Definition at line 529 of file RE_OGLTexture.h.

bool RE_OGLTexture::isMutable ( ) const
inline

Definition at line 63 of file RE_OGLTexture.h.

bool RE_OGLTexture::isValid ( void  ) const
inlinevirtual

Definition at line 433 of file RE_OGLTexture.h.

bool RE_OGLTexture::makeResidentTexture ( RE_Render r)
static RE_OGLTexture* RE_OGLTexture::newTexture ( RE_TextureDimension  t)
static
void RE_OGLTexture::print ( std::ostream *  os = NULL)
bool RE_OGLTexture::queryTextureStats ( RE_Render r,
int width,
int height,
int depth,
int format 
)
void RE_OGLTexture::removeReference ( void ref_obj)
bool RE_OGLTexture::removeResidentTexture ( RE_Render r)
void RE_OGLTexture::setAlphaInfo ( IMG_FileAlphaInfo  a)
inline

Definition at line 279 of file RE_OGLTexture.h.

void RE_OGLTexture::setBorder ( RE_Render r,
RE_TextureBorder  border,
const UT_Vector4F color_alpha = NULL 
)
void RE_OGLTexture::setClientFormat ( RE_GPUType  data,
int  vectorsize 
)
void RE_OGLTexture::setCompression ( RE_TextureCompress  comp,
bool  auto_compress 
)
void RE_OGLTexture::setDataType ( RE_TextureDataType  type)
inline

Definition at line 418 of file RE_OGLTexture.h.

void RE_OGLTexture::setDepthCompareMode ( RE_Render r,
bool  enabled,
RE_TextureCompare  compare = RE_TEXTURE_COMPARE_LESS_EQUAL 
)
void RE_OGLTexture::setFormat ( RE_GPUType  data,
int  vectorsize,
RE_TextureFormatExtra  format_extra = RE_TEXTURE_FORMAT_EXTRA_NONE 
)
void RE_OGLTexture::setLabel ( RE_Render r,
const char *  label 
)
void RE_OGLTexture::setLodBias ( RE_Render r,
float  bias 
)
void RE_OGLTexture::setMagFilter ( RE_Render r,
RE_TexFiltType  t 
)
void RE_OGLTexture::setMaxAnisotropy ( RE_Render r,
int  atf 
)
void RE_OGLTexture::setMinFilter ( RE_Render r,
RE_TexFiltType  t 
)
void RE_OGLTexture::setMipMap ( bool  m,
bool  autogen = true 
)
void RE_OGLTexture::setResolution ( int  w,
int  h = 1,
int  depth = 1,
bool  force_pow2 = false 
)
virtual void RE_OGLTexture::setSamples ( int  samples)
virtual
virtual void RE_OGLTexture::setSubTexture ( RE_Render r,
const void data,
int  level,
int  xoffset,
int  xsize,
int  yoffset = 0,
int  ysize = 1,
int  zoffset = 0,
int  zsize = 1 
)
pure virtual
virtual void RE_OGLTexture::setTexture ( RE_Render r,
const void data,
int  level = -1,
int  index = -1,
bool  proxy = false 
)
pure virtual
void RE_OGLTexture::setTextureFilter ( RE_Render r,
const RE_TextureFilter filter 
)
bool RE_OGLTexture::setTextureSwizzle ( RE_Render r,
RE_TextureSwizzle  red,
RE_TextureSwizzle  green,
RE_TextureSwizzle  blue,
RE_TextureSwizzle  alpha 
)
void RE_OGLTexture::setTextureWrap ( RE_Render r,
RE_TexClampType  clamp_s,
RE_TexClampType  clamp_t = RE_CLAMP_EDGE,
RE_TexClampType  clamp_r = RE_CLAMP_EDGE 
)
void RE_OGLTexture::setupTextureParameters ( RE_Render r,
bool  force 
)
protected
void RE_OGLTexture::updateFilters ( RE_Render r,
bool  force 
)
protected
void RE_OGLTexture::updateTextureWrap ( RE_Render r,
bool  force 
)
protected
void RE_OGLTexture::validate ( void  )
inlineprotected

Definition at line 595 of file RE_OGLTexture.h.

bool RE_OGLTexture::writeToFile ( RE_Render r,
const char *  name,
int  level = 0 
)

Friends And Related Function Documentation

friend class RE_OGLFramebuffer
friend

Definition at line 407 of file RE_OGLTexture.h.

friend class RE_OGLRender
friend

Definition at line 406 of file RE_OGLTexture.h.

friend class RE_TextureMap
friend

Definition at line 408 of file RE_OGLTexture.h.

Member Data Documentation

bool RE_OGLTexture::myCanMipMap
protected

Definition at line 369 of file RE_OGLTexture.h.

int RE_OGLTexture::myGLDepth
protected

Definition at line 368 of file RE_OGLTexture.h.

int RE_OGLTexture::myGLFormat
protected

Definition at line 364 of file RE_OGLTexture.h.

int RE_OGLTexture::myGLHeight
protected

Definition at line 367 of file RE_OGLTexture.h.

int RE_OGLTexture::myGLInternal
protected

Definition at line 365 of file RE_OGLTexture.h.

int RE_OGLTexture::myGLType
protected

Definition at line 363 of file RE_OGLTexture.h.

int RE_OGLTexture::myGLWidth
protected

Definition at line 366 of file RE_OGLTexture.h.

RE_TextureID RE_OGLTexture::myID
protected

Definition at line 362 of file RE_OGLTexture.h.

int RE_OGLTexture::mySamples
protected

Definition at line 405 of file RE_OGLTexture.h.


The documentation for this class was generated from the following file: