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

#include <RE_TextureMap.h>

+ Inheritance diagram for RE_TextureMap:

Classes

class  TexCBPixelData
 

Public Member Functions

virtual ~RE_TextureMap ()
 
virtual int64 getMemoryUsage (bool inclusive) const
 
virtual const char * className () const
 
virtual RE_TextureDimension getMapType ()=0
 
virtual RE_TextureMapclone () const =0
 
bool setSource (const char *mapname, const char *relativeTo)
 
bool setSource (const char *mapname, const char *relativeTo, RE_Texture *texture, RE_CacheVersion version, bool(*releaseCB)(RE_Texture *, void *), void *releaseObject)
 
void setSourceModifyCallback (const char *opname, bool(*modifyCallback)(RE_TextureMap *map, TexCBPixelData &pixdata, void *user_data), void *user_data)
 
void clearStoredTexture ()
 
void deleteTexRef (RE_Texture *tex)
 
RE_TextureHolder getTexture (RE_Render *r)
 Access to the texture itself. This method may actually build it. More...
 
RE_TextureHolder getCachedTexture (RE_Render *r)
 Access to the texture itself, this method will only check the cache. More...
 
RE_TexturegetUncachedTexture (RE_Render *r)
 Return a texture that is not cached in the GL cache. You own it. More...
 
bool hasTaggedTexture () const
 
void setVersion (RE_CacheVersion v)
 
void bumpVersion ()
 
RE_CacheVersion getVersion () const
 
const char * getMapName () const
 
const char * getRelativePath () const
 
void reset ()
 
void clear (const char *clear_name=NULL)
 
bool isSourceValid ()
 
void getResolution (int &w, int &h, int &d)
 
RE_GPUType getFormatType ()
 
int getFormatSize ()
 
float getAspectRatio ()
 
float getAspectRatioXZ ()
 
RE_TextureFilterfilter ()
 
const RE_TextureFilterfilter () const
 
void setColorSpace (PXL_ColorSpace space)
 
PXL_ColorSpace getColorSpace () const
 
void sizeTo (int w, int h, int d=1)
 
void scaleTo (fpreal w, fpreal h=-1.0f, fpreal d=-1.0f)
 
void maxSize (int w, int h, int d)
 
void maxMemSize (int mem_limit_mb)
 
void makePow2 (bool pow2)
 
void setCompression (RE_TextureCompress comp)
 
void setMipMap (bool mip)
 
void setTextureFormatOption (RE_TextureFormatExtra opt)
 
void setTextureComponent (int texcomp)
 
void fillRGBFromSingle (bool fill_rgb_mono)
 
void setOpaqueAlpha (bool opaque_alpha)
 
bool getOpaqueAlpha () const
 
void checkAlphaDetails (bool check)
 
IMG_FileAlphaInfo getAlphaDetails () const
 

Static Public Member Functions

static RE_TextureMapnewTextureMap (RE_TextureDimension type)
 
static void textureReferenceDeleted (void *, RE_Texture *t)
 
static void setTextureCacheSize (int64 size_in_mb)
 
static int64 getTextureCacheSize ()
 
static int64 getTextureCacheUsage ()
 
static int64 get2DTextureUsage ()
 
static int64 get3DTextureUsage ()
 
static int64 getMipMapUsage ()
 
static int64 get3DTextureFP32Size ()
 
static int64 get3DTextureFP16Size ()
 
static int64 get2DTextureFP32Size ()
 
static int64 get2DTextureFP16Size ()
 
static int64 getOrig3DTextureFP32Size ()
 
static int64 getOrig3DTextureFP16Size ()
 
static int64 getOrig2DTextureFP32Size ()
 
static int64 getOrig2DTextureFP16Size ()
 
static void pruneTextureCache ()
 
static void clearTextureCache ()
 
static void debugDumpCache ()
 
static void recordTextureMapUsage (bool enable)
 
static bool recordingTextureUsage ()
 
static void textureUsed (RE_Texture *tex)
 
static void textureDeleted (RE_Texture *tex)
 
static int getNumUsedTextureMaps ()
 
static int64 getUsedTextureMemory ()
 

Protected Member Functions

 RE_TextureMap ()
 
