From f5e1d9eab19fab3db16a9dd13510a4d2a5e15408 Mon Sep 17 00:00:00 2001 From: raven02 Date: Fri, 16 May 2014 15:13:34 +0800 Subject: [PATCH] Use GL_BGRA for glReadPixels() --- rpcs3/Emu/GS/GL/GLGSRender.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/GS/GL/GLGSRender.cpp b/rpcs3/Emu/GS/GL/GLGSRender.cpp index 3b3b5aaf25..19ac3b12ca 100644 --- a/rpcs3/Emu/GS/GL/GLGSRender.cpp +++ b/rpcs3/Emu/GS/GL/GLGSRender.cpp @@ -517,7 +517,7 @@ void GLGSRender::WriteColourBufferA() glReadBuffer(GL_COLOR_ATTACHMENT0); checkForGlError("glReadBuffer(GL_COLOR_ATTACHMENT0)"); - glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &Memory[address]); + glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, &Memory[address]); checkForGlError("glReadPixels(GL_RGBA, GL_UNSIGNED_INT_8_8_8_8)"); } @@ -537,7 +537,7 @@ void GLGSRender::WriteColourBufferB() glReadBuffer(GL_COLOR_ATTACHMENT1); checkForGlError("glReadBuffer(GL_COLOR_ATTACHMENT1)"); - glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &Memory[address]); + glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, &Memory[address]); checkForGlError("glReadPixels(GL_RGBA, GL_UNSIGNED_INT_8_8_8_8)"); } @@ -557,7 +557,7 @@ void GLGSRender::WriteColourBufferC() glReadBuffer(GL_COLOR_ATTACHMENT2); checkForGlError("glReadBuffer(GL_COLOR_ATTACHMENT2)"); - glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &Memory[address]); + glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, &Memory[address]); checkForGlError("glReadPixels(GL_RGBA, GL_UNSIGNED_INT_8_8_8_8)"); } @@ -577,7 +577,7 @@ void GLGSRender::WriteColourBufferD() glReadBuffer(GL_COLOR_ATTACHMENT3); checkForGlError("glReadBuffer(GL_COLOR_ATTACHMENT3)"); - glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &Memory[address]); + glReadPixels(0, 0, RSXThread::m_width, RSXThread::m_height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, &Memory[address]); checkForGlError("glReadPixels(GL_RGBA, GL_UNSIGNED_INT_8_8_8_8)"); }