mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 15:30:00 +01:00
SourceCore to isolate core properties of a source
This commit is contained in:
@@ -82,73 +82,3 @@ void GarbageVisitor::visit(Primitive &n)
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(Surface &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(ImageSurface &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(FrameBufferSurface &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(MediaSurface &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(MediaPlayer &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(Shader &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(ImageShader &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(ImageProcessingShader &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(LineStrip &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(LineSquare &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(Mesh &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit(Frame &n)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void GarbageVisitor::visit (Source& s)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void GarbageVisitor::visit (MediaSource& s)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -24,23 +24,6 @@ public:
|
||||
void visit(Switch& n) override;
|
||||
void visit(Primitive& n) override;
|
||||
|
||||
void visit(Surface& n) override;
|
||||
void visit(ImageSurface& n) override;
|
||||
void visit(MediaSurface& n) override;
|
||||
void visit(FrameBufferSurface& n) override;
|
||||
void visit(LineStrip& n) override;
|
||||
void visit(LineSquare&) override;
|
||||
void visit(Mesh& n) override;
|
||||
void visit(Frame& n) override;
|
||||
|
||||
void visit(MediaPlayer& n) override;
|
||||
void visit(Shader& n) override;
|
||||
void visit(ImageShader& n) override;
|
||||
void visit(ImageProcessingShader& n) override;
|
||||
|
||||
void visit (Source& s) override;
|
||||
void visit (MediaSource& s) override;
|
||||
|
||||
};
|
||||
|
||||
#endif // GARBAGEVISITOR_H
|
||||
|
||||
@@ -395,7 +395,6 @@ void ImGuiVisitor::visit(ImageProcessingShader &n)
|
||||
ImGui::Spacing();
|
||||
}
|
||||
|
||||
|
||||
void ImGuiVisitor::visit (Source& s)
|
||||
{
|
||||
ImGui::PushID(std::to_string(s.id()).c_str());
|
||||
@@ -539,10 +538,6 @@ void ImGuiVisitor::visit (Source& s)
|
||||
s.processingShader()->accept(*this);
|
||||
}
|
||||
|
||||
// geometry direct control for DEBUG
|
||||
// s.groupNode(View::GEOMETRY)->accept(*this);
|
||||
// s.groupNode((View::Mode) Settings::application.current_view)->accept(*this);
|
||||
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,12 @@
|
||||
|
||||
#include "Source.h"
|
||||
|
||||
Source::Source(uint64_t id) : id_(id), initialized_(false), symbol_(nullptr), active_(true), locked_(false), need_update_(true), workspace_(STAGE)
|
||||
SourceCore::SourceCore() : processingshader_(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Source::Source(uint64_t id) : SourceCore(), id_(id), initialized_(false), symbol_(nullptr), active_(true), locked_(false), need_update_(true), workspace_(STAGE)
|
||||
{
|
||||
// create unique id
|
||||
if (id_ == 0)
|
||||
|
||||
19
Source.h
19
Source.h
@@ -23,7 +23,20 @@ class MixingGroup;
|
||||
|
||||
typedef std::list<CloneSource *> CloneList;
|
||||
|
||||
class Source
|
||||
class SourceCore
|
||||
{
|
||||
public:
|
||||
SourceCore();
|
||||
|
||||
protected:
|
||||
// nodes
|
||||
std::map<View::Mode, Group*> groups_;
|
||||
// image processing shaders
|
||||
ImageProcessingShader *processingshader_;
|
||||
|
||||
};
|
||||
|
||||
class Source : public SourceCore
|
||||
{
|
||||
friend class SourceLink;
|
||||
friend class CloneSource;
|
||||
@@ -210,8 +223,6 @@ protected:
|
||||
bool initialized_;
|
||||
virtual void init() = 0;
|
||||
|
||||
// nodes
|
||||
std::map<View::Mode, Group*> groups_;
|
||||
|
||||
// render() fills in the renderbuffer at every frame
|
||||
// NB: rendershader_ is applied at render()
|
||||
@@ -223,8 +234,6 @@ protected:
|
||||
FrameBufferSurface *rendersurface_;
|
||||
FrameBufferSurface *mixingsurface_;
|
||||
|
||||
// image processing shaders
|
||||
ImageProcessingShader *processingshader_;
|
||||
// pointer to the currently attached shader
|
||||
// (will be processingshader_ if image processing is enabled)
|
||||
Shader *renderingshader_;
|
||||
|
||||
Reference in New Issue
Block a user