Lagrangian Liquid Simulation
Master Thesis project on simulation of liquids using Lagrangian approach and SPH
|
00001 #ifndef SHADERLIBRARY_H 00002 #define SHADERLIBRARY_H 00003 00004 #include "ngl/ShaderManager.h" 00005 #include "ngl/Camera.h" 00006 #include "ngl/Colour.h" 00007 00017 00018 class ShaderLibrary 00019 { 00020 public: 00022 ShaderLibrary(); 00023 00025 inline ~ShaderLibrary() { std::cout << "Shader Library deleted\n" << std::endl; } 00026 00029 void updateView(ngl::Camera* _cam); 00030 00033 void updateProjection(ngl::Camera* _cam); 00034 00037 void updateViewProjection(ngl::Camera* _cam); 00038 00041 void updateModel(const ngl::Matrix _matrix); 00042 00047 void updateModel 00048 ( 00049 const std::string _name, 00050 const ngl::Matrix _matrix, 00051 const bool _exclusive = true 00052 ); 00053 00058 void updateColor 00059 ( 00060 const std::string _name, 00061 const ngl::Colour _colour, 00062 const bool _exclusive = true 00063 ); 00064 00071 void updateModelColor 00072 ( 00073 const std::string _name, 00074 const ngl::Matrix _matrix, 00075 const ngl::Colour _colour, 00076 const bool _reset = true, 00077 const bool _exclusive = true 00078 ); 00079 00082 inline void useShader(const std::string _name) { m_shaders->useShader(_name); } 00083 00084 private: 00086 ngl::ShaderManager* m_shaders; 00087 00089 std::vector<std::string> m_names; 00090 00091 }; 00092 00093 #endif // SHADERLIBRARY_H