97 virtual TextureHandle loadTextureArray(
const unsigned char ** bytes,
const size_t arraySize,
const size_t numLevels,
const unsigned int * widths,
const unsigned int * heights,
TextureFormat format,
unsigned int flags = 0) = 0;
112 virtual TextureHandle loadCubeMap(
const unsigned char ** bytes,
const size_t arraySize,
const size_t numLevels,
const unsigned int * widths,
const unsigned int * heights,
TextureFormat format,
unsigned int flags = 0) = 0;
130 uint32_t layer_offset = 0,
131 uint32_t face_offset = 0,
132 uint32_t level_offset = 0) { (void)textureHandle; (void)data; (void)layer_offset; (void)face_offset; (void)level_offset; }
size_t hash(const VertexElement &element, size_t hashValue=Cogs::hash())
Calculate a hash value for the specified vertex element.
Definition: VertexFormat.h:100
Format
Definition: DataFormat.h:22
intptr_t TextureNativeHandle
Definition: Common.h:238
handle_type handle
Internal resource handle.
Definition: Common.h:74
Provides texture management functionality.
Definition: ITextures.h:40
virtual SamplerStateHandle loadSamplerState(const SamplerState &state)=0
Load a sampler state object.
virtual void uploadTextureData(TextureHandle textureHandle, const TextureData &data, uint32_t layer_offset=0, uint32_t face_offset=0, uint32_t level_offset=0)
Upload a texture from the given description.
Definition: ITextures.h:128
virtual void releaseResources()=0
Release all allocated texture resources.
virtual void releaseNativeTexture(TextureNativeHandle nativeHandle)
Release a native texture handle.
Definition: ITextures.h:146
virtual TextureViewHandle createTextureView(TextureViewDescription &viewDescription)=0
Create a texture view used to bind a limited view of the texture data to the rendering pipeline.
virtual void * getNativeHandle(TextureHandle textureHandle)=0
Get the device-specific handle (D3D texture pointer, OpenGL texture ID etc) associated with the given...
virtual void generateMipmaps(TextureHandle textureHandle)=0
Use the graphics device to generate mipmaps for the texture with the given texture handle.
virtual void annotate(TextureHandle handle, const StringView &name)
Associate a name with an object for use in graphics debugging.
Definition: ITextures.h:44
virtual TextureHandle loadTexture(const unsigned char *bytes, unsigned int width, unsigned int height, TextureFormat format, unsigned int numSamples, unsigned int flags)=0
Load a texture using the given data to populate the texture contents.
virtual void releaseTexture(TextureHandle textureHandle)=0
Release the texture with the given textureHandle.
virtual TextureHandle loadTextureMipMaps(const unsigned char **bytes, size_t numLevels, const unsigned int *widths, const unsigned int *heights, TextureFormat format, unsigned int flags=0)=0
Load a texture with multiple mipmap levels using the given data to populate the texture contents.
virtual void releaseSamplerState(SamplerStateHandle handle)=0
Release the sampler state with the given handle.
virtual TextureHandle loadTexture(const TextureDescription &desc, const TextureData *data)=0
Load a texture from the given description.
virtual TextureHandle loadTexture(const unsigned char *bytes, unsigned int width, unsigned int height, TextureFormat format, unsigned int flags=0)=0
Load a texture using the given data to populate the texture contents.
virtual TextureHandle loadTextureArray(const unsigned char **bytes, const size_t arraySize, const size_t numLevels, const unsigned int *widths, const unsigned int *heights, TextureFormat format, unsigned int flags=0)=0
Load an array texture with mipmaps using the given data to populate the texture contents.
virtual void releaseTextureView(const TextureViewHandle &handle)=0
Release the given texture view.
virtual TextureHandle loadCubeMap(const unsigned char **bytes, const size_t arraySize, const size_t numLevels, const unsigned int *widths, const unsigned int *heights, TextureFormat format, unsigned int flags=0)=0
Load a cube map texture with mipmaps using the given data to populate the texture contents.
Encapsulates state for texture sampling in a state object.
Definition: SamplerState.h:12
Definition: TextureData.h:56
Definition: TextureData.h:35
Describes how to fetch data from a texture in shaders.
Definition: ITextures.h:13
uint32_t layerIndex
Index of the first layer (if array) to fetch from.
Definition: ITextures.h:17
uint32_t numLayers
Number of array layers available.
Definition: ITextures.h:19
uint32_t numLevels
Number of mipmap levels available.
Definition: ITextures.h:23
size_t hash(size_t hashValue=Cogs::hash()) const
Definition: ITextures.h:25
uint32_t levelIndex
First mipmap level to fetch data from.
Definition: ITextures.h:21
TextureHandle texture
Texture.
Definition: ITextures.h:15