gl: Add missing viewport save

This commit is contained in:
kd-11 2022-05-30 00:43:54 +03:00 committed by kd-11
parent b97557ce7b
commit dd6cb054a7
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ namespace gl
if (!target_texture || fbo.check())
{
// Save state (TODO)
glGetIntegerv(GL_VIEWPORT, viewport);
// Set initial state
glViewport(region.x1, region.y1, region.width(), region.height());
cmd->color_maski(0, GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);