igor::iTexture Class Reference

#include <iTexture.h>

Inherits igor::iResource.

Public Member Functions

bool useFallback () const
 
int32 getWidth () const
 
int32 getHeight () const
 
int32 getBpp () const
 
uint32 getMipMapLevels () const
 
iColorFormat getColorFormat () const
 
bool hasTransparency () const
 
iTextureBuildMode getBuildMode () const
 
iTextureWrapMode getWrapMode () const
 
void bind (uint32 textureUnit)
 
- Public Member Functions inherited from igor::iResource
virtual ~iResource ()=default
 
bool isValid () const
 
bool isProcessed () const
 
bool isQuiet () const
 
const iaStringgetSource () const
 
const iaString getInfo () const
 
const iResourceIDgetID () const
 
const iaStringgetAlias () const
 
iResourceCacheMode getCacheMode () const
 
const iParametersgetParameters () const
 
const iaStringgetType () const
 

Static Public Member Functions

static uint32 calcMipMapLevels (int32 width, int32 height)
 
- Static Public Member Functions inherited from igor::iResource
static bool extractID (const iParameters &parameters, iResourceID &id, bool quiet=false)
 

Friends

class iTextureFactory
 

Additional Inherited Members

- Protected Member Functions inherited from igor::iResource
 iResource (const iParameters &parameters)
 

Detailed Description

represents a texture resource

available parameters:

  • inherits all parameters from iResource
  • generate: leads to generating a texture procedurally (type: bool)
    • pattern: type of pattern to use for procedurally generation (type: iTexturePattern)
    • primary: primary color to use (type: iaColor4f)
    • secondary: secondary color to use (type: iaColor4f)
    • width: width of texture (type: uint32)
    • height: height of texture (type: uint32)
  • pixmap: use data from given pixmap for texture (type: iPixmapPtr)
  • wrapMode: texture wrap mode (type: iTextureWrapMode, default: Repeat)
  • buildMode: texture wrap mode (type: iTextureBuildMode, default: Mipmapped)

Member Function Documentation

◆ bind()

void igor::iTexture::bind ( uint32  textureUnit)

binds and activates texture to given texture unit

Parameters
textureUnitthe given texture unit

◆ calcMipMapLevels()

uint32 igor::iTexture::calcMipMapLevels ( int32  width,
int32  height 
)
static

calculates mip map levels

Parameters
widththe width of the texture
heightthe height of the texture
Returns
the mip map levels

◆ getBpp()

int32 igor::iTexture::getBpp ( ) const
Returns
the bits per pixel (texel)

◆ getBuildMode()

iTextureBuildMode igor::iTexture::getBuildMode ( ) const
Returns
the texture build mode

◆ getColorFormat()

iColorFormat igor::iTexture::getColorFormat ( ) const
Returns
the color format

◆ getHeight()

int32 igor::iTexture::getHeight ( ) const
Returns
the height in texels

◆ getMipMapLevels()

uint32 igor::iTexture::getMipMapLevels ( ) const
Returns
the mip map level count

◆ getWidth()

int32 igor::iTexture::getWidth ( ) const
Returns
the width in texels

◆ getWrapMode()

iTextureWrapMode igor::iTexture::getWrapMode ( ) const
Returns
texture wrap mode

◆ hasTransparency()

bool igor::iTexture::hasTransparency ( ) const
Returns
true if data contains alpha channel and values != 1.0

◆ useFallback()

bool igor::iTexture::useFallback ( ) const
Returns
true if it is unprocessed or invalid. Then the renderer will use a fallback texture

Friends And Related Function Documentation

◆ iTextureFactory

friend class iTextureFactory
friend

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