TextureCube Class
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Represents a set of six 2D textures, one for each face of a cube.
Inheritance Hierarchy
System.Object
Microsoft.Xna.Framework.Graphics.GraphicsResource
Microsoft.Xna.Framework.Graphics.Texture
Microsoft.Xna.Framework.Graphics.TextureCube
Microsoft.Xna.Framework.Graphics.RenderTargetCube
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in Microsoft.Xna.Framework.Graphics.dll)
Syntax
'Declaration
Public Class TextureCube _
Inherits Texture
public class TextureCube : Texture
The TextureCube type exposes the following members.
Properties
Name | Description | |
---|---|---|
Format | Gets the format of the texture data. (Inherited from Texture.) | |
IsDisposed | Gets a value that indicates whether the object is disposed. (Inherited from GraphicsResource.) | |
LevelCount | Gets the number of texture levels in a multilevel texture. (Inherited from Texture.) | |
Size | Gets the width and height of this texture resource, in pixels. |
Top
Methods
Name | Description | |
---|---|---|
Dispose() | Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.) | |
Dispose(Boolean) | Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.) | |
Finalize | Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. (Inherited from GraphicsResource.) | |
SetData<T>(CubeMapFace, array<T[]) | Sets cube texture data, specifying a cubemap face. | |
SetData<T>(CubeMapFace, array<T[], Int32, Int32) | Sets cube texture data, specifying a cubemap face, start index, and number of elements. | |
SetData<T>(CubeMapFace, Int32, Nullable<Rectangle>, array<T[], Int32, Int32) | Sets cube texture data, specifying a cubemap face, mipmap level, source rectangle, start index, and number of elements. |
Top
Remarks
A texel represents the smallest unit of a texture that can be read from or written to by the GPU. A texel is composed of 1 to 4 components. Specifically, a texel may be any one of the available texture formats represented in the SurfaceFormat enumeration.
A cube texture is a collection of six textures, one for each face of the cube. All faces must be present in the cube texture. Also, a cube map surface must be the same pixel size in all three dimensions (x, y, and z).
Version Information
Silverlight
Supported in: 5
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.