fix: encapsulate OpenGL types in VertexAttribute to eliminate raw GL API usage in tests
- Add VertexAttributeType and VertexAttributeNormalized enums in OpenGLVertexArray.h - Add ToGLAttributeType() converter in OpenGLVertexArray.cpp - Remove glActiveTexture() call from quad test (already handled by texture.Bind()) - Remove #include <glad/glad.h> from triangle test - Update unit tests to use encapsulated enums All three OpenGL integration tests (minimal, triangle, quad) pass with 0% pixel difference.
This commit is contained in:
@@ -54,8 +54,8 @@ TEST_F(OpenGLTestFixture, CommandList_Draw_VAO) {
|
||||
VertexAttribute attr;
|
||||
attr.index = 0;
|
||||
attr.count = 3;
|
||||
attr.type = GL_FLOAT;
|
||||
attr.normalized = false;
|
||||
attr.type = VertexAttributeType::Float;
|
||||
attr.normalized = VertexAttributeNormalized::False;
|
||||
attr.stride = sizeof(float) * 3;
|
||||
attr.offset = 0;
|
||||
vao.AddVertexBuffer(vbo.GetID(), attr);
|
||||
|
||||
Reference in New Issue
Block a user