X-Git-Url: https://eleni.mutantstargoat.com/git/?p=demo;a=blobdiff_plain;f=src%2Fshader.h;fp=src%2Fshader.h;h=5a79b7fbfd8027c671ec028eb8ad2aa4e7d3116d;hp=6e9509a141101de204910ee3d6d4b19dfcdd1139;hb=05d269a194496bcef85da78652b947f5bf1c9bcf;hpb=6cecb8f16f1863496884ca86790375dbb27138ba diff --git a/src/shader.h b/src/shader.h index 6e9509a..5a79b7f 100644 --- a/src/shader.h +++ b/src/shader.h @@ -37,16 +37,9 @@ public: /* Shader Program */ -struct Uniform { - int location; - std::string name; - int state_idx; -}; - class ShaderProgram { protected: Shader *shaders[2]; - std::vector uniforms; public: ShaderProgram(); @@ -57,25 +50,6 @@ public: virtual bool use() const = 0; virtual void destroy() = 0; virtual void attach_shader(Shader *shader) = 0; - - /* - THIS PART MIGHT NEED SEVERAL CHANGES: on vulkan we set the uniforms - using descriptor sets. The current design is suitable for OpenGL and - it *might* have to be rewritten to work with both APIs later - */ - virtual int get_uniform_location(const char *name) const = 0; - - virtual void set_uniformi(int location, int value) = 0; - virtual void set_uniformi(int location, int x, int y) = 0; - virtual void set_uniformi(int location, int x, int y, int z) = 0; - virtual void set_uniformi(int location, int x, int y, int z, int w) = 0; - - virtual void set_uniformf(int location, float value) = 0; - virtual void set_uniformf(int location, float x, float y) = 0; - virtual void set_uniformf(int location, float x, float y, float z) = 0; - virtual void set_uniformf(int location, float x, float y, float z, float w) = 0; - - virtual void set_uniform_matrix(int location, const Mat4 &mat) = 0; }; #endif // SHADER_H_