23 #if SILICONSTUDIO_PARADOX_GRAPHICS_API_DIRECT3D
27 using SharpDX.Direct3D11;
30 namespace SiliconStudio.
Paradox.Graphics
37 internal TextureCube(GraphicsDevice device, TextureDescription description2D, params DataBox[] dataBoxes) : base(device, description2D, dataBoxes)
41 internal TextureCube(GraphicsDevice device, TextureDescription description2D) : base(device, description2D, null)
46 : base(device, texture, viewType, arraySlice, mipMapSlice, viewFormat)
50 public override Texture ToTexture(
ViewType viewType,
int arraySlice,
int mipMapSlice)
52 return new TextureCube(GraphicsDevice,
this, viewType, arraySlice, mipMapSlice);
55 internal override RenderTargetView GetRenderTargetView(
ViewType viewType,
int arrayOrDepthSlice,
int mipIndex)
57 if ((this.NativeDescription.BindFlags & BindFlags.RenderTarget) == 0)
61 throw new NotSupportedException(
"ViewSlice.MipBand is not supported for render targets");
65 GetViewSliceBounds(viewType, ref arrayOrDepthSlice, ref mipIndex, out arrayCount, out mipCount);
68 var rtvDescription =
new RenderTargetViewDescription
70 Format = this.NativeDescription.Format,
71 Dimension = RenderTargetViewDimension.Texture2DArray,
74 ArraySize = arrayCount,
75 FirstArraySlice = arrayOrDepthSlice,
80 return new RenderTargetView(GraphicsDevice.NativeDevice, NativeResource, rtvDescription);
ViewType
Defines how a view is selected from a resource.
Same as Deferred mode, except sprites are sorted by texture prior to drawing. This can improve perfor...
PixelFormat
Defines various types of pixel formats.
The texture dimension is a CubeMap.