5#ifndef NIRT_I_TEXTURE_HPP_INCLUDED
6#define NIRT_I_TEXTURE_HPP_INCLUDED
8#include <nirtcpp/core/engine/IReferenceCounted.hpp>
9#include <nirtcpp/core/engine/IImage.hpp>
10#include <nirtcpp/core/engine/dimension2d.hpp>
11#include <nirtcpp/core/engine/EDriverTypes.hpp>
12#include <nirtcpp/core/engine/path.hpp>
13#include <nirtcpp/core/engine/matrix4.hpp>
191 ColorFormat(
ECF_UNKNOWN), Pitch(0), HasMipMaps(false), IsRenderTarget(false), Source(
ETS_UNKNOWN), Type(type)
Base class of most objects of the Nirtcpp Engine.
Definition IReferenceCounted.hpp:46
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Used in places where we identify objects by a filename, but don't actually work with the real filenam...
Definition path.hpp:24
Interface of a Video Driver dependent Texture.
Definition ITexture.hpp:186
const io::SNamedPath & getName() const
Get name of texture (in most cases this is the filename)
Definition ITexture.hpp:286
virtual void * lock(E_TEXTURE_LOCK_MODE mode=ETLM_READ_WRITE, u32 mipmapLevel=0, u32 layer=0, E_TEXTURE_LOCK_FLAGS lockFlags=ETLF_FLIP_Y_UP_RTT)=0
Lock function.
ITexture(const io::path &name, E_TEXTURE_TYPE type)
constructor
Definition ITexture.hpp:190
E_DRIVER_TYPE getDriverType() const
Get driver type of texture.
Definition ITexture.hpp:256
bool isRenderTarget() const
Check whether the texture is a render target.
Definition ITexture.hpp:283
void updateSource(E_TEXTURE_SOURCE source)
Used internally by the engine to update Source status on IVideoDriver::getTexture calls.
Definition ITexture.hpp:292
virtual void regenerateMipMapLevels(void *data=0, u32 layer=0)=0
Regenerates the mip map levels of the texture.
bool hasMipMaps() const
Check whether the texture has MipMaps.
Definition ITexture.hpp:276
ECOLOR_FORMAT getColorFormat() const
Get the color format of texture.
Definition ITexture.hpp:260
virtual void unlock()=0
Unlock function. Must be called after a lock() to the texture.
const core::dimension2d< u32 > & getOriginalSize() const
Get original size of the texture.
Definition ITexture.hpp:245
E_TEXTURE_SOURCE getSource() const
Check where the last IVideoDriver::getTexture found this texture.
Definition ITexture.hpp:289
bool hasAlpha() const
Returns if the texture has an alpha channel.
Definition ITexture.hpp:295
E_TEXTURE_CREATION_FLAG getTextureFormatFromFlags(u32 flags)
Helper function, helps to get the desired texture creation format from the flags.
Definition ITexture.hpp:327
ECOLOR_FORMAT getOriginalColorFormat() const
Get the original color format.
Definition ITexture.hpp:266
const core::dimension2d< u32 > & getSize() const
Get dimension (=size) of the texture.
Definition ITexture.hpp:249
E_TEXTURE_TYPE getType() const
Returns the type of texture.
Definition ITexture.hpp:320
u32 getPitch() const
Get pitch of the main texture (in bytes).
Definition ITexture.hpp:272
E_TEXTURE_SOURCE
Where did the last IVideoDriver::getTexture call find this texture.
Definition ITexture.hpp:155
@ ETS_FROM_CACHE
Texture has been found in cache.
Definition ITexture.hpp:160
@ ETS_UNKNOWN
IVideoDriver::getTexture was never called (texture created otherwise)
Definition ITexture.hpp:157
@ ETS_FROM_FILE
Texture had to be loaded.
Definition ITexture.hpp:163
E_TEXTURE_LOCK_FLAGS
Additional bitflags for ITexture::lock() call.
Definition ITexture.hpp:131
@ ETLF_FLIP_Y_UP_RTT
Flip left-bottom origin rendertarget textures upside-down.
Definition ITexture.hpp:150
E_TEXTURE_LOCK_MODE
Enum for the mode for texture locking. Read-Only, write-only or read/write.
Definition ITexture.hpp:115
@ ETLM_READ_ONLY
Read only. The texture is downloaded, but not uploaded again.
Definition ITexture.hpp:121
@ ETLM_READ_WRITE
The default mode. Texture can be read and written to.
Definition ITexture.hpp:117
@ ETLM_WRITE_ONLY
Write only. The texture is not downloaded and might be uninitialized.
Definition ITexture.hpp:126
ECOLOR_FORMAT
An enum for the color format of textures used by the Nirtcpp Engine.
Definition SColor.hpp:21
@ ECF_A16B16G16R16F
64 bit format using 16 bits for the red, green, blue and alpha channels.
Definition SColor.hpp:95
@ ECF_A32B32G32R32F
128 bit format using 32 bits for the red, green, blue and alpha channels.
Definition SColor.hpp:104
@ ECF_DXT5
DXT5 color format.
Definition SColor.hpp:55
@ ECF_UNKNOWN
Unknown color format:
Definition SColor.hpp:132
@ ECF_A8R8G8B8
Definition SColor.hpp:38
@ ECF_DXT1
DXT1 color format.
Definition SColor.hpp:43
@ ECF_A1R5G5B5
16 bit color format used by the software driver.
Definition SColor.hpp:26
@ ECF_DXT4
DXT4 color format.
Definition SColor.hpp:52
@ ECF_DXT3
DXT3 color format.
Definition SColor.hpp:49
@ ECF_DXT2
DXT2 color format.
Definition SColor.hpp:46
E_DRIVER_TYPE
An enum for all types of drivers the Nirtcpp Engine supports.
Definition EDriverTypes.hpp:17
@ EDT_NULL
Null driver, useful for applications to run the engine without visualization.
Definition EDriverTypes.hpp:21
E_TEXTURE_TYPE
Enumeration describing the type of ITexture.
Definition ITexture.hpp:168
@ ETT_2D
2D texture.
Definition ITexture.hpp:170
@ ETT_CUBEMAP
Cubemap texture.
Definition ITexture.hpp:173
E_TEXTURE_CREATION_FLAG
Enumeration flags used to tell the video driver with setTextureCreationFlag in which format textures ...
Definition ITexture.hpp:23
@ ETCF_FORCE_32_BIT_DO_NOT_USE
Definition ITexture.hpp:110
@ ETCF_ALLOW_NON_POWER_2
Allow the Driver to use Non-Power-2-Textures.
Definition ITexture.hpp:76
@ ETCF_NO_ALPHA_CHANNEL
Definition ITexture.hpp:72
@ ETCF_ALLOW_MEMORY_COPY
Allow the driver to keep a copy of the texture in memory.
Definition ITexture.hpp:84
@ ETCF_OPTIMIZED_FOR_QUALITY
Definition ITexture.hpp:53
@ ETCF_AUTO_GENERATE_MIP_MAPS
Enable automatic updating mip maps when the base texture changes.
Definition ITexture.hpp:98
@ ETCF_ALWAYS_32_BIT
Definition ITexture.hpp:44
@ ETCF_CREATE_MIP_MAPS
Definition ITexture.hpp:66
@ ETCF_ALWAYS_16_BIT
Definition ITexture.hpp:33
@ ETCF_SUPPORT_VERTEXT_TEXTURE
Enable support for vertex shader texture sampling on some drivers.
Definition ITexture.hpp:106
@ ETCF_OPTIMIZED_FOR_SPEED
Definition ITexture.hpp:61
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64