rev |
line source |
nuclear@4
|
1 /*
|
nuclear@4
|
2 Stereoplay - an OpenGL stereoscopic video player.
|
nuclear@4
|
3 Copyright (C) 2011 John Tsiombikas <nuclear@member.fsf.org>
|
nuclear@4
|
4
|
nuclear@4
|
5 This program is free software: you can redistribute it and/or modify
|
nuclear@4
|
6 it under the terms of the GNU General Public License as published by
|
nuclear@4
|
7 the Free Software Foundation, either version 3 of the License, or
|
nuclear@4
|
8 (at your option) any later version.
|
nuclear@4
|
9
|
nuclear@4
|
10 This program is distributed in the hope that it will be useful,
|
nuclear@4
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
nuclear@4
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
nuclear@4
|
13 GNU General Public License for more details.
|
nuclear@4
|
14
|
nuclear@4
|
15 You should have received a copy of the GNU General Public License
|
nuclear@4
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
|
nuclear@4
|
17 */
|
nuclear@4
|
18
|
nuclear@0
|
19 #ifndef _SDR_H_
|
nuclear@0
|
20 #define _SDR_H_
|
nuclear@0
|
21
|
nuclear@0
|
22 /* ---- shaders ---- */
|
nuclear@0
|
23 unsigned int create_vertex_shader(const char *src);
|
nuclear@0
|
24 unsigned int create_pixel_shader(const char *src);
|
nuclear@0
|
25 unsigned int create_shader(const char *src, unsigned int sdr_type);
|
nuclear@0
|
26 void free_shader(unsigned int sdr);
|
nuclear@0
|
27
|
nuclear@0
|
28 unsigned int load_vertex_shader(const char *fname);
|
nuclear@0
|
29 unsigned int load_pixel_shader(const char *fname);
|
nuclear@0
|
30 unsigned int load_shader(const char *src, unsigned int sdr_type);
|
nuclear@0
|
31
|
nuclear@0
|
32 unsigned int get_vertex_shader(const char *fname);
|
nuclear@0
|
33 unsigned int get_pixel_shader(const char *fname);
|
nuclear@0
|
34 unsigned int get_shader(const char *fname, unsigned int sdr_type);
|
nuclear@0
|
35
|
nuclear@0
|
36 int add_shader(const char *fname, unsigned int sdr);
|
nuclear@0
|
37 int remove_shader(const char *fname);
|
nuclear@0
|
38
|
nuclear@0
|
39 /* ---- gpu programs ---- */
|
nuclear@0
|
40 unsigned int create_program(void);
|
nuclear@0
|
41 unsigned int create_program_link(unsigned int vs, unsigned int ps);
|
nuclear@0
|
42 unsigned int create_program_load(const char *vfile, const char *pfile);
|
nuclear@0
|
43 void free_program(unsigned int sdr);
|
nuclear@0
|
44
|
nuclear@0
|
45 void attach_shader(unsigned int prog, unsigned int sdr);
|
nuclear@0
|
46 int link_program(unsigned int prog);
|
nuclear@0
|
47 int bind_program(unsigned int prog);
|
nuclear@0
|
48
|
nuclear@0
|
49 int set_uniform_int(unsigned int prog, const char *name, int val);
|
nuclear@0
|
50 int set_uniform_float(unsigned int prog, const char *name, float val);
|
nuclear@0
|
51
|
nuclear@0
|
52 #endif /* _SDR_H_ */
|