renderer_opengl/utils: Forward declare private structs
Keeps the definitions hidden and allows changes to the structs without needing to recompile all users of classes containing said structs.
This commit is contained in:
parent
55f95e7f26
commit
06d30fbcca
|
@ -16,6 +16,13 @@
|
||||||
|
|
||||||
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 +54,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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue