Graphics::Texture class

High level representation of a game texture.

Interaction with this class is done through the TextureManager; textures are identified using an instance ID and group ID (there is also type ID, but it is often defaulted to .raster and ignored). The low level equivalent is RenderWare::Raster, which can be used to load the texture into shaders and materials.

Derived classes

class TextureContainer

Public functions

auto AddRef() -> int
auto Release() -> int
auto GetRaster() -> RenderWare::Raster*
Returns the underlying raster of this texture, which can be used to load it into shaders and materials.
auto GetLoadedRaster() -> RenderWare::Raster*
Returns the underlying raster of this texture, waiting until the texture finishes loading if it is still loading asynchronously (so this will always return the final raster, and not temporary ones).
auto IsLoaded() -> bool
Returns true if the texture is fully loaded, false if it is still loading.

Protected variables

RenderWare::Raster* mpRaster
int mFlags
int mnRefCount
int field_0C
ResourceKey mName
cRwRasterDirectResourcePtr mpResource