diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/utils.cpp | 17 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/utils.h | 14 |
2 files changed, 16 insertions, 15 deletions
diff --git a/src/video_core/renderer_opengl/utils.cpp b/src/video_core/renderer_opengl/utils.cpp index 9770dda1c..ac99e6385 100644 --- a/src/video_core/renderer_opengl/utils.cpp +++ b/src/video_core/renderer_opengl/utils.cpp | |||
| @@ -6,16 +6,20 @@ | |||
| 6 | #include <vector> | 6 | #include <vector> |
| 7 | 7 | ||
| 8 | #include <fmt/format.h> | 8 | #include <fmt/format.h> |
| 9 | |||
| 10 | #include <glad/glad.h> | 9 | #include <glad/glad.h> |
| 11 | 10 | ||
| 12 | #include "common/assert.h" | ||
| 13 | #include "common/common_types.h" | 11 | #include "common/common_types.h" |
| 14 | #include "common/scope_exit.h" | ||
| 15 | #include "video_core/renderer_opengl/utils.h" | 12 | #include "video_core/renderer_opengl/utils.h" |
| 16 | 13 | ||
| 17 | namespace OpenGL { | 14 | namespace OpenGL { |
| 18 | 15 | ||
| 16 | struct VertexArrayPushBuffer::Entry { | ||
| 17 | GLuint binding_index{}; | ||
| 18 | const GLuint* buffer{}; | ||
| 19 | GLintptr offset{}; | ||
| 20 | GLsizei stride{}; | ||
| 21 | }; | ||
| 22 | |||
| 19 | VertexArrayPushBuffer::VertexArrayPushBuffer() = default; | 23 | VertexArrayPushBuffer::VertexArrayPushBuffer() = default; |
| 20 | 24 | ||
| 21 | VertexArrayPushBuffer::~VertexArrayPushBuffer() = default; | 25 | VertexArrayPushBuffer::~VertexArrayPushBuffer() = default; |
| @@ -47,6 +51,13 @@ void VertexArrayPushBuffer::Bind() { | |||
| 47 | } | 51 | } |
| 48 | } | 52 | } |
| 49 | 53 | ||
| 54 | struct BindBuffersRangePushBuffer::Entry { | ||
| 55 | GLuint binding; | ||
| 56 | const GLuint* buffer; | ||
| 57 | GLintptr offset; | ||
| 58 | GLsizeiptr size; | ||
| 59 | }; | ||
| 60 | |||
| 50 | BindBuffersRangePushBuffer::BindBuffersRangePushBuffer(GLenum target) : target{target} {} | 61 | BindBuffersRangePushBuffer::BindBuffersRangePushBuffer(GLenum target) : target{target} {} |
| 51 | 62 | ||
| 52 | BindBuffersRangePushBuffer::~BindBuffersRangePushBuffer() = default; | 63 | BindBuffersRangePushBuffer::~BindBuffersRangePushBuffer() = default; |
diff --git a/src/video_core/renderer_opengl/utils.h b/src/video_core/renderer_opengl/utils.h index d56153fe7..3ad7c02d4 100644 --- a/src/video_core/renderer_opengl/utils.h +++ b/src/video_core/renderer_opengl/utils.h | |||
| @@ -26,12 +26,7 @@ public: | |||
| 26 | void Bind(); | 26 | void Bind(); |
| 27 | 27 | ||
| 28 | private: | 28 | private: |
| 29 | struct Entry { | 29 | struct Entry; |
| 30 | GLuint binding_index{}; | ||
| 31 | const GLuint* buffer{}; | ||
| 32 | GLintptr offset{}; | ||
| 33 | GLsizei stride{}; | ||
| 34 | }; | ||
| 35 | 30 | ||
| 36 | GLuint vao{}; | 31 | GLuint vao{}; |
| 37 | const GLuint* index_buffer{}; | 32 | const GLuint* index_buffer{}; |
| @@ -50,12 +45,7 @@ public: | |||
| 50 | void Bind(); | 45 | void Bind(); |
| 51 | 46 | ||
| 52 | private: | 47 | private: |
| 53 | struct Entry { | 48 | struct Entry; |
| 54 | GLuint binding; | ||
| 55 | const GLuint* buffer; | ||
| 56 | GLintptr offset; | ||
| 57 | GLsizeiptr size; | ||
| 58 | }; | ||
| 59 | 49 | ||
| 60 | GLenum target; | 50 | GLenum target; |
| 61 | std::vector<Entry> entries; | 51 | std::vector<Entry> entries; |