コード例 #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
    );
}
コード例 #2
0
ファイル: DynamicDataBuffer.cpp プロジェクト: zxwglzi/libcgt
int DynamicDataBuffer::sizeInBytes() const
{
	return numElements() * elementSizeBytes();
}