diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp index 83887cb66..78a822d22 100644 --- a/src/engine/client/graphics_threaded.cpp +++ b/src/engine/client/graphics_threaded.cpp @@ -59,7 +59,7 @@ void CGraphics_Threaded::FlushVertices() if(m_Drawing == DRAWING_QUADS) { - if(g_Config.m_GfxQuadAsTriangle || m_UseOpenGL3_3) + if(g_Config.m_GfxQuadAsTriangle && !m_UseOpenGL3_3) { Cmd.m_PrimType = CCommandBuffer::PRIMTYPE_TRIANGLES; Cmd.m_PrimCount = NumVerts/3; @@ -594,11 +594,10 @@ void CGraphics_Threaded::QuadsDraw(CQuadItem *pArray, int Num) void CGraphics_Threaded::QuadsDrawTL(const CQuadItem *pArray, int Num) { CCommandBuffer::SPoint Center; - Center.z = 0; dbg_assert(m_Drawing == DRAWING_QUADS, "called Graphics()->QuadsDrawTL without begin"); - if(g_Config.m_GfxQuadAsTriangle || m_UseOpenGL3_3) + if(g_Config.m_GfxQuadAsTriangle && !m_UseOpenGL3_3) { for(int i = 0; i < Num; ++i) { @@ -686,7 +685,7 @@ void CGraphics_Threaded::QuadsDrawFreeform(const CFreeformItem *pArray, int Num) { dbg_assert(m_Drawing == DRAWING_QUADS, "called Graphics()->QuadsDrawFreeform without begin"); - if(g_Config.m_GfxQuadAsTriangle || m_UseOpenGL3_3) + if(g_Config.m_GfxQuadAsTriangle && !m_UseOpenGL3_3) { for(int i = 0; i < Num; ++i) { @@ -1256,10 +1255,6 @@ int CGraphics_Threaded::Init() m_pStorage = Kernel()->RequestInterface(); m_pConsole = Kernel()->RequestInterface(); - // Set all z to -5.0f - for(int i = 0; i < MAX_VERTICES; i++) - m_aVertices[i].m_Pos.z = -5.0f; - // init textures m_FirstFreeTexture = 0; for(int i = 0; i < MAX_TEXTURES-1; i++) diff --git a/src/engine/client/graphics_threaded.h b/src/engine/client/graphics_threaded.h index 98643f155..3d08aa073 100644 --- a/src/engine/client/graphics_threaded.h +++ b/src/engine/client/graphics_threaded.h @@ -53,6 +53,7 @@ public: enum { MAX_TEXTURES=1024*4, + MAX_VERTICES=32*1024, }; enum @@ -140,7 +141,7 @@ public: //fix all alignments in any struct -- e.g. don't align to 8 bytes at 64bit code #pragma pack(push, 1) - struct SPoint { float x, y, z; }; + struct SPoint { float x, y; }; struct STexCoord { float u, v; }; struct SColor { float r, g, b, a; };