5#ifndef __I_TEXTURE_H_INCLUDED__
6#define __I_TEXTURE_H_INCLUDED__
Base class of most objects of the Irrlicht Engine.
Axis aligned bounding box in 3d dimensional space.
Interface of a Video Driver dependent Texture.
virtual u32 getPitch() const =0
Get pitch of the main texture (in bytes).
virtual void unlock()=0
Unlock function. Must be called after a lock() to the texture.
virtual const core::dimension2d< u32 > & getOriginalSize() const =0
Get original size of the texture.
ITexture(const io::path &name)
constructor
virtual const core::dimension2d< u32 > & getSize() const =0
Get dimension (=size) of the texture.
virtual ECOLOR_FORMAT getColorFormat() const =0
Get the color format of texture.
virtual E_DRIVER_TYPE getDriverType() const =0
Get driver type of texture.
virtual void * lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0)=0
Lock function.
virtual bool hasAlpha() const
Returns if the texture has an alpha channel.
virtual void regenerateMipMapLevels(void *mipmapData=0)=0
Regenerates the mip map levels of the texture.
virtual bool hasMipMaps() const
Check whether the texture has MipMaps.
virtual bool isRenderTarget() const
Check whether the texture is a render target.
const io::SNamedPath & getName() const
Get name of texture (in most cases this is the filename)
E_TEXTURE_CREATION_FLAG getTextureFormatFromFlags(u32 flags)
Helper function, helps to get the desired texture creation format from the flags.
ECOLOR_FORMAT
An enum for the color format of textures used by the Irrlicht Engine.
@ ECF_A1R5G5B5
16 bit color format used by the software driver.
@ ECF_A8R8G8B8
Default 32 bit color format. 8 bits are used for every component: red, green, blue and alpha.
E_TEXTURE_LOCK_MODE
Enum for the mode for texture locking. Read-Only, write-only or read/write.
@ ETLM_READ_ONLY
Read only. The texture is downloaded, but not uploaded again.
@ ETLM_READ_WRITE
The default mode. Texture can be read and written to.
@ ETLM_WRITE_ONLY
Write only. The texture is not downloaded and might be uninitialised.
E_TEXTURE_CREATION_FLAG
Enumeration flags telling the video driver in which format textures should be created.
@ ETCF_FORCE_32_BIT_DO_NOT_USE
@ ETCF_OPTIMIZED_FOR_SPEED
@ ETCF_ALLOW_NON_POWER_2
Allow the Driver to use Non-Power-2-Textures.
@ ETCF_OPTIMIZED_FOR_QUALITY
E_DRIVER_TYPE
An enum for all types of drivers the Irrlicht Engine supports.
Everything in the Irrlicht Engine can be found in this namespace.
unsigned int u32
32 bit unsigned variable.
Used in places where we identify objects by a filename, but don't actually work with the real filenam...