Fixed bug where moving objects stopped moving after chanigng their material's shader

This commit is contained in:
Kah Wei 2022-11-19 18:26:11 +08:00
parent 58e6a3c4c2
commit b2dc440d03
2 changed files with 5 additions and 1 deletions

View File

@ -218,9 +218,13 @@ namespace SHADE
for (int i = 0; i < SHGraphicsConstants::NUM_FRAME_BUFFERS; ++i)
{
drawDataBuffer[i].Free();
drawDataBuffer[i] = {};
transformDataBuffer[i].Free();
transformDataBuffer[i] = {};
instancedIntegerBuffer[i].Free();
instancedIntegerBuffer[i] = {};
matPropsBuffer[i].Free();
matPropsBuffer[i] = {};
}
}

View File

@ -129,7 +129,7 @@ namespace SHADE
// Otherwise just copy the data over
else
{
bufferHandle->MapWriteUnmap(src, size, 0, 0);
bufferHandle->WriteToMemory(src, size, 0, 0);
}
}
else