From 34f5997f821896d6242abe68b1c76c4172473b9f Mon Sep 17 00:00:00 2001 From: DH Date: Sun, 8 Dec 2013 02:42:59 +0200 Subject: [PATCH] Improved OpenGL renderer. - Rotate color buffer. --- rpcs3/Emu/GS/GL/GLGSRender.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/GS/GL/GLGSRender.cpp b/rpcs3/Emu/GS/GL/GLGSRender.cpp index 229d15bb42..91f5e0dad2 100644 --- a/rpcs3/Emu/GS/GL/GLGSRender.cpp +++ b/rpcs3/Emu/GS/GL/GLGSRender.cpp @@ -1058,10 +1058,22 @@ void GLGSRender::Flip() u32 height = re(buffers[m_gcm_current_buffer].height); u32 addr = GetAddress(re(buffers[m_gcm_current_buffer].offset), CELL_GCM_LOCATION_LOCAL); + glRotated(90, 1, 0, 0); + if(Memory.IsGoodAddr(addr)) { - void* pixels = Memory.VirtualToRealAddr(addr); - glDrawPixels(width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, pixels); + //TODO + //buffer rotating + static Array pixels; + pixels.SetCount(width * height * 4); + u8* src = (u8*)Memory.VirtualToRealAddr(addr); + + for(u32 y=0; y