ModelTexture
Description
- Derived from
Abstract base class for IModelTexture implementations.
The default implementation of IModelTexture.ReadTexels delegates to ReadTexels, passing IModelTexture.PreferredTextureFormat and IModelTexture.IsSrgb, which results in null
and true
for the respective default implementation.
Public / Constructors
Dynamic
Creates a new instance of IModelTextureDynamic that can be updated at runtime.
The dynamic model texture can be used to update dependent GPU texture resources from a TexelBuffer object that is maintained and updated by the CPU. Creation of a dynamic model texture instance for a specific graphics context will fail if the given combination of format in, width in, height in and slices opt is not supported. The application may use ITextureFactory.ValidateTextureFormat, ITextureFactory.ValidateTextureSize and ITextureFactory.MaximumCount to check for support up-front.
- See also
For
5 overloads
Creates a new instance of IModelTexture that has a uniform color.
This method will return one of the following constants, if color in matches:
Otherwise, a new IModelTexture object will be created.
Creates a new instance of IModelTexture that refers to the given texture file.
Creates a new instance of IModelTexture that refers to the given image descriptor.
Creates a new instance of IModelTexture that uses a copy of the given texture data.
Creates a new instance of IModelTexture that uses the given pixel data.
RenderTarget
Creates a new instance of IModelTexture for the IRenderTarget.Texture resource of a IRenderTarget object in the graphics resource cache.
The dynamic model texture is updated by the GPU, based on the render commands that the CPU needs to submit.
- See also
Protected / Methods
ReadTexels
Reads the pixel data into a texel buffer.
- IOException
-
If an I/O error has occurred while reading the pixel data.