Table of Contents

Class Texture3D

Namespace
SharpDX.Toolkit.Graphics
Assembly
HelixToolkit.SharpDX.dll

A Texture 3D front end to SharpDX.Direct3D11.Texture3D.

public class Texture3D : Texture3DBase, IComponent, INotifyPropertyChanged, IDisposable, IComparable<Texture>
Inheritance
Texture3D
Implements
Inherited Members

Methods

Clone()

Makes a copy of this texture.

public override Texture Clone()

Returns

Texture

A copy of this texture.

Remarks

This method doesn't copy the content of the texture.

Load(Device, Stream, TextureFlags, ResourceUsage)

Loads a 3D texture from a stream.

public static Texture3D Load(Device device, Stream stream, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Immutable)

Parameters

device Device

The SharpDX.Direct3D11.Device.

stream Stream

The stream to load the texture from.

flags TextureFlags

Sets the texture flags (for unordered access...etc.)

usage ResourceUsage

Usage of the resource. Default is SharpDX.Direct3D11.ResourceUsage.Immutable

Returns

Texture3D

A texture

Exceptions

ArgumentException

If the texture is not of type 3D

Load(Device, string, TextureFlags, ResourceUsage)

Loads a 3D texture from a stream.

public static Texture3D Load(Device device, string filePath, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Immutable)

Parameters

device Device

The SharpDX.Direct3D11.Device.

filePath string

The file to load the texture from.

flags TextureFlags

Sets the texture flags (for unordered access...etc.)

usage ResourceUsage

Usage of the resource. Default is SharpDX.Direct3D11.ResourceUsage.Immutable

Returns

Texture3D

A texture

Exceptions

ArgumentException

If the texture is not of type 3D

New(Device, Texture3D)

Creates a new texture from a SharpDX.Direct3D11.Texture3D.

public static Texture3D New(Device device, Texture3D texture)

Parameters

device Device

The SharpDX.Direct3D11.Device.

texture Texture3D

The native texture SharpDX.Direct3D11.Texture3D.

Returns

Texture3D

A new instance of Texture3D class.

New(Device, Texture3DDescription)

Creates a new texture from a SharpDX.Direct3D11.Texture3DDescription.

public static Texture3D New(Device device, Texture3DDescription description)

Parameters

device Device

The SharpDX.Direct3D11.Device.

description Texture3DDescription

The description.

Returns

Texture3D

A new instance of Texture3D class.

New(Device, Image, TextureFlags, ResourceUsage)

Creates a new Texture3D directly from an Image.

public static Texture3D New(Device device, Image image, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Immutable)

Parameters

device Device

The SharpDX.Direct3D11.Device.

image Image

An image in CPU memory.

flags TextureFlags

Sets the texture flags (for unordered access...etc.)

usage ResourceUsage

The usage.

Returns

Texture3D

A new instance of Texture3D class.

New(Device, int, int, int, MipMapCount, PixelFormat, DataBox[], TextureFlags, ResourceUsage)

Creates a new Texture3D.

public static Texture3D New(Device device, int width, int height, int depth, MipMapCount mipCount, PixelFormat format, DataBox[] textureData, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Default)

Parameters

device Device

The SharpDX.Direct3D11.Device.

width int

The width.

height int

The height.

depth int

The depth.

mipCount MipMapCount

Number of mipmaps, set to true to have all mipmaps, set to an int >=1 for a particular mipmap count.

format PixelFormat

Describes the format to use.

textureData DataBox[]

DataBox used to fill texture data.

flags TextureFlags

Sets the texture flags (for unordered access...etc.)

usage ResourceUsage

The usage.

Returns

Texture3D

A new instance of Texture3D class.

New(Device, int, int, int, MipMapCount, PixelFormat, TextureFlags, ResourceUsage)

Creates a new Texture3D.

public static Texture3D New(Device device, int width, int height, int depth, MipMapCount mipCount, PixelFormat format, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Default)

Parameters

device Device

The SharpDX.Direct3D11.Device.

width int

The width.

height int

The height.

depth int

The depth.

mipCount MipMapCount

Number of mipmaps, set to true to have all mipmaps, set to an int >=1 for a particular mipmap count.

format PixelFormat

Describes the format to use.

flags TextureFlags

Sets the texture flags (for unordered access...etc.)

usage ResourceUsage

The usage.

Returns

Texture3D

A new instance of Texture3D class.

New(Device, int, int, int, PixelFormat, TextureFlags, ResourceUsage)

Creates a new Texture3D with a single mipmap.

public static Texture3D New(Device device, int width, int height, int depth, PixelFormat format, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Default)

Parameters

device Device

The SharpDX.Direct3D11.Device.

width int

The width.

height int

The height.

depth int

The depth.

format PixelFormat

Describes the format to use.

flags TextureFlags

Sets the texture flags (for unordered access...etc.)

usage ResourceUsage

The usage.

Returns

Texture3D

A new instance of Texture3D class.

New<T>(Device, int, int, int, PixelFormat, T[], TextureFlags, ResourceUsage)

Creates a new Texture3D with texture data for the firs map.

public static Texture3D New<T>(Device device, int width, int height, int depth, PixelFormat format, T[] textureData, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Immutable) where T : unmanaged

Parameters

device Device

The SharpDX.Direct3D11.Device.

width int

The width.

height int

The height.

depth int

The depth.

format PixelFormat

Describes the format to use.

textureData T[]

The texture data, width * height * depth data

flags TextureFlags

Sets the texture flags (for unordered access...etc.)

usage ResourceUsage

The usage.

Returns

Texture3D

A new instance of Texture3D class.

Type Parameters

T

Type of the data to upload to the texture

Remarks

The first dimension of mipMapTextures describes the number of is an array ot Texture3D Array