Exemplo n.º 1
0
void StagingStructuredBuffer::copyRangeTo( int srcIndex, int count,
    ID3D11Buffer* pTarget, int dstIndex )
{
    int esb = elementSizeBytes();
    D3D11_BOX srcBox = D3D11Utils_Box::createRange( srcIndex * esb, count * esb );

    m_pContext->CopySubresourceRegion
    (
        pTarget, 0,
        dstIndex * esb, 0, 0,
        m_pBuffer, 0,
        &srcBox
    );
}
Exemplo n.º 2
0
int DynamicDataBuffer::sizeInBytes() const
{
	return numElements() * elementSizeBytes();
}