Minimally operational Shader editor

Can edit code in GLSL, syntax highlighted, and compile shader. Compatible with ShaderToy code.
This commit is contained in:
Bruno Herbelin
2022-04-23 01:02:31 +02:00
parent 9d7f0b22f7
commit 77dc563219
8 changed files with 212 additions and 141 deletions

View File

@@ -28,6 +28,10 @@ public:
// get the code of the filter
inline std::string code() const { return code_; }
// global
static std::string getFilterCodeInputs();
static std::string getFilterCodeDefault();
};
@@ -59,7 +63,7 @@ public:
uint getOutputTexture() const;
// set the code of the filter
void setFilter(const ImageFilter &f);
void setFilter(const ImageFilter &f, std::promise<std::string> *ret = nullptr);
// get the code of the filter
inline ImageFilter filter() const { return filter_; }