3 #if SILICONSTUDIO_PARADOX_GRAPHICS_API_DIRECT3D
24 using SharpDX.Direct3D11;
25 using SiliconStudio.Core;
27 namespace SiliconStudio.
Paradox.Graphics
29 public abstract partial class Texture
33 return new RenderTarget(GraphicsDevice,
this, viewType, arraySlize, mipSlice);
52 internal abstract RenderTargetView GetRenderTargetView(
ViewType viewType,
int arrayOrDepthSlice,
int mipMapSlice);
60 internal abstract UnorderedAccessView GetUnorderedAccessView(
int arrayOrDepthSlice,
int mipMapSlice);
62 public virtual void Recreate(DataBox[] dataBoxes = null)
64 throw new NotImplementedException();
67 protected override void DestroyImpl()
70 if (ParentTexture != null)
72 _nativeDeviceChild = null;
73 NativeResource = null;
79 internal static SharpDX.Direct3D11.BindFlags GetBindFlagsFromTextureFlags(
TextureFlags flags)
81 var result = BindFlags.None;
83 result |= BindFlags.ShaderResource;
85 result |= BindFlags.RenderTarget;
87 result |= BindFlags.UnorderedAccess;
89 result |= BindFlags.DepthStencil;
94 internal unsafe
static SharpDX.DataBox[] ConvertDataBoxes(DataBox[] dataBoxes)
96 if (dataBoxes == null)
99 var sharpDXDataBoxes =
new SharpDX.DataBox[dataBoxes.Length];
100 fixed (
void* pDataBoxes = sharpDXDataBoxes)
101 Utilities.Write((IntPtr)pDataBoxes, dataBoxes, 0, dataBoxes.Length);
103 return sharpDXDataBoxes;
106 private
bool IsFlippedTexture()
_In_ size_t _In_ DXGI_FORMAT _In_ size_t _In_ DXGI_FORMAT _In_ DWORD flags
SiliconStudio.Core.Utilities Utilities
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...
Creates a render target buffer.