diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-12 04:58:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-12 04:58:16 +0100 |
commit | 2c6efda2352a1133a1091d2aa206b1f044b7642a (patch) | |
tree | 2a1bbae2d93fb2a52f0ff3f7802919cef8b4d6d3 /src/video_core/renderer_opengl/gl_state.cpp | |
parent | Merge pull request #1652 from FreddyFunk/static-cast (diff) | |
parent | Use core extensions when available to set max anisotropic filtering level (diff) | |
download | yuzu-2c6efda2352a1133a1091d2aa206b1f044b7642a.tar yuzu-2c6efda2352a1133a1091d2aa206b1f044b7642a.tar.gz yuzu-2c6efda2352a1133a1091d2aa206b1f044b7642a.tar.bz2 yuzu-2c6efda2352a1133a1091d2aa206b1f044b7642a.tar.lz yuzu-2c6efda2352a1133a1091d2aa206b1f044b7642a.tar.xz yuzu-2c6efda2352a1133a1091d2aa206b1f044b7642a.tar.zst yuzu-2c6efda2352a1133a1091d2aa206b1f044b7642a.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 9517285e5..2635f2b0c 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -427,7 +427,7 @@ void OpenGLState::ApplySamplers() const { } } -void OpenGLState::Apply() const { +void OpenGLState::ApplyFramebufferState() const { // Framebuffer if (draw.read_framebuffer != cur_state.draw.read_framebuffer) { glBindFramebuffer(GL_READ_FRAMEBUFFER, draw.read_framebuffer); @@ -435,7 +435,9 @@ void OpenGLState::Apply() const { if (draw.draw_framebuffer != cur_state.draw.draw_framebuffer) { glBindFramebuffer(GL_DRAW_FRAMEBUFFER, draw.draw_framebuffer); } +} +void OpenGLState::ApplyVertexBufferState() const { // Vertex array if (draw.vertex_array != cur_state.draw.vertex_array) { glBindVertexArray(draw.vertex_array); @@ -445,7 +447,11 @@ void OpenGLState::Apply() const { if (draw.vertex_buffer != cur_state.draw.vertex_buffer) { glBindBuffer(GL_ARRAY_BUFFER, draw.vertex_buffer); } +} +void OpenGLState::Apply() const { + ApplyFramebufferState(); + ApplyVertexBufferState(); // Uniform buffer if (draw.uniform_buffer != cur_state.draw.uniform_buffer) { glBindBuffer(GL_UNIFORM_BUFFER, draw.uniform_buffer); |