diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-31 22:16:58 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 21:56:42 +0100 |
commit | a5bfc0d045cada34248d3de493889371d22ade7c (patch) | |
tree | ce208055007860e9500862d22dc341ca5b153c60 /src/video_core/renderer_opengl/gl_state_tracker.h | |
parent | gl_state_tracker: Implement dirty flags for clip control (diff) | |
download | yuzu-a5bfc0d045cada34248d3de493889371d22ade7c.tar yuzu-a5bfc0d045cada34248d3de493889371d22ade7c.tar.gz yuzu-a5bfc0d045cada34248d3de493889371d22ade7c.tar.bz2 yuzu-a5bfc0d045cada34248d3de493889371d22ade7c.tar.lz yuzu-a5bfc0d045cada34248d3de493889371d22ade7c.tar.xz yuzu-a5bfc0d045cada34248d3de493889371d22ade7c.tar.zst yuzu-a5bfc0d045cada34248d3de493889371d22ade7c.zip |
Diffstat (limited to '')
-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 |