summaryrefslogtreecommitdiff
path: root/ui.hpp
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-27 12:04:51 +1100
committerquou <quou@disroot.org>2024-12-27 12:04:51 +1100
commite8c93463b2ae5114f0c88e768e5625abac9d5a50 (patch)
tree3fc7b774eb9bf172fbcb95bb3a410093a5b5b856 /ui.hpp
parent0d2179f6beb7e11632b76dac0615e593cafaaf00 (diff)
3D maths
Diffstat (limited to 'ui.hpp')
-rw-r--r--ui.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui.hpp b/ui.hpp
index a181afe..c002fc9 100644
--- a/ui.hpp
+++ b/ui.hpp
@@ -1,6 +1,7 @@
#ifndef ui_hpp
#define ui_hpp
+#include "maths.hpp"
#include "video.hpp"
struct Arena;
@@ -33,13 +34,16 @@ struct UI {
Texture_Id atlas;
Shader_Id shader;
Vertex_Format_Id vertex_format;
- Buffer_Id mesh;
+ Buffer_Id mesh, config_buf;
Sampler_Id sampler;
+ struct UI_CBuffer {
+ m4f projection;
+ };
struct {
int vert_binding;
int atlas_binding;
+ int config_binding;
} shader_info;
- float ndc[2];
static int text_width(const char* t);
static int text_height(const char* t);