X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vrfileman;a=blobdiff_plain;f=src%2Fsdr.h;fp=src%2Fsdr.h;h=7bf23893c27113a7128cd08dee24e507e28ef2f9;hp=d41120228974f7ca7f196ffa51fbc9b62957f242;hb=7c59a70219aa7bcf80291f41903a9e6fc9b6e073;hpb=5e07bfd4d034dc3d974c8db008c6446e62838d39 diff --git a/src/sdr.h b/src/sdr.h index d411202..7bf2389 100644 --- 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 */