Fix rendering buffer handling
[mercenary-reloaded.git] / src / libsdl / opengl.c
index 74fcfe3..f795cf2 100644 (file)
@@ -130,16 +130,9 @@ void resize_opengl(int _screen_width, int _screen_height)
        screen_height = _screen_height;
 }
 
-void opengl_copy_last(void)
-{
-       // FIXME: is it ok to copy full window height??? or just the current viewport
-       glReadBuffer(GL_FRONT);
-       glCopyPixels(0, 0, screen_width, screen_height, GL_COLOR);
-       glReadBuffer(GL_BACK);
-}
-
 void opengl_clear(void)
 {
+       /* clear screen */
        glClearColor(0.0, 0.0, 0.0, 1.0);
        glClear(GL_COLOR_BUFFER_BIT);
 }
@@ -182,7 +175,7 @@ void opengl_viewport_legacy(int split)
        if (view_width < 1 || view_height < 1)
                return;
 
-       /* viewport and projection matrix */
+       /* viewport and projection matrix to view rectangle */
        glViewport((GLsizei)view_x, (GLsizei)view_y, (GLsizei)view_width, (GLsizei)view_height);
        glMatrixMode(GL_PROJECTION);
        glLoadIdentity();