yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Merge pull request #3304 from lioncash/fwd-decl

renderer_opengl/utils: Forward declare private structs
This commit is contained in:
bunnei 2020-01-16 11:21:18 -05:00 committed by GitHub
commit d23869811d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 15 deletions

View File

@ -6,16 +6,20 @@
#include <vector> #include <vector>
#include <fmt/format.h> #include <fmt/format.h>
#include <glad/glad.h> #include <glad/glad.h>
#include "common/assert.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "common/scope_exit.h"
#include "video_core/renderer_opengl/utils.h" #include "video_core/renderer_opengl/utils.h"
namespace OpenGL { namespace OpenGL {
struct VertexArrayPushBuffer::Entry {
GLuint binding_index{};
const GLuint* buffer{};
GLintptr offset{};
GLsizei stride{};
};
VertexArrayPushBuffer::VertexArrayPushBuffer() = default; VertexArrayPushBuffer::VertexArrayPushBuffer() = default;
VertexArrayPushBuffer::~VertexArrayPushBuffer() = default; VertexArrayPushBuffer::~VertexArrayPushBuffer() = default;
@ -47,6 +51,13 @@ void VertexArrayPushBuffer::Bind() {
} }
} }
struct BindBuffersRangePushBuffer::Entry {
GLuint binding;
const GLuint* buffer;
GLintptr offset;
GLsizeiptr size;
};
BindBuffersRangePushBuffer::BindBuffersRangePushBuffer(GLenum target) : target{target} {} BindBuffersRangePushBuffer::BindBuffersRangePushBuffer(GLenum target) : target{target} {}
BindBuffersRangePushBuffer::~BindBuffersRangePushBuffer() = default; BindBuffersRangePushBuffer::~BindBuffersRangePushBuffer() = default;

View File

@ -26,12 +26,7 @@ public:
void Bind(); void Bind();
private: private:
struct Entry { struct Entry;
GLuint binding_index{};
const GLuint* buffer{};
GLintptr offset{};
GLsizei stride{};
};
GLuint vao{}; GLuint vao{};
const GLuint* index_buffer{}; const GLuint* index_buffer{};
@ -50,12 +45,7 @@ public:
void Bind(); void Bind();
private: private:
struct Entry { struct Entry;
GLuint binding;
const GLuint* buffer;
GLintptr offset;
GLsizeiptr size;
};
GLenum target; GLenum target;
std::vector<Entry> entries; std::vector<Entry> entries;