From a253b15334b8ebc905575c7c3fa7bd05ba8aaf09 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 28 Mar 2018 23:57:50 +0200 Subject: [PATCH] - more fixes. --- src/gl/renderer/gl_renderer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gl/renderer/gl_renderer.cpp b/src/gl/renderer/gl_renderer.cpp index 0066db4b0..b9632e9b8 100644 --- a/src/gl/renderer/gl_renderer.cpp +++ b/src/gl/renderer/gl_renderer.cpp @@ -474,9 +474,9 @@ public: // set up the vertex buffer for drawing the 2D elements. glBindBuffer(GL_ARRAY_BUFFER, vbo_id); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo_id); - glVertexAttribPointer(VATTR_VERTEX, 3, GL_FLOAT, false, sizeof(FSimpleVertex), &TDiO->x); - glVertexAttribPointer(VATTR_TEXCOORD, 2, GL_FLOAT, false, sizeof(FSimpleVertex), &TDiO->u); - glVertexAttribPointer(VATTR_COLOR, 4, GL_UNSIGNED_BYTE, true, sizeof(FSimpleVertex), &TDiO->color0); + glVertexAttribPointer(VATTR_VERTEX, 3, GL_FLOAT, false, sizeof(F2DDrawer::TwoDVertex), &TDiO->x); + glVertexAttribPointer(VATTR_TEXCOORD, 2, GL_FLOAT, false, sizeof(F2DDrawer::TwoDVertex), &TDiO->u); + glVertexAttribPointer(VATTR_COLOR, 4, GL_UNSIGNED_BYTE, true, sizeof(F2DDrawer::TwoDVertex), &TDiO->color0); glEnableVertexAttribArray(VATTR_VERTEX); glEnableVertexAttribArray(VATTR_TEXCOORD); //glEnableVertexAttribArray(VATTR_COLOR); @@ -535,9 +535,9 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer) // scissor test doesn't use the current viewport for the coordinates, so use real screen coordinates glScissor( GLRenderer->ScreenToWindowX(cmd.mScissor[0]), - GLRenderer->ScreenToWindowX(cmd.mScissor[1]), + GLRenderer->ScreenToWindowY(cmd.mScissor[1]), GLRenderer->ScreenToWindowX(cmd.mScissor[2] - cmd.mScissor[0]), - GLRenderer->ScreenToWindowX(cmd.mScissor[3] - cmd.mScissor[1])); + GLRenderer->ScreenToWindowY(cmd.mScissor[3] - cmd.mScissor[1])); } else glDisable(GL_SCISSOR_TEST);