5#ifndef __I_TEXTURE_H_INCLUDED__
6#define __I_TEXTURE_H_INCLUDED__
8#include "IReferenceCounted.h"
10#include "dimension2d.h"
11#include "EDriverTypes.h"
124 Pitch(0), HasMipMaps(false), HasAlpha(false), IsRenderTarget(false), Source(
ETS_UNKNOWN), TextureType(ETT_TEXTURE_2D)
218 const E_TEXTURE_TYPE& getTextureType()
const
251 E_TEXTURE_TYPE TextureType;
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:50
Specifies a 2 dimensional size.
Definition dimension2d.h:21
ECOLOR_FORMAT getColorFormat() const
Get the color format of texture.
Definition ITexture.h:187
const core::dimension2d< u32 > & getSize() const
Get dimension (=size) of the texture.
Definition ITexture.h:176
bool hasAlpha() const
Returns if the texture has an alpha channel.
Definition ITexture.h:200
virtual void unlock()=0
Unlock function. Must be called after a lock() to the texture.
ITexture(const io::path &name)
constructor
Definition ITexture.h:123
u32 getPitch() const
Get pitch of the main texture (in bytes).
Definition ITexture.h:193
virtual void * lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0)=0
Lock function.
E_TEXTURE_SOURCE getSource() const
Check where the last IVideoDriver::getTexture found this texture.
Definition ITexture.h:213
void updateSource(E_TEXTURE_SOURCE source)
Used internally by the engine to update Source status on IVideoDriver::getTexture calls.
Definition ITexture.h:216
virtual void regenerateMipMapLevels(void *mipmapData=0)=0
Regenerates the mip map levels of the texture.
bool isRenderTarget() const
Check whether the texture is a render target.
Definition ITexture.h:207
bool hasMipMaps() const
Check whether the texture has MipMaps.
Definition ITexture.h:197
const io::SNamedPath & getName() const
Get name of texture (in most cases this is the filename).
Definition ITexture.h:210
const core::dimension2d< u32 > & getOriginalSize() const
Get original size of the texture.
Definition ITexture.h:172
E_DRIVER_TYPE getDriverType() const
Get driver type of texture.
Definition ITexture.h:183
E_TEXTURE_CREATION_FLAG getTextureFormatFromFlags(u32 flags)
Helper function, helps to get the desired texture creation format from the flags.
Definition ITexture.h:228
core::string< fschar_t > path
Type used for all file system related strings.
Definition path.h:17
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done ...
Definition EDriverFeatures.h:11
ECOLOR_FORMAT
An enum for the color format of textures used by the Irrlicht Engine.
Definition SColor.h:18
@ ECF_UNKNOWN
Unknown color format:
Definition SColor.h:138
E_TEXTURE_LOCK_MODE
Enum for the mode for texture locking. Read-Only, write-only or read/write.
Definition ITexture.h:75
@ ETLM_READ_ONLY
Read only. The texture is downloaded, but not uploaded again.
Definition ITexture.h:81
@ ETLM_READ_WRITE
The default mode. Texture can be read and written to.
Definition ITexture.h:77
@ ETLM_WRITE_ONLY
Write only. The texture is not downloaded and might be uninitialised.
Definition ITexture.h:86
E_TEXTURE_SOURCE
Where did the last IVideoDriver::getTexture call find this texture.
Definition ITexture.h:91
@ ETS_UNKNOWN
IVideoDriver::getTexture was never called (texture created otherwise).
Definition ITexture.h:93
@ ETS_FROM_FILE
Texture had to be loaded.
Definition ITexture.h:99
@ ETS_FROM_CACHE
Texture has been found in cache.
Definition ITexture.h:96
E_TEXTURE_CREATION_FLAG
Enumeration flags telling the video driver in which format textures should be created.
Definition ITexture.h:23
@ ETCF_FORCE_32_BIT_DO_NOT_USE
Definition ITexture.h:70
@ ETCF_OPTIMIZED_FOR_SPEED
Definition ITexture.h:56
@ ETCF_ALWAYS_32_BIT
Definition ITexture.h:41
@ ETCF_CREATE_MIP_MAPS
Definition ITexture.h:59
@ ETCF_ALWAYS_16_BIT
Definition ITexture.h:32
@ ETCF_ALLOW_NON_POWER_2
Allow the Driver to use Non-Power-2-Textures.
Definition ITexture.h:66
@ ETCF_NO_ALPHA_CHANNEL
Definition ITexture.h:62
@ ETCF_OPTIMIZED_FOR_QUALITY
Definition ITexture.h:49
E_DRIVER_TYPE
An enum for all types of drivers the Irrlicht Engine supports.
Definition EDriverTypes.h:15
@ EDT_NULL
Null driver, useful for applications to run the engine without visualisation.
Definition EDriverTypes.h:19
Everything in the Irrlicht Engine can be found in this namespace.
Definition Skylicht.h:33
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
Used in places where we identify objects by a filename, but don't actually work with the real filenam...
Definition path.h:24