Compilation fix

This commit is contained in:
Bruno
2022-05-18 12:50:07 +02:00
parent 852a8d04c9
commit cc69baf0dd
4 changed files with 9 additions and 5 deletions

View File

@@ -20,7 +20,7 @@ public:
inline double delay() const { return delay_; }
// implementation of FrameBufferFilter
Type type() const { return FrameBufferFilter::FILTER_DELAY; }
Type type() const override { return FrameBufferFilter::FILTER_DELAY; }
uint texture () const override;
glm::vec3 resolution () const override;
void update (float dt) override;

View File

@@ -56,7 +56,7 @@ public:
PassthroughFilter();
// implementation of FrameBufferFilter
Type type() const { return FrameBufferFilter::FILTER_PASSTHROUGH; }
Type type() const override { return FrameBufferFilter::FILTER_PASSTHROUGH; }
uint texture() const override;
glm::vec3 resolution() const override;
};

View File

@@ -34,6 +34,7 @@ public:
bool operator!= (const FilteringProgram& other) const;
// get the name
inline void setName(const std::string &name) { name_ = name; }
inline std::string name() const { return name_; }
// set the code
@@ -85,7 +86,7 @@ public:
FilteringProgram program() const;
// implementation of FrameBufferFilter
Type type() const { return FrameBufferFilter::FILTER_IMAGE; }
Type type() const override { return FrameBufferFilter::FILTER_IMAGE; }
uint texture () const override;
glm::vec3 resolution () const override;
void update (float dt) override;

View File

@@ -5386,6 +5386,9 @@ void ShaderEditor::Render()
// set the code of the current filter
filters_[current_].setCode( { _editor.GetText(), "" } );
// filter changed, cannot be named as before
filters_[current_].setName("Custom");
// change the filter of the current image filter
// => this triggers compilation of shader
compilation_ = new std::promise<std::string>();
@@ -5394,7 +5397,6 @@ void ShaderEditor::Render()
// inform status
status_ = "Building...";
}
}
}
@@ -5462,8 +5464,9 @@ void ShaderEditor::Render()
// set code for this clone
filters_[c] = i->program();
}
}
else
status_ = "No shader";
}
else
status_ = "No shader";