summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-11-03 18:22:44 -0400
committerpommicket <pommicket@gmail.com>2022-11-03 18:22:44 -0400
commit4d995edfdde5953bc5669c54b1194be40a3641f2 (patch)
treedf24530695859b1cf7b48ee2775f0b57a990edc4 /ted.h
parent1e49845629e93d4513b9388c524d7d1e0ac945f8 (diff)
better shader system
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/ted.h b/ted.h
index 0271d64..bbd2d48 100644
--- a/ted.h
+++ b/ted.h
@@ -143,6 +143,16 @@ 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)
+typedef struct {
+ u32 ref_count;
+ u32 shader;
+ u32 array;
+ u32 buffer;
+} GlRcSAB;
+
typedef struct {
SettingsContext context;
float cursor_blink_time_on, cursor_blink_time_off;
@@ -166,10 +176,9 @@ typedef struct {
u8 padding;
u8 scrolloff;
u8 tags_max_depth;
- u32 bg_shader;
- u32 bg_buffer;
- u32 bg_array;
+ GlRcSAB *bg_shader;
char bg_shader_text[4096];
+ char bg_shader_image[TED_PATH_MAX];
char build_default_command[256];
// [i] = comma-separated string of file extensions for language i, or NULL for none
char *language_extensions[LANG_COUNT];