mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 20:29:58 +01:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user