virtual void buildSourceName (UT_String &cachedname, const char *map, const char *rel)
 
virtual void buildTextureName (UT_String &cachedname, const char *map, const char *rel)
 
re_AutoTextureSource getTextureSource (const char *map, const char *relto, void **tex_data)
 
void getDesiredResolution (RE_GPUType type, int vsize, int *w, int *h, int *d)
 
virtual bool buildTexture (RE_Render *r, RE_Texture *tex, void *data)=0
 
virtual void cachedTextureFound (RE_Texture *tex)
 
virtual bool getNodeSource (const char *map, const char *rel, void **mapptr, RE_TextureDimension &textype, RE_GPUType &datatype, int &vectorsize, int &w, int &h, int &d)
 
virtual bool getFileSource (const char *map, void **mapptr, RE_TextureDimension &textype, RE_GPUType &datatype, int &vectorsize, int &w, int &h, int &d)
 
voidcallModifyCallback (RE_Texture *tex, void *data)
 
bool isNodeSource ()
 
RE_TextureCompress getCompression () const
 
bool getMipMap () const
 
RE_TexturegetTextureStub ()
 
void copy (const RE_TextureMap *src)
 
RE_TextureFormatExtra getTextureFormatOption () const
 
void setupGammaCorrect (IMG_FileParms &parms, const char *filename, RE_GPUType datatype)
 
RE_TextureHolder fetchTexture (RE_Render *r, bool build_if_missing)
 

Protected Attributes

RE_TextureCompress myCompression
 
fpreal myScale [3]
 
int myRes [3]
 
int myMaxRes [3]
 
int myMaxMemMB
 
int myMipMap
 
bool myMakePow2
 
UT_String myMapName
 
bool myAlphaDetails
 
IMG_FileAlphaInfo myAlphaInfo
 

Detailed Description

Definition at line 94 of file RE_TextureMap.h.

Constructor & Destructor Documentation

virtual RE_TextureMap::~RE_TextureMap ( )
virtual
RE_TextureMap::RE_TextureMap ( )
protected

Member Function Documentation

virtual void RE_TextureMap::buildSourceName ( UT_String cachedname,
const char *  map,
const char *  rel 
)
protectedvirtual
virtual bool RE_TextureMap::buildTexture ( RE_Render r,
RE_Texture tex,
void data 
)
protectedpure virtual

Implemented in RE_Texture3DMap.

virtual void RE_TextureMap::buildTextureName ( UT_String cachedname,
const char *  map,
const char *  rel 
)
protectedvirtual
void RE_TextureMap::bumpVersion ( )
virtual void RE_TextureMap::cachedTextureFound ( RE_Texture tex)
inlineprotectedvirtual

Definition at line 339 of file RE_TextureMap.h.

void* RE_TextureMap::callModifyCallback ( RE_Texture tex,
void data 
)
protected
void RE_TextureMap::checkAlphaDetails ( bool  check)
inline

Definition at line 276 of file RE_TextureMap.h.

const char * RE_TextureMap::className ( void  ) const
inlinevirtual

Reimplemented in RE_Texture2DArrayMap.

Definition at line 425 of file RE_TextureMap.h.

void RE_TextureMap::clear ( const char *  clear_name = NULL)
void RE_TextureMap::clearStoredTexture ( )
static void RE_TextureMap::clearTextureCache ( )
static
virtual RE_TextureMap* RE_TextureMap::clone ( ) const
pure virtual
void RE_TextureMap::copy ( const RE_TextureMap src)
protected
static void RE_TextureMap::debugDumpCache ( )
static
void RE_TextureMap::deleteTexRef ( RE_Texture tex)
RE_TextureHolder RE_TextureMap::fetchTexture ( RE_Render r,
bool  build_if_missing 
)
protected
void RE_TextureMap::fillRGBFromSingle ( bool  fill_rgb_mono)
inline

Definition at line 264 of file RE_TextureMap.h.

RE_TextureFilter& RE_TextureMap::filter ( )
inline

Definition at line 215 of file RE_TextureMap.h.

const RE_TextureFilter& RE_TextureMap::filter ( ) const
inline

Definition at line 216 of file RE_TextureMap.h.

