- clear the matrix list after rendering the 2D content.

This commit is contained in:
Christoph Oelckers 2020-01-19 23:27:59 +01:00
parent aa1361acbb
commit b066f725d4
2 changed files with 4 additions and 1 deletions

View file

@ -56,7 +56,7 @@ static int blendstyles[] = { GL_ZERO, GL_ONE, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALP
static int renderops[] = { GL_FUNC_ADD, GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT }; static int renderops[] = { GL_FUNC_ADD, GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT };
int depthf[] = { GL_ALWAYS, GL_LESS, GL_EQUAL, GL_LEQUAL }; int depthf[] = { GL_ALWAYS, GL_LESS, GL_EQUAL, GL_LEQUAL };
static TArray<VSMatrix> matrixArray; TArray<VSMatrix> matrixArray;
FileReader GetResource(const char* fn) FileReader GetResource(const char* fn)
{ {

View file

@ -43,6 +43,8 @@
#include "flatvertices.h" #include "flatvertices.h"
extern int16_t numshades; extern int16_t numshades;
extern TArray<VSMatrix> matrixArray;
//=========================================================================== //===========================================================================
// //
// Vertex buffer for 2D drawer // Vertex buffer for 2D drawer
@ -227,6 +229,7 @@ void GLInstance::Draw2D(F2DDrawer *drawer)
EnableBlend(true); EnableBlend(true);
EnableMultisampling(true); EnableMultisampling(true);
SetIdentityMatrix(Matrix_Projection); SetIdentityMatrix(Matrix_Projection);
matrixArray.Resize(1);
} }