diff options
Diffstat (limited to 'src')
| -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 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | ||
| 5 | #include <iterator> | 6 | #include <iterator> |
| 6 | #include <glad/glad.h> | 7 | #include <glad/glad.h> |
| 7 | #include "common/assert.h" | 8 | #include "common/assert.h" |
| @@ -85,19 +86,7 @@ void Enable(GLenum cap, GLuint index, bool& current_value, bool new_value) { | |||
| 85 | OpenGLState::OpenGLState() = default; | 86 | OpenGLState::OpenGLState() = default; |
| 86 | 87 | ||
| 87 | void OpenGLState::SetDefaultViewports() { | 88 | void OpenGLState::SetDefaultViewports() { |
| 88 | for (auto& item : viewports) { | 89 | std::fill(std::begin(viewports), std::end(viewports), Viewport{}); |
| 89 | item.x = 0; | ||
| 90 | item.y = 0; | ||
| 91 | item.width = 0; | ||
| 92 | item.height = 0; | ||
| 93 | item.depth_range_near = 0.0f; | ||
| 94 | item.depth_range_far = 1.0f; | ||
| 95 | item.scissor.enabled = false; | ||
| 96 | item.scissor.x = 0; | ||
| 97 | item.scissor.y = 0; | ||
| 98 | item.scissor.width = 0; | ||
| 99 | item.scissor.height = 0; | ||
| 100 | } | ||
| 101 | 90 | ||
| 102 | depth_clamp.far_plane = false; | 91 | depth_clamp.far_plane = false; |
| 103 | depth_clamp.near_plane = false; | 92 | depth_clamp.near_plane = false; |