linux-wallpaperengine/wallpaperengine/effect.h
Alexis Maiquez 2be1bffb6f - Removed all the contents of the res folder as those weren't needed anymore
+ Added basic, single-pass-effects parsing
- Removed duplicated code for effect parsing
+ Added support for shader loading and applying to materials (might not work with every shader, still needs some more investigation)
+ Added support for TEXB0001 containers to be able to load images from the wallpaperengine original files

Signed-off-by: Alexis Maiquez <almamu@almamu.com>
2019-04-05 08:34:53 +02:00

34 lines
756 B
C++

#ifndef WALLENGINE_EFFECT_H
#define WALLENGINE_EFFECT_H
#include <nlohmann/json.hpp>
#include <irrlicht/irrlicht.h>
#include "texture.h"
namespace wp
{
using json = nlohmann::json;
class effect : public irr::video::IShaderConstantSetCallBack
{
public:
effect (json json_data);
virtual void OnSetConstants (irr::video::IMaterialRendererServices* services, int32_t userData);
std::vector <wp::texture*>& getTextureList ();
irr::s32 getMaterialType ();
private:
std::vector <wp::texture*> m_textures;
std::string m_content;
json m_json;
irr::io::path m_file;
irr::s32 m_materialType;
std::vector<void*> m_passes;
};
}
#endif //WALLENGINE_EFFECT_H