diff --git a/source/glbackend/glbackend.cpp b/source/glbackend/glbackend.cpp index f9891e7e8..dbe5e2851 100644 --- a/source/glbackend/glbackend.cpp +++ b/source/glbackend/glbackend.cpp @@ -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 }; int depthf[] = { GL_ALWAYS, GL_LESS, GL_EQUAL, GL_LEQUAL }; -static TArray matrixArray; +TArray matrixArray; FileReader GetResource(const char* fn) { diff --git a/source/glbackend/hw_draw2d.cpp b/source/glbackend/hw_draw2d.cpp index ac16511f2..bde5359aa 100644 --- a/source/glbackend/hw_draw2d.cpp +++ b/source/glbackend/hw_draw2d.cpp @@ -43,6 +43,8 @@ #include "flatvertices.h" extern int16_t numshades; +extern TArray matrixArray; + //=========================================================================== // // Vertex buffer for 2D drawer @@ -227,6 +229,7 @@ void GLInstance::Draw2D(F2DDrawer *drawer) EnableBlend(true); EnableMultisampling(true); SetIdentityMatrix(Matrix_Projection); + matrixArray.Resize(1); }