From 2d0d501d1ffe972dcc0a8879b95aaed9328650c7 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Mon, 1 Apr 2019 04:22:03 +0200 Subject: probs better this way (ultimately RequestLine should be axed) --- src/GPU3D_OpenGL43.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/GPU3D_OpenGL43.cpp b/src/GPU3D_OpenGL43.cpp index 3641ff3..58539fa 100644 --- a/src/GPU3D_OpenGL43.cpp +++ b/src/GPU3D_OpenGL43.cpp @@ -146,18 +146,9 @@ void RenderFrame() } void RequestLine(int line) -{ - // -} - -u32* GetLine(int line) { if (line == 0) { - /*glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID); - glReadBuffer(GL_COLOR_ATTACHMENT0); - glReadPixels(0, 0, 256, 192, GL_RGBA, GL_UNSIGNED_BYTE, Framebuffer);*/ - u8* data = (u8*)glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY); if (data) memcpy(&Framebuffer[4*256*0], data, 4*256*48); glUnmapBuffer(GL_PIXEL_PACK_BUFFER); @@ -186,7 +177,10 @@ u32* GetLine(int line) if (data) memcpy(&Framebuffer[4*256*144], data, 4*256*48); glUnmapBuffer(GL_PIXEL_PACK_BUFFER); } +} +u32* GetLine(int line) +{ return (u32*)&Framebuffer[256*4 * line]; } -- cgit v1.2.3