refactor: warp everything in Cubed namespace

This commit is contained in:
2026-04-20 22:18:02 +08:00
parent 6c74f4582c
commit c2321a0a6e
49 changed files with 288 additions and 66 deletions

View File

@@ -2,6 +2,9 @@
#include <Cubed/tools/cubed_assert.hpp>
#include <glm/glm.hpp>
namespace Cubed {
enum class Color {
BLACK,
WHITE,
@@ -49,7 +52,7 @@ inline constexpr glm::vec4 color_value(Color color) {
case Color::BROWN:
return vec4{0.647f, 0.165f, 0.165f, 1.0f};
default:
CUBED_ASSERT_MSG(false, "Unknown Color");
ASSERT_MSG(false, "Unknown Color");
return vec4{1.0f, 1.0f, 1.0f, 1.0f};
}
@@ -63,3 +66,5 @@ inline glm::vec4 rgb255_to_float(int r, int g, int b, int a) {
return glm::vec4{nr, ng, nb, na};
}
}

View File

@@ -7,6 +7,8 @@
#include <Cubed/config.hpp>
#include <Cubed/ui/color.hpp>
namespace Cubed {
class Shader;
@@ -49,4 +51,6 @@ private:
void update_vertices();
void upload_to_gpu();
};
};
}