From 4e4a268a31619bd782beefc63b20923430fdb617 Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 11 Oct 2021 15:36:48 -0700 Subject: [PATCH] Tutorial 11: fixed issue with dynamic texture update --- .../src/Tutorial11_ResourceUpdates.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tutorials/Tutorial11_ResourceUpdates/src/Tutorial11_ResourceUpdates.cpp b/Tutorials/Tutorial11_ResourceUpdates/src/Tutorial11_ResourceUpdates.cpp index fb931aa2..dbec7259 100644 --- a/Tutorials/Tutorial11_ResourceUpdates/src/Tutorial11_ResourceUpdates.cpp +++ b/Tutorials/Tutorial11_ResourceUpdates/src/Tutorial11_ResourceUpdates.cpp @@ -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); }