diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 11 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 5 |
3 files changed, 1 insertions, 17 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 43032e9a7..8774e836c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -68,8 +68,6 @@ RasterizerOpenGL::RasterizerOpenGL(Core::System& system, Core::Frontend::EmuWind | |||
| 68 | ScreenInfo& info) | 68 | ScreenInfo& info) |
| 69 | : texture_cache{system, *this, device}, shader_cache{*this, system, emu_window, device}, | 69 | : texture_cache{system, *this, device}, shader_cache{*this, system, emu_window, device}, |
| 70 | system{system}, screen_info{info}, buffer_cache{*this, system, STREAM_BUFFER_SIZE} { | 70 | system{system}, screen_info{info}, buffer_cache{*this, system, STREAM_BUFFER_SIZE} { |
| 71 | OpenGLState::ApplyDefaultState(); | ||
| 72 | |||
| 73 | shader_program_manager = std::make_unique<GLShader::ProgramManager>(); | 71 | shader_program_manager = std::make_unique<GLShader::ProgramManager>(); |
| 74 | state.draw.shader_program = 0; | 72 | state.draw.shader_program = 0; |
| 75 | state.Apply(); | 73 | state.Apply(); |
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index cfd1481de..48c123ffe 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp | |||
| @@ -92,17 +92,6 @@ void OpenGLState::SetDefaultViewports() { | |||
| 92 | depth_clamp.near_plane = false; | 92 | depth_clamp.near_plane = false; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | void OpenGLState::ApplyDefaultState() { | ||
| 96 | glEnable(GL_BLEND); | ||
| 97 | glDisable(GL_FRAMEBUFFER_SRGB); | ||
| 98 | glDisable(GL_CULL_FACE); | ||
| 99 | glDisable(GL_DEPTH_TEST); | ||
| 100 | glDisable(GL_PRIMITIVE_RESTART); | ||
| 101 | glDisable(GL_STENCIL_TEST); | ||
| 102 | glDisable(GL_COLOR_LOGIC_OP); | ||
| 103 | glDisable(GL_SCISSOR_TEST); | ||
| 104 | } | ||
| 105 | |||
| 106 | void OpenGLState::ApplyFramebufferState() const { | 95 | void OpenGLState::ApplyFramebufferState() const { |
| 107 | if (UpdateValue(cur_state.draw.read_framebuffer, draw.read_framebuffer)) { | 96 | if (UpdateValue(cur_state.draw.read_framebuffer, draw.read_framebuffer)) { |
| 108 | glBindFramebuffer(GL_READ_FRAMEBUFFER, draw.read_framebuffer); | 97 | glBindFramebuffer(GL_READ_FRAMEBUFFER, draw.read_framebuffer); |
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 805ee9e4a..b95f33613 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h | |||
| @@ -70,7 +70,7 @@ public: | |||
| 70 | } stencil; | 70 | } stencil; |
| 71 | 71 | ||
| 72 | struct Blend { | 72 | struct Blend { |
| 73 | bool enabled = true; // GL_BLEND | 73 | bool enabled = false; // GL_BLEND |
| 74 | GLenum rgb_equation = GL_FUNC_ADD; // GL_BLEND_EQUATION_RGB | 74 | GLenum rgb_equation = GL_FUNC_ADD; // GL_BLEND_EQUATION_RGB |
| 75 | GLenum a_equation = GL_FUNC_ADD; // GL_BLEND_EQUATION_ALPHA | 75 | GLenum a_equation = GL_FUNC_ADD; // GL_BLEND_EQUATION_ALPHA |
| 76 | GLenum src_rgb_func = GL_ONE; // GL_BLEND_SRC_RGB | 76 | GLenum src_rgb_func = GL_ONE; // GL_BLEND_SRC_RGB |
| @@ -183,9 +183,6 @@ public: | |||
| 183 | void ApplyPolygonOffset() const; | 183 | void ApplyPolygonOffset() const; |
| 184 | void ApplyAlphaTest() const; | 184 | void ApplyAlphaTest() const; |
| 185 | 185 | ||
| 186 | /// Set the initial OpenGL state | ||
| 187 | static void ApplyDefaultState(); | ||
| 188 | |||
| 189 | /// Resets any references to the given resource | 186 | /// Resets any references to the given resource |
| 190 | OpenGLState& UnbindTexture(GLuint handle); | 187 | OpenGLState& UnbindTexture(GLuint handle); |
| 191 | OpenGLState& ResetSampler(GLuint handle); | 188 | OpenGLState& ResetSampler(GLuint handle); |