- avoid reusing the same mVBuf pointer for the different renderers as that causes too many problems when switching between them

- remove gl_ prefix for model functions that are no longer GL specific
This commit is contained in:
Magnus Norddahl 2018-05-21 17:52:03 +02:00
commit 31abe3df7e
20 changed files with 94 additions and 90 deletions

View file

@ -33,9 +33,6 @@
#include "actorinlines.h"
#include "i_time.h"
void gl_FlushModels();
bool polymodelsInUse;
void PolyRenderModel(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_t stencilValue, float x, float y, float z, FSpriteModelFrame *smf, AActor *actor)
{
PolyModelRenderer renderer(thread, worldToClip, stencilValue);
@ -52,11 +49,6 @@ void PolyRenderHUDModel(PolyRenderThread *thread, const Mat4f &worldToClip, uint
PolyModelRenderer::PolyModelRenderer(PolyRenderThread *thread, const Mat4f &worldToClip, uint32_t stencilValue) : Thread(thread), WorldToClip(worldToClip), StencilValue(stencilValue)
{
if (!polymodelsInUse)
{
gl_FlushModels();
polymodelsInUse = true;
}
}
void PolyModelRenderer::BeginDrawModel(AActor *actor, FSpriteModelFrame *smf, const VSMatrix &objectToWorldMatrix)