Skip to content

Commit

Permalink
Tutorial 11: fixed issue with dynamic texture update
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Oct 11, 2021
1 parent 2ce0ba3 commit 4e4a268
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -477,7 +477,7 @@ void Tutorial11_ResourceUpdates::MapTexture(Uint32 TexIndex, bool MapEntireTextu
Uint32 MipLevel = 0;
Uint32 ArraySlice = 0;
m_pImmediateContext->MapTextureSubresource(&Texture, MipLevel, ArraySlice, MAP_WRITE, MAP_FLAG_DISCARD, MapEntireTexture ? nullptr : &MapRegion, MappedSubres);
WriteDiamondPattern((Uint8*)MappedSubres.pData, MapRegion.Width(), MapRegion.Depth(), MappedSubres.Stride);
WriteDiamondPattern((Uint8*)MappedSubres.pData, MapRegion.Width(), MapRegion.Height(), MappedSubres.Stride);
m_pImmediateContext->UnmapTextureSubresource(&Texture, 0, 0);
}

Expand Down

0 comments on commit 4e4a268

Please sign in to comment.