D3D10_MAPPED_TEXTURE3D structure (d3d10.h)
Provides access to subresource data in a 3D texture.
Syntax
typedef struct D3D10_MAPPED_TEXTURE3D {
void *pData;
UINT RowPitch;
UINT DepthPitch;
} D3D10_MAPPED_TEXTURE3D;
Members
pData
Type: void*
Pointer to the data.
RowPitch
Type: UINT
The pitch, or width, or physical size (in bytes) of one row of an uncompressed texture. Since a block-compressed texture is encoded in 4x4 blocks, the RowPitch for a compressed texture is the number of bytes in a block of 4x4 texels. See virtual size vs physical size for more information on block compression.
DepthPitch
Type: UINT
The pitch or number of bytes in all rows for a single depth.
Remarks
This structure is used to access subresource data when calling ID3D10Texture3D::Map. To access data, you must cast the pData pointer; see D3D10_MAPPED_TEXTURE2D for an example.
To illustrate pitch for an uncompressed texture, assume a 3D texture with mipmap levels, as shown in the following illustration.
It is easiest to consider the top-level texture only, as shown in the following illustration.
And then visualize the top-level texture redrawn as a series of 2D textures, each one having a different depth value. This yields several texture planes, as shown in the following illustration.
However, the actual layout of all the elements from all the texture planes looks more like the following illustration.
Use row pitch to advance a pointer between rows within a single 2D texture plane; use depth pitch to advance a pointer between 2D texture planes.
Requirements
Requirement | Value |
---|---|
Header | d3d10.h |