nuclear@0: #ifndef _SDR_H_ nuclear@0: #define _SDR_H_ nuclear@0: nuclear@0: /* ---- shaders ---- */ nuclear@0: unsigned int create_vertex_shader(const char *src); nuclear@0: unsigned int create_pixel_shader(const char *src); nuclear@0: unsigned int create_shader(const char *src, unsigned int sdr_type); nuclear@0: void free_shader(unsigned int sdr); nuclear@0: nuclear@0: unsigned int load_vertex_shader(const char *fname); nuclear@0: unsigned int load_pixel_shader(const char *fname); nuclear@0: unsigned int load_shader(const char *src, unsigned int sdr_type); nuclear@0: nuclear@0: unsigned int get_vertex_shader(const char *fname); nuclear@0: unsigned int get_pixel_shader(const char *fname); nuclear@0: unsigned int get_shader(const char *fname, unsigned int sdr_type); nuclear@0: nuclear@0: int add_shader(const char *fname, unsigned int sdr); nuclear@0: int remove_shader(const char *fname); nuclear@0: nuclear@0: /* ---- gpu programs ---- */ nuclear@0: unsigned int create_program(void); nuclear@0: unsigned int create_program_link(unsigned int vs, unsigned int ps); nuclear@0: unsigned int create_program_load(const char *vfile, const char *pfile); nuclear@0: void free_program(unsigned int sdr); nuclear@0: nuclear@0: void attach_shader(unsigned int prog, unsigned int sdr); nuclear@0: int link_program(unsigned int prog); nuclear@0: int bind_program(unsigned int prog); nuclear@0: nuclear@0: int set_uniform_int(unsigned int prog, const char *name, int val); nuclear@0: int set_uniform_float(unsigned int prog, const char *name, float val); nuclear@0: nuclear@0: #endif /* _SDR_H_ */