Table of Contents

Class TextureCube

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

A TextureCube front end to SharpDX.Direct3D11.Texture2D.

public class TextureCube : Texture2DBase, IComponent, INotifyPropertyChanged, IDisposable, IComparable<Texture>
Inheritance
TextureCube
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 Cube texture from a stream.

public static TextureCube 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

TextureCube

A texture

Exceptions

ArgumentException

If the texture is not of type Cube

Load(Device, string, TextureFlags, ResourceUsage)

Loads a Cube texture from a stream.

public static TextureCube 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

TextureCube

A texture

Exceptions

ArgumentException

If the texture is not of type Cube

New(Device, Texture2D)

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

public static TextureCube New(Device device, Texture2D texture)

Parameters

device Device

The SharpDX.Direct3D11.Device.

texture Texture2D

The native texture SharpDX.Direct3D11.Texture2D.

Returns

TextureCube

A new instance of TextureCube class.

New(Device, Texture2DDescription)

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

public static TextureCube New(Device device, Texture2DDescription description)

Parameters

device Device

The SharpDX.Direct3D11.Device.

description Texture2DDescription

The description.

Returns

TextureCube

A new instance of TextureCube class.

New(Device, Image, TextureFlags, ResourceUsage)

Creates a new TextureCube directly from an Image.

public static TextureCube 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

TextureCube

A new instance of TextureCube class.

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

Creates a new TextureCube.

public static TextureCube New(Device device, int size, MipMapCount mipCount, PixelFormat format, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Default)

Parameters

device Device

The SharpDX.Direct3D11.Device.

size int

The size (in pixels) of the top-level faces of the cube texture.

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

TextureCube

A new instance of Texture2D class.

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

Creates a new TextureCube from a initial data..

public static TextureCube New(Device device, int size, PixelFormat format, DataBox[] textureData, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Immutable)

Parameters

device Device

The SharpDX.Direct3D11.Device.

size int

The size (in pixels) of the top-level faces of the cube texture.

format PixelFormat

Describes the format to use.

textureData DataBox[]

an array of 6 textures. See remarks

flags TextureFlags

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

usage ResourceUsage

The usage.

Returns

TextureCube

A new instance of TextureCube class.

Remarks

The first dimension of mipMapTextures describes the number of array (TextureCube Array), the second is the texture data for a particular cube face.

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

Creates a new TextureCube.

public static TextureCube New(Device device, int size, PixelFormat format, TextureFlags flags = TextureFlags.ShaderResource, ResourceUsage usage = ResourceUsage.Default)

Parameters

device Device

The SharpDX.Direct3D11.Device.

size int

The size (in pixels) of the top-level faces of the cube texture.

format PixelFormat

Describes the format to use.

flags TextureFlags

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

usage ResourceUsage

The usage.

Returns

TextureCube

A new instance of Texture2D class.

NewTextureCubeDescription(int, PixelFormat, TextureFlags, int, ResourceUsage)

protected static Texture2DDescription NewTextureCubeDescription(int size, PixelFormat format, TextureFlags flags, int mipCount, ResourceUsage usage)

Parameters

size int
format PixelFormat
flags TextureFlags
mipCount int
usage ResourceUsage

Returns

Texture2DDescription

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

Creates a new TextureCube from a initial data..

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

Parameters

device Device

The SharpDX.Direct3D11.Device.

size int

The size (in pixels) of the top-level faces of the cube texture.

format PixelFormat

Describes the format to use.

textureData T[][]

an array of 6 textures. See remarks

flags TextureFlags

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

usage ResourceUsage

The usage.

Returns

TextureCube

A new instance of TextureCube class.

Type Parameters

T

Type of a pixel data

Remarks

The first dimension of mipMapTextures describes the number of array (TextureCube Array), the second is the texture data for a particular cube face.