diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state_tracker.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state_tracker.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state_tracker.h b/src/video_core/renderer_opengl/gl_state_tracker.h index 5269dadff..992b915fb 100644 --- a/src/video_core/renderer_opengl/gl_state_tracker.h +++ b/src/video_core/renderer_opengl/gl_state_tracker.h @@ -6,7 +6,10 @@ #include <limits> +#include <glad/glad.h> + #include "common/common_types.h" +#include "core/core.h" #include "video_core/dirty_flags.h" #include "video_core/engines/maxwell_3d.h" @@ -85,6 +88,14 @@ public: void Initialize(); + void BindIndexBuffer(GLuint new_index_buffer) { + if (index_buffer == new_index_buffer) { + return; + } + index_buffer = new_index_buffer; + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, new_index_buffer); + } + void NotifyScreenDrawVertexArray() { auto& flags = system.GPU().Maxwell3D().dirty.flags; flags[OpenGL::Dirty::VertexFormats] = true; @@ -175,6 +186,8 @@ public: private: Core::System& system; + + GLuint index_buffer = 0; }; } // namespace OpenGL |