TextureCube Constructor
Creates a new instance of this object.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
public TextureCube ( GraphicsDevice graphicsDevice, int size, bool mipMap, SurfaceFormat format )
Parameters
- graphicsDevice
- Type: GraphicsDevice
The device. - size
- Type: Int32
The size (in pixels) of the top-level faces of the cube texture. Subsequent levels of each face will be the truncated value of half of the previous level's pixel dimension (independently). Each dimension is clamped to a minimum of 1 pixel. - mipMap
- Type: Boolean
[MarshalAsAttribute(U1)] True to generate a full mipmap chain, false otherwise. - format
- Type: SurfaceFormat
Surface data format.
| Exception type | Condition |
|---|---|
| NotSupportedException |
One or more of the following is true:
|
To initialize the resource from an existing file, use ContentManager.Load.