stereoplay

view src/sdr.h @ 2:fd671d488cfd

cleanup of the hacks
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 03 Nov 2011 21:45:59 +0200
parents
children acf3d25f23cb
line source
1 #ifndef _SDR_H_
2 #define _SDR_H_
4 /* ---- shaders ---- */
5 unsigned int create_vertex_shader(const char *src);
6 unsigned int create_pixel_shader(const char *src);
7 unsigned int create_shader(const char *src, unsigned int sdr_type);
8 void free_shader(unsigned int sdr);
10 unsigned int load_vertex_shader(const char *fname);
11 unsigned int load_pixel_shader(const char *fname);
12 unsigned int load_shader(const char *src, unsigned int sdr_type);
14 unsigned int get_vertex_shader(const char *fname);
15 unsigned int get_pixel_shader(const char *fname);
16 unsigned int get_shader(const char *fname, unsigned int sdr_type);
18 int add_shader(const char *fname, unsigned int sdr);
19 int remove_shader(const char *fname);
21 /* ---- gpu programs ---- */
22 unsigned int create_program(void);
23 unsigned int create_program_link(unsigned int vs, unsigned int ps);
24 unsigned int create_program_load(const char *vfile, const char *pfile);
25 void free_program(unsigned int sdr);
27 void attach_shader(unsigned int prog, unsigned int sdr);
28 int link_program(unsigned int prog);
29 int bind_program(unsigned int prog);
31 int set_uniform_int(unsigned int prog, const char *name, int val);
32 int set_uniform_float(unsigned int prog, const char *name, float val);
34 #endif /* _SDR_H_ */