Clear queued texture uploads after processing them. Saves re-uploading the same textures whilst paused

This commit is contained in:
Ian Curtis 2016-11-20 17:02:59 +00:00
parent 10dd530cde
commit 2ddc8a30e0

View file

@ -232,8 +232,12 @@ void CReal3D::BeginFrame(void)
// If multi-threaded, perform now any queued texture uploads to renderer before rendering begins // If multi-threaded, perform now any queued texture uploads to renderer before rendering begins
if (g_Config.gpuMultiThreaded) if (g_Config.gpuMultiThreaded)
{ {
for (vector<QueuedUploadTextures>::iterator it = queuedUploadTexturesRO.begin(), end = queuedUploadTexturesRO.end(); it != end; it++) for (const auto &it : queuedUploadTexturesRO) {
Render3D->UploadTextures(it->x, it->y, it->width, it->height); Render3D->UploadTextures(it.x, it.y, it.width, it.height);
}
// done syncing data
queuedUploadTexturesRO.clear();
} }
Render3D->BeginFrame(); Render3D->BeginFrame();