Make VertexAttributePointer store index instead of buffer pointer

This commit is contained in:
NaifBanana
2026-08-20 08:14:28 -05:00
parent cac2eca144
commit fa749a6ebf
2 changed files with 12 additions and 14 deletions
+5 -7
View File
@@ -25,7 +25,11 @@ struct VertexAttribute {
VertexAttributeLayout layout;
};
struct VertexAttributePointer;
struct VertexAttributePointer {
VertexAttribute attribute;
GLuint buffer;
GLuint index;
};
static bool isIndexInVertexAttribute(int i, const VertexAttribute& va) {
if ((i -= va.layout.offset) < 0) { return false; }
@@ -85,12 +89,6 @@ class VertexBuffer<true>
};
struct VertexAttributePointer {
VertexAttribute attribute;
VertexBuffer<false>* buffer;
GLuint index;
};
class VAO : public OpenGLObject {
using Base = OpenGLObject;
using Codes = VAOError::Codes;