ITexture interface overview

File      : API\rend\ITexture.h
Namespace : rend

Description

Interface describes singe texture. Textures of different types are loaded with according ITextureLoader which are maintained and managed by services::ITexturesService. Textures could belong into some container (e.g. textures pack name) and stores it's original path and filename. This particullary allows to reload texture if it was externally modified.

Each texture contains a pointer to a so-called base texture which is in current implementation an instance of IDirect3DTexture9 interface. You can use getBaseTexture method to access this interface.

Instances of ITexture interface are not used as is. Instead they are placed as a texture layers onto material. Texture layer contains complete information about texture stage including blending, wrapping modes, uv source and of cause a pointer to texture interface itself. Texture layer is presented with struct tTextureLayerInfo. These texture layers are added to materials and certain material with its set of textures is refered by struct tRenderBlock::m_nMaterial passed into services::IRenderManager for rendering.

Interface methods

getTitle Provides texture title. It's usually texture filename with extension.
setTitle Sets texture title.
getPathName Provides texture original path and name. It can be used to reload texture it it was changed externally.
setPathName Sets texture original path and name.
setContainerName Sets texture container name.
getContainerName Provides texture container name. It's NULL string for non-contained textures.
getGroup Provides texture group specified as a value of eTextureGroup enumeration.
setGroup Sets texture group specified as a value of eTextureGroup enumeration.
getSize Provides texture width and height in pixels.
setSize Sets texture width and height in pixels. Texture itself does not change, this method will affect a ret-value of getSize method only.
getFormat Provides texture format as value if D3DFMT_* from DirectX SDK.
setFormat Sets texture format as value if D3DFMT_* from DirectX SDK.
getBaseTexture Provides underlying base texture (IDirect3DTexture9) interface.
setBaseTexture Sets underlying base texture (IDirect3DTexture9) interface.
hasAlpha Specifies whether texture has alphs-channel.
getColorKey Sets texture's color-key range.
setColorKey Provides texture's color-key range.

Interface-collection

class CTextureCol : public ZUnknown,
      public ZIntrCollection<ITexture>

CTextureCol follows semantic of interfaces (includes references count via AddRef/Release, but does not provide any interfaces via QueryInterface) and follows semanic of interfaces collection template.

See Also:
overview of namespace rend
services::ITexturesService interface.
ITextureLoader::loadTexture method.
ITextureContainer::loadTexture method.
enum rend::eTextureGroup.
struct rend::tTextureLayerInfo.