Skip to content

Commit

Permalink
Code Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Apr 30, 2016
1 parent 229ee11 commit 91cfbbf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Src/PrimitiveBatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ static bool CanBatchPrimitives(D3D11_PRIMITIVE_TOPOLOGY topology)

#if !defined(_XBOX_ONE) || !defined(_TITLE)
// Helper for locking a vertex or index buffer.
static void LockBuffer(_In_ ID3D11DeviceContext* deviceContext, _In_ ID3D11Buffer* buffer, size_t currentPosition, _Out_ size_t* basePosition, _Out_ D3D11_MAPPED_SUBRESOURCE* mappedResource)
_Use_decl_annotations_
static void LockBuffer(ID3D11DeviceContext* deviceContext, ID3D11Buffer* buffer, size_t currentPosition, size_t* basePosition, D3D11_MAPPED_SUBRESOURCE* mappedResource)
{
D3D11_MAP mapType = (currentPosition == 0) ? D3D11_MAP_WRITE_DISCARD : D3D11_MAP_WRITE_NO_OVERWRITE;

Expand All @@ -235,7 +236,8 @@ static void LockBuffer(_In_ ID3D11DeviceContext* deviceContext, _In_ ID3D11Buffe


// Adds new geometry to the batch.
void PrimitiveBatchBase::Impl::Draw(D3D11_PRIMITIVE_TOPOLOGY topology, bool isIndexed, _In_opt_count_(indexCount) uint16_t const* indices, size_t indexCount, size_t vertexCount, _Out_ void** pMappedVertices)
_Use_decl_annotations_
void PrimitiveBatchBase::Impl::Draw(D3D11_PRIMITIVE_TOPOLOGY topology, bool isIndexed, uint16_t const* indices, size_t indexCount, size_t vertexCount, void** pMappedVertices)
{
if (isIndexed && !indices)
throw std::exception("Indices cannot be null");
Expand Down

0 comments on commit 91cfbbf

Please sign in to comment.