stereoplay

annotate 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
rev   line source
nuclear@0 1 #ifndef _SDR_H_
nuclear@0 2 #define _SDR_H_
nuclear@0 3
nuclear@0 4 /* ---- shaders ---- */
nuclear@0 5 unsigned int create_vertex_shader(const char *src);
nuclear@0 6 unsigned int create_pixel_shader(const char *src);
nuclear@0 7 unsigned int create_shader(const char *src, unsigned int sdr_type);
nuclear@0 8 void free_shader(unsigned int sdr);
nuclear@0 9
nuclear@0 10 unsigned int load_vertex_shader(const char *fname);
nuclear@0 11 unsigned int load_pixel_shader(const char *fname);
nuclear@0 12 unsigned int load_shader(const char *src, unsigned int sdr_type);
nuclear@0 13
nuclear@0 14 unsigned int get_vertex_shader(const char *fname);
nuclear@0 15 unsigned int get_pixel_shader(const char *fname);
nuclear@0 16 unsigned int get_shader(const char *fname, unsigned int sdr_type);
nuclear@0 17
nuclear@0 18 int add_shader(const char *fname, unsigned int sdr);
nuclear@0 19 int remove_shader(const char *fname);
nuclear@0 20
nuclear@0 21 /* ---- gpu programs ---- */
nuclear@0 22 unsigned int create_program(void);
nuclear@0 23 unsigned int create_program_link(unsigned int vs, unsigned int ps);
nuclear@0 24 unsigned int create_program_load(const char *vfile, const char *pfile);
nuclear@0 25 void free_program(unsigned int sdr);
nuclear@0 26
nuclear@0 27 void attach_shader(unsigned int prog, unsigned int sdr);
nuclear@0 28 int link_program(unsigned int prog);
nuclear@0 29 int bind_program(unsigned int prog);
nuclear@0 30
nuclear@0 31 int set_uniform_int(unsigned int prog, const char *name, int val);
nuclear@0 32 int set_uniform_float(unsigned int prog, const char *name, float val);
nuclear@0 33
nuclear@0 34 #endif /* _SDR_H_ */