summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-11-03 19:48:26 -0400
committerpommicket <pommicket@gmail.com>2022-11-03 19:48:26 -0400
commit7a2b3ea8c13657ef697d0b4dc73ccada23f81039 (patch)
tree0b3702b9bce4536047525d2f472a937d6e06d039 /ted.h
parent4d995edfdde5953bc5669c54b1194be40a3641f2 (diff)
custom shader texture
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/ted.h b/ted.h
index bbd2d48..3db5a3c 100644
--- a/ted.h
+++ b/ted.h
@@ -143,9 +143,21 @@ typedef struct {
char *path; // these settings apply to all paths which start with this string, or all paths if path=NULL
} SettingsContext;
-// shader-array-buffer combo.
// need to use refcounting for this because of Settings.
-// (we copy parent settings to children)
+// => we copy parent settings to children
+// e.g.
+// [core]
+// bg-texture = "blablabla.png"
+// [Javascript.core]
+// some random shit
+// the main Settings' bg_texture will get copied to javascript's Settings,
+// so we need to be extra careful about when we delete textures.
+typedef struct {
+ u32 ref_count;
+ u32 texture;
+} GlRcTexture;
+
+// shader-array-buffer combo.
typedef struct {
u32 ref_count;
u32 shader;
@@ -177,6 +189,7 @@ typedef struct {
u8 scrolloff;
u8 tags_max_depth;
GlRcSAB *bg_shader;
+ GlRcTexture *bg_texture;
char bg_shader_text[4096];
char bg_shader_image[TED_PATH_MAX];
char build_default_command[256];