static int64 RE_TextureMap::get2DTextureFP16Size ( )
static
static int64 RE_TextureMap::get2DTextureFP32Size ( )
static
static int64 RE_TextureMap::get2DTextureUsage ( )
static
static int64 RE_TextureMap::get3DTextureFP16Size ( )
static
static int64 RE_TextureMap::get3DTextureFP32Size ( )
static
static int64 RE_TextureMap::get3DTextureUsage ( )
static
IMG_FileAlphaInfo RE_TextureMap::getAlphaDetails ( ) const
inline

Definition at line 277 of file RE_TextureMap.h.

float RE_TextureMap::getAspectRatio ( )
float RE_TextureMap::getAspectRatioXZ ( )
RE_TextureHolder RE_TextureMap::getCachedTexture ( RE_Render r)

Access to the texture itself, this method will only check the cache.

PXL_ColorSpace RE_TextureMap::getColorSpace ( ) const
RE_TextureCompress RE_TextureMap::getCompression ( ) const
inlineprotected

Definition at line 363 of file RE_TextureMap.h.

void RE_TextureMap::getDesiredResolution ( RE_GPUType  type,
int  vsize,
int w,
int h,
int d 
)
protected
virtual bool RE_TextureMap::getFileSource ( const char *  map,
void **  mapptr,
RE_TextureDimension textype,
RE_GPUType datatype,
int vectorsize,
int w,
int h,
int d 
)
protectedvirtual

Reimplemented in RE_Texture3DMap.

int RE_TextureMap::getFormatSize ( )
RE_GPUType RE_TextureMap::getFormatType ( )
const char* RE_TextureMap::getMapName ( ) const
inline

Definition at line 185 of file RE_TextureMap.h.

virtual RE_TextureDimension RE_TextureMap::getMapType ( )
pure virtual
virtual int64 RE_TextureMap::getMemoryUsage ( bool  inclusive) const
virtual

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

Reimplemented in RE_Texture2DArrayMap, RE_Texture3DMap, RE_Texture1DMap, RE_TextureCubeMap, and RE_Texture2DMap.

bool RE_TextureMap::getMipMap ( ) const
inlineprotected

Definition at line 364 of file RE_TextureMap.h.

static int64 RE_TextureMap::getMipMapUsage ( )
static
virtual bool RE_TextureMap::getNodeSource ( const char *  map,
const char *  rel,
void **  mapptr,
RE_TextureDimension textype,
RE_GPUType datatype,
int vectorsize,
int w,
int h,
int d 
)
protectedvirtual

Reimplemented in RE_Texture3DMap.

static int RE_TextureMap::getNumUsedTextureMaps ( )
static
bool RE_TextureMap::getOpaqueAlpha ( ) const
inline

Definition at line 272 of file RE_TextureMap.h.

static int64 RE_TextureMap::getOrig2DTextureFP16Size ( )
static
static int64 RE_TextureMap::getOrig2DTextureFP32Size ( )
static
static int64 RE_TextureMap::getOrig3DTextureFP16Size ( )
static
static int64 RE_TextureMap::getOrig3DTextureFP32Size ( )
static
const char* RE_TextureMap::getRelativePath ( ) const
inline

Definition at line 186 of file RE_TextureMap.h.

void RE_TextureMap::getResolution ( int w,
int h,
int d 
)
RE_TextureHolder RE_TextureMap::getTexture ( RE_Render r)

Access to the texture itself. This method may actually build it.

static int64 RE_TextureMap::getTextureCacheSize ( )
static
static int64 RE_TextureMap::getTextureCacheUsage ( )
static
RE_TextureFormatExtra RE_TextureMap::getTextureFormatOption ( ) const
inlineprotected

Definition at line 371 of file RE_TextureMap.h.

re_AutoTextureSource RE_TextureMap::getTextureSource ( const char *  map,
const char *  relto,
void **  tex_data 
)
protected
RE_Texture* RE_TextureMap::getTextureStub ( )
protected
RE_Texture* RE_TextureMap::getUncachedTexture ( RE_Render r)

Return a texture that is not cached in the GL cache. You own it.

static int64 RE_TextureMap::getUsedTextureMemory ( )
static
RE_CacheVersion RE_TextureMap::getVersion ( ) const
inline

Definition at line 182 of file RE_TextureMap.h.

bool RE_TextureMap::hasTaggedTexture ( ) const
inline

Definition at line 177 of file RE_TextureMap.h.

bool RE_TextureMap::isNodeSource ( )
protected
bool RE_TextureMap::isSourceValid ( )
void RE_TextureMap::makePow2 ( bool  pow2)
void RE_TextureMap::maxMemSize ( int  mem_limit_mb)
void RE_TextureMap::maxSize ( int  w,
int  h,
int  d 
)
static RE_TextureMap* RE_TextureMap::newTextureMap ( RE_TextureDimension  type)
static
static void RE_TextureMap::pruneTextureCache ( )
static
static bool RE_TextureMap::recordingTextureUsage ( )
static
static void RE_TextureMap::recordTextureMapUsage ( bool  enable)
static
void RE_TextureMap::reset ( )
void RE_TextureMap::scaleTo ( fpreal  w,
fpreal  h = -1.0f,
fpreal  d = -1.0f 
)
void RE_TextureMap::setColorSpace ( PXL_ColorSpace  space)
void RE_TextureMap::setCompression ( RE_TextureCompress  comp)
void RE_TextureMap::setMipMap ( bool  mip)
void RE_TextureMap::setOpaqueAlpha ( bool  opaque_alpha)
inline

Definition at line 268 of file RE_TextureMap.h.

bool RE_TextureMap::setSource ( const char *  mapname,
const char *  relativeTo 
)
bool RE_TextureMap::setSource ( const char *  mapname,
const char *  relativeTo,
RE_Texture texture,
RE_CacheVersion  version,
bool(*)(RE_Texture *, void *)  releaseCB,
void releaseObject 
)
void RE_TextureMap::setSourceModifyCallback ( const char *  opname,
bool(*)(RE_TextureMap *map, TexCBPixelData &pixdata, void *user_data)  modifyCallback,
void user_data 
)
static void RE_TextureMap::setTextureCacheSize ( int64  size_in_mb)
static
void RE_TextureMap::setTextureComponent ( int  texcomp)
inline

Definition at line 259 of file RE_TextureMap.h.

void RE_TextureMap::setTextureFormatOption ( RE_TextureFormatExtra  opt)
inline

Definition at line 254 of file RE_TextureMap.h.

void RE_TextureMap::setupGammaCorrect ( IMG_FileParms parms,
const char *  filename,
RE_GPUType  datatype 
)
protected
void RE_TextureMap::setVersion ( RE_CacheVersion  v)
inline

Definition at line 180 of file RE_TextureMap.h.

void RE_TextureMap::sizeTo ( int  w,
int  h,
int  d = 1 
)
static void RE_TextureMap::textureDeleted ( RE_Texture tex)
static
static void RE_TextureMap::textureReferenceDeleted ( void ,
RE_Texture t 
)
static
static void RE_TextureMap::textureUsed ( RE_Texture tex)
static

Member Data Documentation

bool RE_TextureMap::myAlphaDetails
protected

Definition at line 389 of file RE_TextureMap.h.

IMG_FileAlphaInfo RE_TextureMap::myAlphaInfo
protected

Definition at line 390 of file RE_TextureMap.h.

RE_TextureCompress RE_TextureMap::myCompression
protected

Definition at line 381 of file RE_TextureMap.h.

bool RE_TextureMap::myMakePow2
protected

Definition at line 387 of file RE_TextureMap.h.

UT_String RE_TextureMap::myMapName
protected

Definition at line 388 of file RE_TextureMap.h.

int RE_TextureMap::myMaxMemMB
protected

Definition at line 385 of file RE_TextureMap.h.

int RE_TextureMap::myMaxRes[3]
protected

Definition at line 384 of file RE_TextureMap.h.

int RE_TextureMap::myMipMap
protected

Definition at line 386 of file RE_TextureMap.h.

int RE_TextureMap::myRes[3]
protected

Definition at line 383 of file RE_TextureMap.h.

fpreal RE_TextureMap::myScale[3]
protected

Definition at line 382 of file RE_TextureMap.h.


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