ITextureFactory
Description
- Extended by
-
TextureFactory abstract
Base interface for classes that create texture resources for rendering.
The following figures gives an overview of the classes that are related to the ITextureFactory interface.
+-----------------+ | ITextureFactory | +-----------------+ | | V +----------------+ (1) <---- | TextureFormat | The binary texel format. | +----------------+ | | | | (3) | V V +----------------+ (5) +-------------+ (2) <---- | TexelBuffer | <----- | ColorBuffer | | +----------------+ +-------------+ | | Pixel buffer, filled | | (4) by application | V | +----------------+ °-------> | ITexture2D | Texture for GPU-based rendering +----------------+
(1)
: CreateTexture2D
(2)
: CreateTexture2DStatic
(3)
: TextureFormat.CreateBuffer
(4)
: ITexture2D.SetTexels
(5)
: TexelBuffer.PixelEncode
- See also
Public / Methods
CreateTexture2D
Creates an ITexture2D object with ResourceAccessPattern.Dynamic access.
The given texture size is validated (see ValidateTextureSize) before the texture is created, so the size of the returned ITexture2D object might be different to width in and/or height in.
- RenderException
-
If a graphics subsystem error has occurred.
CreateTexture2DStatic
Creates an ITexture2D object with ResourceAccessPattern.Static access.
The texel buffer size is validated (see ValidateTextureSize) before the texture is created, so the size of the returned ITexture2D object might be different to ITexelBufferInfo.Width and/or ITexelBufferInfo.Height.
The ValidateTextureFormat method will be called to find a supported texture format for the given texture contents (see ITexelBufferInfo.Format), and the texture contents will be transcoded, if necessary.
- RenderException
-
If a graphics subsystem error has occurred.
Public / Attributes
Extensions
CreateTexture2DStatic
3 overloads
Creates an ITexture2D object with ResourceAccessPattern.Static access.
The texel buffer size is validated (see ITextureFactory.ValidateTextureSize) before the texture is created, so the size of the returned ITexture2D object might be different to ITexelBufferInfo.Width and/or ITexelBufferInfo.Height.
The ITextureFactory.ValidateTextureFormat method will be called to find a supported texture format for the given texture contents (see ITexelBufferInfo.Format), and the texture contents will be transcoded, if necessary.
- RenderException
-
If a graphics subsystem error has occurred.
Creates an ITexture2D object with ResourceAccessPattern.Static access.
The ISrgb.Srgb flag of the loaded texel buffer (see IImage.ReadTexture) defines the sRGB behaviour of the created texture (see ITexture.IsSrgb).
- IOException
-
If an I/O error has occurred.
- ValidatingException
-
If the image reader has reported an error, for example because of an unsupported file format feature.
- RenderException
-
If a graphics subsystem error has occurred.
Creates an ITexture2D object with ResourceAccessPattern.Static access.
The created texture has the TextureFormat.A8R8G8B8 format.
- RenderException
-
If a graphics subsystem error has occurred.
ValidateTextureSize
2 overloads
Validates the given texture size by adjusting the width and height according to the texture size restrictions of this factory (e.g. must-be-square).
Validates the given texture size by adjusting the width and height according to the texture size restrictions of this factory (e.g. must-be-square).