aboutsummaryrefslogtreecommitdiff
path: root/src/GPU3D_OpenGL43.cpp
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-04-01 04:22:03 +0200
committerArisotura <thetotalworm@gmail.com>2019-04-01 04:22:03 +0200
commit2d0d501d1ffe972dcc0a8879b95aaed9328650c7 (patch)
tree893a45f1455bc539979710a3c175e01edf0e905a /src/GPU3D_OpenGL43.cpp
parent8bc4ca3fc8231c8836b0b0ff8cbeeb3855a719e1 (diff)
probs better this way
(ultimately RequestLine should be axed)
Diffstat (limited to 'src/GPU3D_OpenGL43.cpp')
-rw-r--r--src/GPU3D_OpenGL43.cpp12
1 files changed, 3 insertions, 9 deletions
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
@@ -147,17 +147,8 @@ 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];
}