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);
}
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();