Struct MappedResource
The resource that has been mapped.
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public struct MappedResource
Constructors
MappedResource(GraphicsResource, MapMode, nint, uint)
Initializes a new instance of the MappedResource struct.
Declaration
public MappedResource(GraphicsResource resource, MapMode mode, nint data, uint sizeInBytes)
Parameters
Type | Name | Description |
---|---|---|
GraphicsResource | resource | The resource that has been mapped. |
MapMode | mode | The map mode used to map the resource. |
nint | data | A pointer to the start of the mapped data region. |
uint | sizeInBytes | The total size, in bytes, of the mapped data region. |
MappedResource(GraphicsResource, MapMode, nint, uint, uint, uint, uint)
Initializes a new instance of the MappedResource struct.
Declaration
public MappedResource(GraphicsResource resource, MapMode mode, nint data, uint sizeInBytes, uint subResourceIndex, uint rowPitch, uint slicePitch)
Parameters
Type | Name | Description |
---|---|---|
GraphicsResource | resource | The resource that has been mapped. |
MapMode | mode | The map mode used to map the resource. |
nint | data | A pointer to the start of the mapped data region. |
uint | sizeInBytes | The total size, in bytes, of the mapped data region. |
uint | subResourceIndex | The index of the subresource. |
uint | rowPitch | The number of bytes per row. |
uint | slicePitch | The number of bytes per slice. |
Fields
Data
A pointer to the start of the mapped data region.
Declaration
public readonly nint Data
Field Value
Type | Description |
---|---|
nint |
Mode
Identifies the MapMode that was used to map the resource.
Declaration
public readonly MapMode Mode
Field Value
Type | Description |
---|---|
MapMode |
Resource
The resource that has been mapped.
Declaration
public readonly GraphicsResource Resource
Field Value
Type | Description |
---|---|
GraphicsResource |
RowPitch
For Texture resources, this is the number of bytes between each row of texels. For Buffer resources, this field has no meaning.
Declaration
public readonly uint RowPitch
Field Value
Type | Description |
---|---|
uint |
SizeInBytes
The total size in bytes of the mapped data region.
Declaration
public readonly uint SizeInBytes
Field Value
Type | Description |
---|---|
uint |
SlicePitch
For Texture resources, this represents the number of bytes between each slice of a 3D texture. For Buffer resources, this field has no meaning.
Declaration
public readonly uint SlicePitch
Field Value
Type | Description |
---|---|
uint |
SubresourceIndex
Declaration
public readonly uint SubresourceIndex
Field Value
Type | Description |
---|---|
uint |