6 class ShaderGL : public Shader {
8 /* bsz for vulkan, in opengl buf is 0 terminated */
9 virtual bool create(char *buf, unsigned int bsz, const char *fname);
17 virtual void destroy() override;
20 class ShaderProgramGL : public ShaderProgram {
27 virtual ~ShaderProgramGL();
29 virtual void cache_uniforms() override;
30 virtual void delete_shaders() override;
32 virtual bool link() override;
33 virtual bool use() override;
34 virtual bool create() override;
35 virtual void destroy() override;
36 virtual void attach_shader(Shader *shader) override;
38 int get_uniform_location(const char *name) const;
39 int get_attribute_location(const char *name) const;
41 virtual void set_uniformi(int location, int value) override;
42 virtual void set_uniformi(int location, int x, int y) override;
43 virtual void set_uniformi(int location, int x, int y, int z) override;
44 virtual void set_uniformi(int location, int x, int y, int z, int w) override;
46 virtual void set_uniformf(int location, float value) override;
47 virtual void set_uniformf(int location, float x, float y) override;
48 virtual void set_uniformf(int location, float x, float y, float z) override;
49 virtual void set_uniformf(int location, float x, float y, float z, float w) override;
51 virtual void set_uniform_matrix(int location, const Mat4 &mat) override;
54 #endif // SHADER_GL_H_