[nostalgia/core/gl] Cleanup VBO, EBO, and VAO initialization

This commit is contained in:
2021-03-23 00:02:17 -05:00
parent b278b3881e
commit aea43306a4
3 changed files with 40 additions and 30 deletions
+2 -9
View File
@@ -57,7 +57,7 @@ struct GLobject: public Base {
this->id = id;
}
constexpr GLobject(GLobject &&o) {
constexpr GLobject(GLobject &&o): Base(ox::move(o)) {
id = o.id;
o.id = 0;
}
@@ -106,14 +106,7 @@ using Program = GLobject<glDeleteProgram>;
using Texture = GLobject<deleteTexture, TextureBase>;
using VertexArray = GLobject<deleteVertexArray>;
struct Bufferset {
VertexArray vao;
Buffer vbo;
Buffer ebo;
Texture tex;
};
[[nodiscard]]
ox::Result<Program> buildShaderProgram(const GLchar *vert, const GLchar *frag);
ox::Result<Program> buildShaderProgram(const GLchar *vert, const GLchar *frag) noexcept;
}