public

Inheritance Graph

graph BT
	Texture
	Texture --> ReferenceCounter
	click Texture "classRendering_1_1Texture"
	click ReferenceCounter "classUtil_1_1ReferenceCounter"

Description

Texture

Coordinates:
(0,sizeY-1,numLayers-1)             (sizeX,sizeY,numLayers-1)
              +---------------+  
              |               |  
              .     ...       .
              .               .
              |               |  
(0,0,1)       +---------------+ (sizeX-1,0,1)
(0,sizeY-1,0) +---------------+ (sizeX-1,sizeY-1,0)
              |      /\       |  
              |     /  \      |
              |      ||       |
              |      ||       |
              +---------------+
(0,0,0)                  (sizeX,0,0)

Note: the coordinates are different to the ones used in Util::Bitmap

Classes

   
struct Rendering::Texture::Format

Mipmaps

   
   
void planMipmapCreation()
   
void createMipmaps( RenderingContext & context)
   
bool getHasMipmaps() const

BufferObject (tType == TEXTURE_BUFFER)

   
   
BufferObject * getBufferObject() const

Filename

   
   
const Util::FileName & getFileName() const
   
void setFileName(const Util::FileName & f)

Public Functions

   
   
  Texture( Format format)
   
  ~Texture()
   
uint32_t getDataSize() const
   
const Format & getFormat() const
   
uint32_t getGLTextureType() const
   
uint32_t getGLId() const
   
uint32_t getNumLayers() const
   
uint32_t getHeight() const
   
uint32_t getWidth() const
   
TextureType getTextureType() const
   
bool getUseLinearMinFilter() const
   
bool getUseLinearMagFilter() const
   
void _createGLID( RenderingContext & context)
   
void _uploadGLTexture( RenderingContext & context, int level)
   
void downloadGLTexture( RenderingContext & context)
   
void removeGLData()
   
void clearGLData(const Util::Color4f & color)
   
void allocateLocalData()
   
uint8_t * openLocalData( RenderingContext & context)
   
uint8_t * getLocalData()
   
const uint8_t * getLocalData() const
   
void dataChanged()
   
uint32_t _prepareForBinding( RenderingContext & context)
(internal) uploads the texture if necessary; returns the glId or 0 if the texture is invalid.
   
bool isGLTextureValid() const
   
bool isGLTextureResident() const
   
Util::Bitmap * getLocalBitmap() const
   
void _setGLId(uint32_t glId)
   
void enableComparision( RenderingContext & context, Comparison::function_t func)

Documentation

function
Rendering::Texture::planMipmapCreation

public inline
   
   
void planMipmapCreation( )

Defined in Rendering/Texture/Texture.h:147


function
Rendering::Texture::createMipmaps

public
     
     
void createMipmaps( RenderingContext & context )

Defined in Rendering/Texture/Texture.h:148


function
Rendering::Texture::getHasMipmaps

public const inline
   
   
bool getHasMipmaps( ) const

Defined in Rendering/Texture/Texture.h:149


function
Rendering::Texture::getBufferObject

public const inline
   
   
BufferObject * getBufferObject( ) const

Defined in Rendering/Texture/Texture.h:156


function
Rendering::Texture::getFileName

public const inline
   
   
const Util::FileName & getFileName( ) const

Defined in Rendering/Texture/Texture.h:164


function
Rendering::Texture::setFileName

public inline
     
     
void setFileName( const Util::FileName & f )

Defined in Rendering/Texture/Texture.h:165


function
Rendering::Texture::Texture

public
     
     
Texture( Format format )

Defined in Rendering/Texture/Texture.h:100


function
Rendering::Texture::~Texture

public
   
   
~Texture( )

Defined in Rendering/Texture/Texture.h:101


function
Rendering::Texture::getDataSize

public const inline
   
   
uint32_t getDataSize( ) const

Defined in Rendering/Texture/Texture.h:103


function
Rendering::Texture::getFormat

public const inline
   
   
const Format & getFormat( ) const

Defined in Rendering/Texture/Texture.h:104


function
Rendering::Texture::getGLTextureType

public const inline
   
   
uint32_t getGLTextureType( ) const

Defined in Rendering/Texture/Texture.h:105


function
Rendering::Texture::getGLId

public const inline
   
   
uint32_t getGLId( ) const

Defined in Rendering/Texture/Texture.h:106


function
Rendering::Texture::getNumLayers

public const inline
   
   
uint32_t getNumLayers( ) const

Defined in Rendering/Texture/Texture.h:107


function
Rendering::Texture::getHeight

public const inline
   
   
uint32_t getHeight( ) const

Defined in Rendering/Texture/Texture.h:108


function
Rendering::Texture::getWidth

public const inline
   
   
uint32_t getWidth( ) const

Defined in Rendering/Texture/Texture.h:109


function
Rendering::Texture::getTextureType

public const inline
   
   
TextureType getTextureType( ) const

Defined in Rendering/Texture/Texture.h:110


function
Rendering::Texture::getUseLinearMinFilter

public const inline
   
   
bool getUseLinearMinFilter( ) const

Defined in Rendering/Texture/Texture.h:111


function
Rendering::Texture::getUseLinearMagFilter

public const inline
   
   
bool getUseLinearMagFilter( ) const

Defined in Rendering/Texture/Texture.h:112


function
Rendering::Texture::_createGLID

public
     
     
void _createGLID( RenderingContext & context )

Defined in Rendering/Texture/Texture.h:114


function
Rendering::Texture::_uploadGLTexture

public
     
     
void _uploadGLTexture( RenderingContext & context,
  int level
)    

Defined in Rendering/Texture/Texture.h:115


function
Rendering::Texture::downloadGLTexture

public
     
     
void downloadGLTexture( RenderingContext & context )

Defined in Rendering/Texture/Texture.h:116


function
Rendering::Texture::removeGLData

public
   
   
void removeGLData( )

Defined in Rendering/Texture/Texture.h:117


function
Rendering::Texture::clearGLData

public
     
     
void clearGLData( const Util::Color4f & color )

Defined in Rendering/Texture/Texture.h:118


function
Rendering::Texture::allocateLocalData

public
   
   
void allocateLocalData( )

Defined in Rendering/Texture/Texture.h:120


function
Rendering::Texture::openLocalData

public
     
     
uint8_t * openLocalData( RenderingContext & context )

Returns a pointer to the local data.

Note: if the texture has no local data, it is downloaded automatically

Defined in Rendering/Texture/Texture.h:124


function
Rendering::Texture::getLocalData

public
   
   
uint8_t * getLocalData( )

Defined in Rendering/Texture/Texture.h:126


function
Rendering::Texture::getLocalData

public const
   
   
const uint8_t * getLocalData( ) const

Defined in Rendering/Texture/Texture.h:127


function
Rendering::Texture::dataChanged

public inline
   
   
void dataChanged( )

Defined in Rendering/Texture/Texture.h:129


function
Rendering::Texture::_prepareForBinding

public inline
     
     
uint32_t _prepareForBinding( RenderingContext & context )

(internal) uploads the texture if necessary; returns the glId or 0 if the texture is invalid.

Defined in Rendering/Texture/Texture.h:132


function
Rendering::Texture::isGLTextureValid

public const
   
   
bool isGLTextureValid( ) const

Defined in Rendering/Texture/Texture.h:140


function
Rendering::Texture::isGLTextureResident

public const
   
   
bool isGLTextureResident( ) const

Defined in Rendering/Texture/Texture.h:141


function
Rendering::Texture::getLocalBitmap

public const inline
   
   
Util::Bitmap * getLocalBitmap( ) const

Defined in Rendering/Texture/Texture.h:143


function
Rendering::Texture::_setGLId

public
     
     
void _setGLId( uint32_t glId )

(internal) sets the glId of the texture. Used for creating textures from existing gl textures. WARNING: The format is not updated and needs to fit the gl texture.

Defined in Rendering/Texture/Texture.h:174


function
Rendering::Texture::enableComparision

public
     
     
void enableComparision( RenderingContext & context,
  Comparison::function_t func
)    

Defined in Rendering/Texture/Texture.h:176