feat: render per-vertex color triangle

- Add shader class for vertex/fragment program compilation
- Add vao class for vertex array object management
- Render RGB gradient triangle with interpolated vertex colors
This commit is contained in:
2026-05-05 22:05:40 +02:00
parent 90d013695d
commit df08210f77
6 changed files with 279 additions and 5 deletions
+26
View File
@@ -0,0 +1,26 @@
#pragma once
#include "glad/glad.h"
namespace cbt::opengl {
class vao {
GLuint m_id = 0;
public:
vao();
~vao();
vao(const vao&) = delete;
vao& operator=(const vao&) = delete;
vao(vao&& other) noexcept;
vao& operator=(vao&& other) noexcept;
auto bind() const -> void;
auto unbind() const -> void;
auto id() const -> GLuint;
auto valid() const -> bool;
};
}