Fix some r_scene_multithreaded crashes

This commit is contained in:
Magnus Norddahl 2021-02-11 08:53:37 +01:00 committed by Rachael Alexanderson
commit bdb35e5e86
4 changed files with 17 additions and 6 deletions

View file

@ -55,6 +55,8 @@
#include "r_memory.h"
#include "common/rendering/polyrenderer/drawers/poly_thread.h"
std::pair<PalEntry, PalEntry>& R_GetSkyCapColor(FGameTexture* tex);
namespace swrenderer
{
RenderThread::RenderThread(RenderScene *scene, bool mainThread)
@ -120,6 +122,13 @@ namespace swrenderer
}
}
std::pair<PalEntry, PalEntry> RenderThread::GetSkyCapColor(FSoftwareTexture* tex)
{
std::unique_lock<std::mutex> lock(loadmutex);
std::pair<PalEntry, PalEntry> colors = R_GetSkyCapColor(tex->GetTexture());
return colors;
}
static std::mutex polyobjmutex;
void RenderThread::PreparePolyObject(subsector_t *sub)
{