gamma correction in post when there's no sRGB framebuffer and simple shader compositi...
[vrfileman] / src / sdr.h
index d411202..7bf2389 100644 (file)
--- a/src/sdr.h
+++ b/src/sdr.h
@@ -41,12 +41,26 @@ int set_uniform_float(unsigned int prog, const char *name, float val);
 int set_uniform_float2(unsigned int prog, const char *name, float x, float y);
 int set_uniform_float3(unsigned int prog, const char *name, float x, float y, float z);
 int set_uniform_float4(unsigned int prog, const char *name, float x, float y, float z, float w);
-int set_uniform_matrix4(unsigned int prog, const char *name, float *mat);
-int set_uniform_matrix4_transposed(unsigned int prog, const char *name, float *mat);
+int set_uniform_matrix4(unsigned int prog, const char *name, const float *mat);
+int set_uniform_matrix4_transposed(unsigned int prog, const char *name, const float *mat);
 
 int get_attrib_loc(unsigned int prog, const char *name);
 void set_attrib_float3(int attr_loc, float x, float y, float z);
 
+/* ---- shader composition ---- */
+
+/* clear shader header/footer text.
+ * pass the shader type to clear, or 0 to clear all types */
+void clear_shader_header(unsigned int type);
+void clear_shader_footer(unsigned int type);
+/* append text to the header/footer of a specific shader type
+ * or use type 0 to add it to all shade types */
+void add_shader_header(unsigned int type, const char *s);
+void add_shader_footer(unsigned int type, const char *s);
+/* get the current header/footer text for a specific shader type */
+const char *get_shader_header(unsigned int type);
+const char *get_shader_footer(unsigned int type);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */