stereoplay

diff src/sdr.h @ 0:265a24704ff2

stereoplay
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 06 Mar 2011 20:31:18 +0200
parents
children acf3d25f23cb
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/sdr.h	Sun Mar 06 20:31:18 2011 +0200
     1.3 @@ -0,0 +1,34 @@
     1.4 +#ifndef _SDR_H_
     1.5 +#define _SDR_H_
     1.6 +
     1.7 +/* ---- shaders ---- */
     1.8 +unsigned int create_vertex_shader(const char *src);
     1.9 +unsigned int create_pixel_shader(const char *src);
    1.10 +unsigned int create_shader(const char *src, unsigned int sdr_type);
    1.11 +void free_shader(unsigned int sdr);
    1.12 +
    1.13 +unsigned int load_vertex_shader(const char *fname);
    1.14 +unsigned int load_pixel_shader(const char *fname);
    1.15 +unsigned int load_shader(const char *src, unsigned int sdr_type);
    1.16 +
    1.17 +unsigned int get_vertex_shader(const char *fname);
    1.18 +unsigned int get_pixel_shader(const char *fname);
    1.19 +unsigned int get_shader(const char *fname, unsigned int sdr_type);
    1.20 +
    1.21 +int add_shader(const char *fname, unsigned int sdr);
    1.22 +int remove_shader(const char *fname);
    1.23 +
    1.24 +/* ---- gpu programs ---- */
    1.25 +unsigned int create_program(void);
    1.26 +unsigned int create_program_link(unsigned int vs, unsigned int ps);
    1.27 +unsigned int create_program_load(const char *vfile, const char *pfile);
    1.28 +void free_program(unsigned int sdr);
    1.29 +
    1.30 +void attach_shader(unsigned int prog, unsigned int sdr);
    1.31 +int link_program(unsigned int prog);
    1.32 +int bind_program(unsigned int prog);
    1.33 +
    1.34 +int set_uniform_int(unsigned int prog, const char *name, int val);
    1.35 +int set_uniform_float(unsigned int prog, const char *name, float val);
    1.36 +
    1.37 +#endif	/* _SDR_H_ */