HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 setNamespace (const char *ns)
 
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, bool deferred_load=false)
 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
 
virtual void invalidateCached ()
 
const char * getMapName () const
 
const char * getRelativePath () const
 
void reset ()
 
void clear (const char *clear_name=nullptr)
 
bool isSourceValid ()
 
void setValidSourceResolve (bool valid)
 
bool hasValidSourceResolve () const
 
bool isLoadPending () const
 
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
 
void allowPreload (bool preload)
 
bool allowsPreload () const
 
virtual int getSourceOpID () const
 

Static Public Member Functions

static RE_TextureMapnewTextureMap (RE_TextureDimension type)
 
static void backgroundTextureLoadThreads (int n)
 
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 (bool full_clear)
 
static void debugDumpCache ()
 
static int getTextureCacheSerial ()
 
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, bool deferred_load=false, bool preload_only=false)
 
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, bool preload_only)
 
void setPendingLoad (bool pend)
 
voidcallModifyCallback (RE_Texture *tex, void *data)
 
bool isNodeSource ()
 
RE_TextureCompress getCompression () const
 
bool getMipMap () const
 
RE_TexturegetTextureStub (bool preload)
 
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, bool preload_only)
 

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 98 of file RE_TextureMap.h.

Constructor & Destructor Documentation

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

Member Function Documentation

void RE_TextureMap::allowPreload ( bool  preload)
inline

Definition at line 299 of file RE_TextureMap.h.

bool RE_TextureMap::allowsPreload ( ) const
inline

Definition at line 300 of file RE_TextureMap.h.

static void RE_TextureMap::backgroundTextureLoadThreads ( int  n)
static
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 370 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 296 of file RE_TextureMap.h.

const char * RE_TextureMap::className ( ) const
inlinevirtual

Reimplemented in RE_Texture2DArrayMap.

Definition at line 470 of file RE_TextureMap.h.

void RE_TextureMap::clear ( const char *  clear_name = nullptr)
void RE_TextureMap::clearStoredTexture ( )
static void RE_TextureMap::clearTextureCache ( bool  full_clear)
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,
bool  preload_only 
)
protected
void RE_TextureMap::fillRGBFromSingle ( bool  fill_rgb_mono)
inline

Definition at line 284 of file RE_TextureMap.h.

RE_TextureFilter& RE_TextureMap::filter ( )
inline

Definition at line 235 of file RE_TextureMap.h.

const RE_TextureFilter& RE_TextureMap::filter ( ) const
inline

Definition at line 236 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 297 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 397 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,
bool  preload_only 
)
protectedvirtual

Reimplemented in RE_Texture3DMap.

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

Definition at line 196 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_Texture2DMap, RE_Texture3DMap, RE_TextureCubeMap, and RE_Texture1DMap.

bool RE_TextureMap::getMipMap ( ) const
inlineprotected

Definition at line 398 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 292 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 197 of file RE_TextureMap.h.

void RE_TextureMap::getResolution ( int w,
int h,
int d 
)
virtual int RE_TextureMap::getSourceOpID ( ) const
inlinevirtual

Reimplemented in RE_Texture2DMap.

Definition at line 303 of file RE_TextureMap.h.

RE_TextureHolder RE_TextureMap::getTexture ( RE_Render r,
bool  deferred_load = false 
)

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

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

Definition at line 405 of file RE_TextureMap.h.

re_AutoTextureSource RE_TextureMap::getTextureSource ( const char *  map,
const char *  relto,
void **  tex_data,
bool  deferred_load = false,
bool  preload_only = false 
)
protected
RE_Texture* RE_TextureMap::getTextureStub ( bool  preload)
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 190 of file RE_TextureMap.h.

bool RE_TextureMap::hasTaggedTexture ( ) const
inline

Definition at line 185 of file RE_TextureMap.h.

bool RE_TextureMap::hasValidSourceResolve ( ) const
inline

Definition at line 212 of file RE_TextureMap.h.

virtual void RE_TextureMap::invalidateCached ( )
virtual

Reimplemented in RE_Texture2DArrayMap.

bool RE_TextureMap::isLoadPending ( ) const
inline

Return trues if a load request has been queued for this texture, but it isn't yet loaded.

Definition at line 216 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::setNamespace ( const char *  ns)
inline

Definition at line 137 of file RE_TextureMap.h.

void RE_TextureMap::setOpaqueAlpha ( bool  opaque_alpha)
inline

Definition at line 288 of file RE_TextureMap.h.

void RE_TextureMap::setPendingLoad ( bool  pend)
inlineprotected

Definition at line 388 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 279 of file RE_TextureMap.h.

void RE_TextureMap::setTextureFormatOption ( RE_TextureFormatExtra  opt)
inline

Definition at line 274 of file RE_TextureMap.h.

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

Definition at line 188 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 425 of file RE_TextureMap.h.

IMG_FileAlphaInfo RE_TextureMap::myAlphaInfo
protected

Definition at line 426 of file RE_TextureMap.h.

RE_TextureCompress RE_TextureMap::myCompression
protected

Definition at line 417 of file RE_TextureMap.h.

bool RE_TextureMap::myMakePow2
protected

Definition at line 423 of file RE_TextureMap.h.

UT_String RE_TextureMap::myMapName
protected

Definition at line 424 of file RE_TextureMap.h.

int RE_TextureMap::myMaxMemMB
protected

Definition at line 421 of file RE_TextureMap.h.

int RE_TextureMap::myMaxRes[3]
protected

Definition at line 420 of file RE_TextureMap.h.

int RE_TextureMap::myMipMap
protected

Definition at line 422 of file RE_TextureMap.h.

int RE_TextureMap::myRes[3]
protected

Definition at line 419 of file RE_TextureMap.h.

fpreal RE_TextureMap::myScale[3]
protected

Definition at line 418 of file RE_TextureMap.h.


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