29 #include "DeviceObject.h" 35 static constexpr INTERFACE_ID IID_Texture =
36 { 0xa64b0e60, 0x1b5e, 0x4cfd, { 0xb8, 0x80, 0x66, 0x3a, 0x1a, 0xdc, 0xbe, 0x98 } };
268 struct MappedTextureSubresource
270 PVoid pData =
nullptr;
272 Uint32 DepthStride = 0;
280 virtual void QueryInterface(
const Diligent::INTERFACE_ID &IID, IObject **ppInterface ) = 0;
351 virtual void Map(
IDeviceContext *pContext, Uint32 Subresource,
MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData ) = 0;
TEXTURE_FORMAT
Texture formats.
Definition: GraphicsTypes.h:244
virtual void UpdateData(class IDeviceContext *pContext, Uint32 MipLevel, Uint32 Slice, const Box &DstBox, const TextureSubResData &SubresData)=0
Updates the data in the texture.
Texture description.
Definition: Texture.h:82
TEXTURE_VIEW_TYPE
Texture view type.
Definition: GraphicsTypes.h:190
Base interface for all objects created by the render device Diligent::IRenderDevice.
Definition: DeviceObject.h:40
Uint32 MiscFlags
Miscellaneous flags, see Diligent::MISC_TEXTURE_FLAG for details.
Definition: Texture.h:128
Unknown format.
Definition: GraphicsTypes.h:247
virtual const TextureDesc & GetDesc() const =0
Returns the texture description used to create the object.
Uint32 Depth
For a 3D texture, number of depth slices.
Definition: Texture.h:98
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
TextureSubResData(void *_pData, Uint32 _Stride, Uint32 _DepthStride=0)
Initializes the structure members to perform copy from the CPU memory.
Definition: Texture.h:226
virtual void CopyData(IDeviceContext *pContext, ITexture *pSrcTexture, Uint32 SrcMipLevel, Uint32 SrcSlice, const Box *pSrcBox, Uint32 DstMipLevel, Uint32 DstSlice, Uint32 DstX, Uint32 DstY, Uint32 DstZ)=0
Copies data from another texture.
class IBuffer * pSrcBuffer
Pointer to the GPU buffer that contains subresource data. If provided, pData must be null...
Definition: Texture.h:201
Describes data for one subresource.
Definition: Texture.h:193
TEXTURE_FORMAT Format
Texture format, see Diligent::TEXTURE_FORMAT.
Definition: Texture.h:102
Uint32 DepthStride
For 3D textures, depth slice stride in bytes.
Definition: Texture.h:208
virtual void Unmap(IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags)=0
Unmap the textute - not implemented yet.
TextureDesc()
Initializes the structure members with default values.
Definition: Texture.h:149
bool operator==(const TextureDesc &RHS) const
Tests if two structures are equivalent.
Definition: Texture.h:172
TEXTURE_FORMAT Format
Format.
Definition: Texture.h:55
Uint32 MipLevels
Number of Mip levels in the texture. Multisampled textures can only have 1 Mip level. Specify 0 to generate full mipmap chain.
Definition: Texture.h:106
Uint32 Width
Texture width, in pixels.
Definition: Texture.h:88
Float32 Depth
Depth clear value.
Definition: Texture.h:42
Uint32 SampleCount
Number of samples. Only 2D textures or 2D texture arrays can be multisampled.
Definition: Texture.h:110
Describes the initial data to store in the texture.
Definition: Texture.h:243
TextureSubResData()
Initializes the structure members with default values.
Definition: Texture.h:218
Buffer interface.
Definition: Buffer.h:200
virtual void Map(IDeviceContext *pContext, Uint32 Subresource, MAP_TYPE MapType, Uint32 MapFlags, MappedTextureSubresource &MappedData)=0
Map the texture - not implemented yet.
Device context interface.
Definition: DeviceContext.h:443
Uint32 CPUAccessFlags
CPU access flags or 0 if no CPU access is allowed, see Diligent::CPU_ACCESS_FLAG for details...
Definition: Texture.h:124
virtual void * GetNativeHandle()=0
Returns native texture handle specific to the underlying graphics API.
Box.
Definition: GraphicsTypes.h:1005
virtual ITextureView * GetDefaultView(TEXTURE_VIEW_TYPE ViewType)=0
Returns the pointer to the default view.
A resource that requires read and write access by the GPU and can also be occasionally written by the...
Definition: GraphicsTypes.h:95
Texture view interface.
Definition: TextureView.h:163
virtual void QueryInterface(const Diligent::INTERFACE_ID &IID, IObject **ppInterface)=0
Queries the specific interface, see IObject::QueryInterface() for details.
USAGE Usage
Texture usage. See Diligent::USAGE for details.
Definition: Texture.h:113
Texture view description.
Definition: TextureView.h:55
Uint8 Stencil
Stencil clear value.
Definition: Texture.h:44
virtual void CreateView(const struct TextureViewDesc &ViewDesc, class ITextureView **ppView)=0
Creates a new texture view.
Uint32 ArraySize
For a 1D array or 2D array, number of array slices.
Definition: Texture.h:95
USAGE
Resource usage.
Definition: GraphicsTypes.h:84
Defines optimized depth-stencil clear value.
Definition: Texture.h:39
Defines optimized clear value.
Definition: Texture.h:52
RESOURCE_DIMENSION
Describes resource dimension.
Definition: GraphicsTypes.h:172
Float32 Color[4]
Render target clear value.
Definition: Texture.h:57
OptimizedClearValue ClearValue
Optimized clear value.
Definition: Texture.h:131
RESOURCE_DIMENSION Type
Texture type. See Diligent::RESOURCE_DIMENSION for details.
Definition: Texture.h:85
Uint32 NumSubresources
Number of elements in pSubResources array. NumSubresources must exactly match the number of subresour...
Definition: Texture.h:253
TextureSubResData(IBuffer *_pBuffer, Uint32 _Stride, Uint32 _DepthStride=0)
Initializes the structure members to perform copy from the GPU buffer.
Definition: Texture.h:234
Describes common device object attributes.
Definition: GraphicsTypes.h:900
const void * pData
Pointer to the subresource data in CPU memory. If provided, pSrcBuffer must be null.
Definition: Texture.h:197
Uint32 Height
Texture height, in pixels.
Definition: Texture.h:91
Texture type undefined.
Definition: GraphicsTypes.h:174
TextureData()
Initializes the structure members with default values.
Definition: Texture.h:262
MAP_TYPE
Resource mapping type.
Definition: GraphicsTypes.h:125
Uint32 BindFlags
Bind flags, see Diligent::BIND_FLAGS for details. The following bind flags are allowed: Diligent::BI...
Definition: Texture.h:120
Texture inteface.
Definition: Texture.h:276
TextureSubResData * pSubResources
Pointer to the array of the TextureSubResData elements containing information about each subresource...
Definition: Texture.h:247
DepthStencilClearValue DepthStencil
Depth stencil clear value.
Definition: Texture.h:59
Uint32 Stride
For 2D and 3D textures, row stride in bytes.
Definition: Texture.h:204