diff options
| author | bunnei <bunneidev@gmail.com> | 2019-04-10 11:23:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-10 11:23:19 -0400 |
| commit | 97648f48418c4d37c91f91b4c36689d4d86d501c (patch) | |
| tree | 843f53aabde61418c2b1590e6ab4c2a466aaa92e /src/video_core/renderer_opengl/utils.h | |
| parent | 1312cf15d637e87161f0c70591098385b6de9ce1 (diff) | |
| parent | 34c3e2c7868620d9c1c76fd810db3cb368fbd22b (diff) | |
Merge pull request #2345 from ReinUsesLisp/multibind
gl_rasterizer: Use ARB_multi_bind to update buffers with a single call per drawcall
Diffstat (limited to 'src/video_core/renderer_opengl/utils.h')
| -rw-r--r-- | src/video_core/renderer_opengl/utils.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/utils.h b/src/video_core/renderer_opengl/utils.h index 1fcb6fc11..aef45c9dc 100644 --- a/src/video_core/renderer_opengl/utils.h +++ b/src/video_core/renderer_opengl/utils.h @@ -5,11 +5,31 @@ #pragma once #include <string> +#include <vector> #include <glad/glad.h> #include "common/common_types.h" namespace OpenGL { +class BindBuffersRangePushBuffer { +public: + BindBuffersRangePushBuffer(GLenum target); + ~BindBuffersRangePushBuffer(); + + void Setup(GLuint first_); + + void Push(GLuint buffer, GLintptr offset, GLsizeiptr size); + + void Bind() const; + +private: + GLenum target; + GLuint first; + std::vector<GLuint> buffers; + std::vector<GLintptr> offsets; + std::vector<GLsizeiptr> sizes; +}; + void LabelGLObject(GLenum identifier, GLuint handle, VAddr addr, std::string extra_info = ""); } // namespace OpenGL
\ No newline at end of file |
