A texture is an image used in rendering. Can be a static texture loaded from disk, or a dynamic texture rendered to by code. Can also be 2D, 3D (multiple slices), or a cube texture (6 slices).
A texture is an image used in rendering. Can be a static texture loaded from disk, or a dynamic texture rendered to by code. Can also be 2D, 3D (multiple slices), or a cube texture (6 slices).
Member Name | Summary |
---|---|
CreateCustom | Begins creation of a custom texture. Finish by calling TextureBuilder.Create. |
Create | Creates a 2D texture with specified width, height, and format. |
CreateVolume | Creates a 3D texture with specified width, height, depth, and format. |
CreateCube | Creates a cube texture with specified width, height, and format. |
CreateArray | Creates a texture array with specified width, height, count, and format. |
CreateRenderTarget | Begins creation of a render target. Finish by calling TextureBuilder.Create. Render targets can be used for advanced rendering techniques. |
CreateFromSvgSource | Creates a texture from SVG source with optional width, height, and color. |
Load | Loads a texture from a file system or URL, with an option to warn on missing files. |
LoadAvatar | Loads a Steam avatar texture by Steam ID. |
LoadAsync | Asynchronously loads a texture from a file system. |
Find | Finds a texture by file path. |
Invalid | 1x1 solid magenta colored texture. |
White | 1x1 solid white opaque texture. |
Transparent | 1x1 fully transparent texture. |
Member Name | Summary |
---|---|
Dispose | Releases the handle for this texture. If not referenced elsewhere, it will be released properly. |
GetSequenceFrameCount | Gets the frame count for a sequence by ID. |
MarkUsed | Marks the texture as used with a required mip size. |
CreateGenerator | Creates and returns a generator for a generated texture. |
GetPixels | Gets the pixel data for a specified mip level. |
GetBitmap | Gets a bitmap representation of the texture for a specified mip level. |
GetPixels3D | Gets the 3D pixel data for a specified mip level. |
GetPixel | Gets the color of a specific pixel at given coordinates and mip level. |
GetPixel3D | Gets the color of a specific 3D pixel at given coordinates and mip level. |
Update | Updates the texture with new data at specified coordinates and dimensions. |
Update3D | Updates a 3D texture with new data at specified coordinates and dimensions. |
Property Name | Summary |
---|---|
IsError | Indicates whether this texture is an error or invalid. |
Index | Texture index. Needs a higher level abstraction. |
Width | Width of the texture in pixels. |
Height | Height of the texture in pixels. |
Depth | Depth of a 3D texture in pixels, or slice count for 2D texture arrays, or 6 for slices of cubemap. |
Mips | Number of mip maps this texture has. |
Size | Returns a Vector2 representing the size of the texture (width, height). |
IsLoaded | Indicates whether this texture has finished loading. |
ImageFormat | Image format of this texture. |
LastUsed | Returns how many frames ago this texture was last used by the renderer. |
SequenceData | If this texture is a sprite sheet, returns information about the sheet. |
SequenceCount | The count of sequences in this texture, if any. |
HasAnimatedSequences | Indicates if the texture has animated sequences. |
GenerationData | Data used by the generator to create the texture. |