diff options
author | Subv <subv2112@gmail.com> | 2015-11-10 17:58:53 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-11-19 03:03:56 +0100 |
commit | 823ce62f2fead8e436c2c916ed7ce5c8b949d1c6 (patch) | |
tree | bf0c4bded40858a0db81e993503e2f90f2b9b400 /src/video_core/renderer_opengl/gl_state.cpp | |
parent | Merge pull request #1236 from Subv/log_overflow (diff) | |
download | yuzu-823ce62f2fead8e436c2c916ed7ce5c8b949d1c6.tar yuzu-823ce62f2fead8e436c2c916ed7ce5c8b949d1c6.tar.gz yuzu-823ce62f2fead8e436c2c916ed7ce5c8b949d1c6.tar.bz2 yuzu-823ce62f2fead8e436c2c916ed7ce5c8b949d1c6.tar.lz yuzu-823ce62f2fead8e436c2c916ed7ce5c8b949d1c6.tar.xz yuzu-823ce62f2fead8e436c2c916ed7ce5c8b949d1c6.tar.zst yuzu-823ce62f2fead8e436c2c916ed7ce5c8b949d1c6.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, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 77b2816cb..c44497fc3 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -180,6 +180,11 @@ void OpenGLState::Apply() { glBindBuffer(GL_ARRAY_BUFFER, draw.vertex_buffer); } + // Uniform buffer + if (draw.uniform_buffer != cur_state.draw.uniform_buffer) { + glBindBuffer(GL_UNIFORM_BUFFER, draw.uniform_buffer); + } + // Shader program if (draw.shader_program != cur_state.draw.shader_program) { glUseProgram(draw.shader_program); @@ -214,6 +219,9 @@ void OpenGLState::ResetBuffer(GLuint id) { if (cur_state.draw.vertex_buffer == id) { cur_state.draw.vertex_buffer = 0; } + if (cur_state.draw.uniform_buffer == id) { + cur_state.draw.uniform_buffer = 0; + } } void OpenGLState::ResetVertexArray(GLuint id) { |