diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-10-30 01:16:03 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-10-30 01:27:24 +0100 |
commit | d3651b0b8218c40452732f7c084cc72ad848ee15 (patch) | |
tree | c207fe344d6e8c37cddf43bc0b7367c5e8b507f4 /src/video_core | |
parent | gl_state: Minor style changes (diff) | |
download | yuzu-d3651b0b8218c40452732f7c084cc72ad848ee15.tar yuzu-d3651b0b8218c40452732f7c084cc72ad848ee15.tar.gz yuzu-d3651b0b8218c40452732f7c084cc72ad848ee15.tar.bz2 yuzu-d3651b0b8218c40452732f7c084cc72ad848ee15.tar.lz yuzu-d3651b0b8218c40452732f7c084cc72ad848ee15.tar.xz yuzu-d3651b0b8218c40452732f7c084cc72ad848ee15.tar.zst yuzu-d3651b0b8218c40452732f7c084cc72ad848ee15.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index cd440e0d8..cfd1481de 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <algorithm> #include <iterator> #include <glad/glad.h> #include "common/assert.h" @@ -85,19 +86,7 @@ void Enable(GLenum cap, GLuint index, bool& current_value, bool new_value) { OpenGLState::OpenGLState() = default; void OpenGLState::SetDefaultViewports() { - for (auto& item : viewports) { - item.x = 0; - item.y = 0; - item.width = 0; - item.height = 0; - item.depth_range_near = 0.0f; - item.depth_range_far = 1.0f; - item.scissor.enabled = false; - item.scissor.x = 0; - item.scissor.y = 0; - item.scissor.width = 0; - item.scissor.height = 0; - } + std::fill(std::begin(viewports), std::end(viewports), Viewport{}); depth_clamp.far_plane = false; depth_clamp.near_plane = false; |