From 98a0f2b821408ef1f5605b1df1150ee8d0d4776a Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Wed, 25 Oct 2023 16:53:25 +0200 Subject: [PATCH] gl: frame upside down with GLES 2.0 if video shift is on drawQuad ignores the swapY param if vertices are provided so swap Y coords of vertices. --- core/rend/gles/gldraw.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/rend/gles/gldraw.cpp b/core/rend/gles/gldraw.cpp index 4c90dcc4e2..f8ae96a336 100644 --- a/core/rend/gles/gldraw.cpp +++ b/core/rend/gles/gldraw.cpp @@ -771,15 +771,15 @@ bool OpenGLRenderer::renderLastFrame() if (gl.ofbo.shiftX != 0 || gl.ofbo.shiftY != 0) { static float sverts[20] = { - -1.f, 1.f, 1.f, 0.f, 1.f, - -1.f, -1.f, 1.f, 0.f, 0.f, - 1.f, 1.f, 1.f, 1.f, 1.f, + -1.f, -1.f, 1.f, 0.f, 1.f, + -1.f, 1.f, 1.f, 0.f, 0.f, + 1.f, -1.f, 1.f, 1.f, 1.f, 1.f, -1.f, 1.f, 1.f, 0.f, }; sverts[0] = sverts[5] = -1.f + gl.ofbo.shiftX * 2.f / framebuffer->getWidth(); sverts[10] = sverts[15] = sverts[0] + 2; - sverts[1] = sverts[11] = 1.f - gl.ofbo.shiftY * 2.f / framebuffer->getHeight(); - sverts[6] = sverts[16] = sverts[1] - 2; + sverts[1] = sverts[11] = -1.f - gl.ofbo.shiftY * 2.f / framebuffer->getHeight(); + sverts[6] = sverts[16] = sverts[1] + 2; vertices = sverts; } glcache.Disable(GL_BLEND);