Class GPUTextureDX12
Texture object for DirectX 12 backend.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/GraphicsDevice/DirectX/DX12/GPUTextureDX12.h
Syntax
public class GPUTextureDX12 : public GPUResourceDX12, public ResourceOwnerDX12, public IShaderResourceDX12
Constructors
GPUTextureDX12(GPUDeviceDX12* device, const StringView& name)
Declaration
public GPUTextureDX12(GPUDeviceDX12* device, const StringView& name)
Parameters
GPUDeviceDX12
device
|
StringView
name
|
Methods
AsGPUResource()
Gets resource owner object as a GPUResource type or returns null if cannot perform cast.
Declaration
public virtual GPUResource* AsGPUResource() const override
Returns
GPUResource
|
Overrides
GetData(int32 arrayIndex, int32 mipMapIndex, TextureMipData& data, uint32 mipRowPitch)
Gets texture mipmap data (raw bytes). Can be used only with textures created with Staging flag.
Declaration
public virtual bool GetData(int32 arrayIndex, int32 mipMapIndex, TextureMipData& data, uint32 mipRowPitch) override
Parameters
int32
arrayIndex
Array slice index. |
int32
mipMapIndex
Mip map index. |
TextureMipData
data
Output mip data. |
uint32
mipRowPitch
Output mip data row pitch to use. Use 0 to use the pitch from the internal GPU storage. |
Returns
bool
True if failed, otherwise false. |
Overrides
GetNativePtr()
Gets the native pointer to the underlying resource. It's a low-level platform-specific handle.
Declaration
public virtual void* GetNativePtr() const override
Returns
void
The pointer. |
Overrides
GetResourceOwner()
Gets the resource owner.
Declaration
public virtual ResourceOwnerDX12* GetResourceOwner() const override
Returns
ResourceOwnerDX12
|
Overrides
IsDepthStencilResource()
Determines whether this resource is depth/stencil buffer.
Declaration
public virtual bool IsDepthStencilResource() const override
Returns
bool
|
Overrides
OnInit()
OnReleaseGPU()
Releases GPU resource data (implementation).
Declaration
protected virtual void OnReleaseGPU() override
Overrides
OnResidentMipsChanged()
Declaration
protected virtual void OnResidentMipsChanged() override
Overrides
SRV()
Gets CPU handle to the shader resource view descriptor.
Declaration
public virtual D3D12_CPU_DESCRIPTOR_HANDLE SRV() const override
Returns
D3D12_CPU_DESCRIPTOR_HANDLE
|
Overrides
UAV()
Gets CPU handle to the unordered access view descriptor.
Declaration
public virtual D3D12_CPU_DESCRIPTOR_HANDLE UAV() const override
Returns
D3D12_CPU_DESCRIPTOR_HANDLE
|
Overrides
View(int32 arrayOrDepthIndex)
Gets the view to the surface at index in an array.
To use per depth/array slice view you need to specify the GPUTextureFlags.PerSliceViews when creating the resource.
Declaration
public virtual GPUTextureView* View(int32 arrayOrDepthIndex) const override
Parameters
int32
arrayOrDepthIndex
The index of the surface in an array (or depth slice index). |
Returns
GPUTextureView
The view to the surface at index in an array. |
Overrides
View(int32 arrayOrDepthIndex, int32 mipMapIndex)
Gets the view to the mip map surface at index in an array.
To use per mip map view you need to specify the GPUTextureFlags.PerMipViews when creating the resource.
Declaration
public virtual GPUTextureView* View(int32 arrayOrDepthIndex, int32 mipMapIndex) const override
Parameters
int32
arrayOrDepthIndex
The index of the surface in an array (or depth slice index). |
int32
mipMapIndex
Index of the mip level. |
Returns
GPUTextureView
The view to the surface at index in an array. |
Overrides
ViewArray()
Gets the view to the array of surfaces
To use array texture view you need to create render target as an array.
Declaration
public virtual GPUTextureView* ViewArray() const override
Returns
GPUTextureView
The view to the array of surfaces. |
Overrides
ViewReadOnlyDepth()
Gets the view to the texture as read-only depth/stencil buffer. Valid only if graphics device supports it and the texture uses depth/stencil.
Declaration
public virtual GPUTextureView* ViewReadOnlyDepth() const override
Returns
GPUTextureView
The view to the depth-stencil resource descriptor as read-only depth. |
Overrides
ViewVolume()
Gets the view to the volume texture (3D).
To use volume texture view you need to create render target as a volume resource (3D texture with Depth> 1).
Declaration
public virtual GPUTextureView* ViewVolume() const override
Returns
GPUTextureView
The view to the volume texture. |