Replace glm with vec.h

Vec2, IVec2, Vec3, Vec4, IVec4 and a column-major Mat4, with glm's formulas, in one header.
Free functions are vec_ and mat4_ prefixed. The leaked using namespace glm is gone.
Render goldens still match.
This commit is contained in:
shweet committed 2026-11-22 18:15:02 -05:00
1 parent c38a3a9890
commit 03bbb93ba6
79 files changed
+1232 -810

No files matched your search

+6 -5
View File
@@ -1,7 +1,8 @@
#pragma once
#include "gl.h"
#include <glm/glm.hpp>
#include "vec.h"
#include <vector>
class Framebuffer
{
@@ -16,8 +17,8 @@ public:
GLuint fbo = 0;
GLuint rbo = 0;
GLuint texture = 0;
glm::vec2 size{};
glm::vec2 previousSize{};
Vec2 size{};
Vec2 previousSize{};
GLint filter = GL_LINEAR; // how the texture is sampled when drawn scaled. Takes effect on the next resize
Framebuffer();
@@ -25,9 +26,9 @@ public:
void set();
void resize_check();
void size_set(glm::vec2);
void size_set(Vec2);
void viewport_set() const;
void clear(glm::vec4 = glm::vec4(1.0f, 1.0f, 1.0f, 0.0f)) const;
void clear(Vec4 = Vec4(1.0f, 1.0f, 1.0f, 0.0f)) const;
std::vector<uint8_t> pixels_get() const;
bool is_valid() const;
void bind() const;