effect.h 756 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef WALLENGINE_EFFECT_H
  2. #define WALLENGINE_EFFECT_H
  3. #include <nlohmann/json.hpp>
  4. #include <irrlicht/irrlicht.h>
  5. #include "texture.h"
  6. namespace wp
  7. {
  8. using json = nlohmann::json;
  9. class effect : public irr::video::IShaderConstantSetCallBack
  10. {
  11. public:
  12. effect (json json_data);
  13. virtual void OnSetConstants (irr::video::IMaterialRendererServices* services, int32_t userData);
  14. std::vector <wp::texture*>& getTextureList ();
  15. irr::s32 getMaterialType ();
  16. private:
  17. std::vector <wp::texture*> m_textures;
  18. std::string m_content;
  19. json m_json;
  20. irr::io::path m_file;
  21. irr::s32 m_materialType;
  22. std::vector<void*> m_passes;
  23. };
  24. }
  25. #endif //WALLENGINE_EFFECT_H