X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fvulkan%2Fshader-vk.h;h=b9e46812bb6438673540cd7f1a5af25f0afccb7c;hb=c3d7c1b7f8a7f4bcfc7661b6baf166ce0648083a;hp=88e07bcb38a6719eef1052b052a021f06e22660c;hpb=72995482b98ff2a014ddd737131a0935ead89977;p=demo diff --git a/src/vulkan/shader-vk.h b/src/vulkan/shader-vk.h index 88e07bc..b9e4681 100644 --- a/src/vulkan/shader-vk.h +++ b/src/vulkan/shader-vk.h @@ -4,8 +4,10 @@ #include #include "shader.h" -class ShaderVK : public Shader -{ +/* each shader program will correspond to a pipeline. The pipeline + * must have the cull, zbuffer etc since they can't be dynamic states */ + +class ShaderVK : public Shader { protected: SType type; std::string name; @@ -13,23 +15,28 @@ protected: virtual bool create(char *buf, unsigned int bsz, const char *fname) override; public: + VkShaderModule sm; + ShaderVK(); virtual ~ShaderVK(); - virtual bool load(const char *fname, SType type); + virtual bool load(const char *fname, SType type) override; virtual void destroy() override; }; class ShaderProgramVK : public ShaderProgram { +private: + VkPipeline gpipeline; + protected: - /*ubo*/ public: ShaderProgramVK(); virtual ~ShaderProgramVK(); virtual bool create() override; + virtual bool use() const override; virtual bool link() override; virtual void destroy() override; @@ -49,4 +56,4 @@ public: virtual void set_uniform_matrix(int location, const Mat4 &mat) override; }; -#endif // SHADER_VK_H_ \ No newline at end of file +#endif // SHADER_VK_H_