projects
/
demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed the OpenGL part and the GLSL shaders to use UBO and
[demo]
/
src
/
opengl
/
shader-gl.h
diff --git
a/src/opengl/shader-gl.h
b/src/opengl/shader-gl.h
index
a147c5d
..
4ee4a57
100644
(file)
--- a/
src/opengl/shader-gl.h
+++ b/
src/opengl/shader-gl.h
@@
-6,29
+6,31
@@
class ShaderGL : public Shader {
protected:
/* bsz for vulkan, in opengl buf is 0 terminated */
class ShaderGL : public Shader {
protected:
/* bsz for vulkan, in opengl buf is 0 terminated */
- unsigned int sdr;
virtual bool create(char *buf, unsigned int bsz, const char *fname);
public:
virtual bool create(char *buf, unsigned int bsz, const char *fname);
public:
+ unsigned int sdr;
+
ShaderGL();
virtual ~ShaderGL();
ShaderGL();
virtual ~ShaderGL();
- virtual void destroy();
- virtual void attach(unsigned int prog);
+ virtual void destroy() override;
};
class ShaderProgramGL : public ShaderProgram {
protected:
unsigned int prog;
};
class ShaderProgramGL : public ShaderProgram {
protected:
unsigned int prog;
+ bool is_linked;
public:
ShaderProgramGL();
virtual ~ShaderProgramGL();
public:
ShaderProgramGL();
virtual ~ShaderProgramGL();
- void destroy();
- void delete_shaders();
- virtual bool link();
- virtual bool load(const char *vfname, const char *ffname);
+ virtual bool link() override;
+ virtual bool use() const override;
+ virtual bool create() override;
+ virtual void destroy() override;
+ virtual void attach_shader(Shader *shader) override;
};
};
-#endif // SHADER_GL_H_
\ No newline at end of file
+#endif // SHADER_GL_H_