Table of Contents

Class Texture2D

Namespace
Bonsai.Shaders.Configuration
Assembly
Bonsai.Shaders.dll

Provides configuration and loading functionality for two-dimensional texture resources.

public class Texture2D : TextureConfiguration, IResourceConfiguration
Inheritance
Texture2D
Implements
Derived
Inherited Members

Properties

Height

Gets or sets the height of the texture. If no value is specified, the texture buffer will not be initialized.

public int? Height { get; set; }

Property Value

int?

InternalFormat

Gets or sets a value specifying the internal pixel format of the texture.

public PixelInternalFormat InternalFormat { get; set; }

Property Value

PixelInternalFormat

MagFilter

Gets or sets a value specifying the texture magnification filter.

public TextureMagFilter MagFilter { get; set; }

Property Value

TextureMagFilter

MinFilter

Gets or sets a value specifying the texture minification filter.

public TextureMinFilter MinFilter { get; set; }

Property Value

TextureMinFilter

Width

Gets or sets the width of the texture. If no value is specified, the texture buffer will not be initialized.

public int? Width { get; set; }

Property Value

int?

WrapS

Gets or sets a value specifying wrapping parameters for the column coordinates of the texture sampler.

public TextureWrapMode WrapS { get; set; }

Property Value

TextureWrapMode

WrapT

Gets or sets a value specifying wrapping parameters for the row coordinates of the texture sampler.

public TextureWrapMode WrapT { get; set; }

Property Value

TextureWrapMode

Methods

CreateResource(ResourceManager)

Creates a new empty two-dimensional texture resource, typically used for uploading dynamic texture data.

public override Texture CreateResource(ResourceManager resourceManager)

Parameters

resourceManager ResourceManager

The ResourceManager object onto which this resource will be loaded. The resource manager can be accessed to load additional resource dependencies which may be required to create the new resource.

Returns

Texture

A new instance of the Texture class representing the 2D texture.