mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-16 22:32:25 +08:00

+ 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>
37 lines
820 B
C++
37 lines
820 B
C++
#ifndef WALLENGINE_MODEL_H
|
|
#define WALLENGINE_MODEL_H
|
|
|
|
#include <nlohmann/json.hpp>
|
|
#include <irrlicht/irrlicht.h>
|
|
|
|
#include <wallpaperengine/fs/utils.h>
|
|
#include <wallpaperengine/texture.h>
|
|
|
|
namespace wp
|
|
{
|
|
using json = nlohmann::json;
|
|
|
|
class image : public object3d
|
|
{
|
|
public:
|
|
image(json json_data, wp::object* parent);
|
|
irr::video::SMaterial& getMaterial ();
|
|
void setFlag(irr::video::E_MATERIAL_FLAG flag, bool newvalue);
|
|
void setType(irr::video::E_MATERIAL_TYPE newType);
|
|
void render ();
|
|
|
|
private:
|
|
bool m_visible;
|
|
|
|
irr::video::S3DVertex m_vertices [4];
|
|
irr::video::SMaterial m_material;
|
|
|
|
irr::io::path m_file;
|
|
std::string m_content;
|
|
|
|
std::vector<wp::texture*> m_textures;
|
|
};
|
|
};
|
|
|
|
#endif //WALLENGINE_MODEL_H
|