New Shader Source

Implementation of Shader GLSL code source; basically a source with an ImageFilter that contains GLSL code. Connected so Shader Editor (like clone sources).
This commit is contained in:
Bruno Herbelin
2025-02-23 22:58:26 +01:00
parent ea4615ea65
commit d01366d069
34 changed files with 1491 additions and 2174 deletions

View File

@@ -40,6 +40,7 @@
#include "SrtReceiverSource.h"
#include "MultiFileSource.h"
#include "TextSource.h"
#include "ShaderSource.h"
#include "Session.h"
#include "BaseToolkit.h"
#include "SystemToolkit.h"
@@ -524,3 +525,28 @@ void InfoVisitor::visit (TextSource& s)
information_ = oss.str();
current_id_ = s.id();
}
void InfoVisitor::visit (ShaderSource& s)
{
if (current_id_ == s.id())
return;
std::ostringstream oss;
ImageFilter *ft = s.filter();
if (ft) {
if (brief_) {
oss << "RGB, " << (int) ft->resolution().x << " x " << (int) ft->resolution().y;
}
else {
oss << "Shader code" << std::endl;
oss << "RGB" << std::endl;
oss << (int) ft->resolution().x << " x " << (int) ft->resolution().y;
}
}
else
oss << "Undefined";
information_ = oss.str();
current_id_ = s.id();
}