![]() |
XII Release 0.1.0
|
Provides utility functions that are common with interfacing with the GAL device. More...
#include <DeviceUtilities.h>
Public Types | |
enum class | IndexType { None , UShort , UInt } |
Static Public Member Functions | |
static xiiEnum< xiiGALGraphicsAdapterVendor > | GetVendorFromID (xiiUInt32 uiID) |
This returns the graphics adapter vendor type from the given ID. | |
static xiiSharedPtr< xiiGALBuffer > | CreateVertexBuffer (xiiGALDevice *pDevice, xiiUInt32 uiVertexSize, xiiUInt32 uiVertexCount, xiiArrayPtr< xiiUInt8 > pInitialData=xiiArrayPtr< xiiUInt8 >(), bool bDataIsMutable=false) |
Creates a vertex buffer with the given vertex size and vertex count. | |
static xiiSharedPtr< xiiGALBuffer > | CreateIndexBuffer (xiiGALDevice *pDevice, IndexType indexType, xiiUInt32 uiIndexCount, xiiArrayPtr< xiiUInt8 > pInitialData=xiiArrayPtr< xiiUInt8 >(), bool bDataIsMutable=false) |
Creates an index buffer with the given index type and index count. | |
static xiiSharedPtr< xiiGALBuffer > | CreateConstantBuffer (xiiGALDevice *pDevice, xiiUInt32 uiBufferSize, xiiStringView sDebugName={}) |
Creates a constant buffer with the given size. | |
static xiiSharedPtr< xiiGALBuffer > | CreateStagingBuffer (xiiGALDevice *pDevice, xiiUInt32 uiBufferSize, xiiStringView sDebugName={}) |
Creates a staging buffer with the given size. | |
static xiiGALTextureCreationDescription | CreateRenderTargetDescription (xiiSizeU32 size, xiiGALResourceFormat::Enum format, xiiUInt32 uiSampleCount=xiiGALMSAASampleCount::OneSample) |
Creates a render target description with the given parameters. | |
static xiiResult | MapAndUpdateBuffer (xiiGALCommandList *pCommandList, xiiSharedPtr< xiiGALBuffer > pBuffer, xiiUInt32 uiDestinationOffset, xiiArrayPtr< const xiiUInt8 > pSourceData, xiiBitflags< xiiGALMapFlags > mapFlags=xiiGALMapFlags::Discard) |
Maps a buffer and updates it with the provided source data. | |
Provides utility functions that are common with interfacing with the GAL device.
|
strong |
|
staticnodiscard |
Creates a constant buffer with the given size.
pDevice | - The device associated with the buffer. |
uiBufferSize | - The size of the buffer in bytes. |
sDebugName | - Optional debug name for the buffer. |
|
staticnodiscard |
Creates an index buffer with the given index type and index count.
pDevice | - The device associated with the buffer. |
indexType | - The index buffer type. See xiiGALDeviceUtilities::IndexType for details. |
uiIndexCount | - The number of indices in the buffer. |
pInitialData | - The initial data in bytes, that the buffer should contain after creation. |
bDataIsMutable | - Specifies whether the buffer should be considered immutable in its usage. |
|
staticnodiscard |
Creates a render target description with the given parameters.
size | - The size (width and height) of the render target. |
format | - The render target format. See xiiGALResourceFormat for details. |
uiSampleCount | - The number of samples in the render target. The default is xiiGALMSAASampleCount::OneSample. |
|
staticnodiscard |
Creates a staging buffer with the given size.
pDevice | - The device associated with the buffer. |
uiBufferSize | - The size of the buffer in bytes. |
sDebugName | - Optional debug name for the buffer. |
|
staticnodiscard |
Creates a vertex buffer with the given vertex size and vertex count.
pDevice | - The device associated with the buffer. |
uiVertexSize | - The size of a single vertex in the buffer. |
uiVertexCount | - The number of vertices in the buffer. |
pInitialData | - The initial data in bytes, that the buffer should contain after creation. |
bDataIsMutable | - Specifies whether the buffer should be considered immutable in its usage. |
|
static |
Maps a buffer and updates it with the provided source data.
pCommandList | - Pointer to the command list. |
hBuffer | - Handle to the buffer to be updated. |
uiDestinationOffset | - Offset in the destination buffer where the data should be copied. |
pSourceData | - Array pointer to the source data to be copied. |
mapFlags | - Flags specifying the mapping behavior. Default is xiiGALMapFlags::Discard. |