mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
refactor: warp everything in Cubed namespace
This commit is contained in:
@@ -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};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user