From 9269db45cc75ef9ad6eba388fdc0eeb780f69975 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Wed, 5 Nov 2008 04:39:57 +0100 Subject: [PATCH] WIP rename class Processor to RenderGraph (engine) --- src/proc/Makefile.am | 28 +++++++++---------- src/proc/control/pathmanager.cpp | 8 +----- src/proc/control/pathmanager.hpp | 3 +- src/proc/engine/renderengine.cpp | 11 ++------ src/proc/engine/renderengine.hpp | 12 ++++---- .../engine/{processor.cpp => rendergraph.cpp} | 7 ++--- .../engine/{processor.hpp => rendergraph.hpp} | 10 +++---- src/proc/mobject/builder/nodecreatortool.hpp | 8 +++--- src/proc/mobject/builder/toolfactory.cpp | 6 ++-- src/proc/mobject/builder/toolfactory.hpp | 6 ++-- 10 files changed, 41 insertions(+), 58 deletions(-) rename src/proc/engine/{processor.cpp => rendergraph.cpp} (87%) rename src/proc/engine/{processor.hpp => rendergraph.hpp} (82%) diff --git a/src/proc/Makefile.am b/src/proc/Makefile.am index d9988c42f..4d564794b 100644 --- a/src/proc/Makefile.am +++ b/src/proc/Makefile.am @@ -64,19 +64,19 @@ noinst_LTLIBRARIES += liblumiprocengine.la liblumiprocengine_la_CFLAGS = $(AM_CFLAGS) -std=gnu99 -Wall -Wextra -Werror liblumiprocengine_la_CXXFLAGS = $(AM_CXXFLAGS) -Wall -Wextra -liblumiprocengine_la_SOURCES = \ - $(liblumiprocengine_la_srcdir)/buffhandle.cpp \ - $(liblumiprocengine_la_srcdir)/link.cpp \ - $(liblumiprocengine_la_srcdir)/mask.cpp \ - $(liblumiprocengine_la_srcdir)/nodefactory.cpp \ - $(liblumiprocengine_la_srcdir)/nodewiring.cpp \ - $(liblumiprocengine_la_srcdir)/pluginadapter.cpp \ - $(liblumiprocengine_la_srcdir)/processor.cpp \ - $(liblumiprocengine_la_srcdir)/procnode.cpp \ - $(liblumiprocengine_la_srcdir)/projector.cpp \ - $(liblumiprocengine_la_srcdir)/renderengine.cpp \ - $(liblumiprocengine_la_srcdir)/source.cpp \ - $(liblumiprocengine_la_srcdir)/stateproxy.cpp \ +liblumiprocengine_la_SOURCES = \ + $(liblumiprocengine_la_srcdir)/buffhandle.cpp \ + $(liblumiprocengine_la_srcdir)/link.cpp \ + $(liblumiprocengine_la_srcdir)/mask.cpp \ + $(liblumiprocengine_la_srcdir)/nodefactory.cpp \ + $(liblumiprocengine_la_srcdir)/nodewiring.cpp \ + $(liblumiprocengine_la_srcdir)/pluginadapter.cpp \ + $(liblumiprocengine_la_srcdir)/rendergraph.cpp \ + $(liblumiprocengine_la_srcdir)/procnode.cpp \ + $(liblumiprocengine_la_srcdir)/projector.cpp \ + $(liblumiprocengine_la_srcdir)/renderengine.cpp \ + $(liblumiprocengine_la_srcdir)/source.cpp \ + $(liblumiprocengine_la_srcdir)/stateproxy.cpp \ $(liblumiprocengine_la_srcdir)/trafo.cpp @@ -203,7 +203,7 @@ noinst_HEADERS += \ $(liblumiproc_la_srcdir)/engine/renderengine.hpp \ $(liblumiproc_la_srcdir)/engine/source.hpp \ $(liblumiproc_la_srcdir)/engine/trafo.hpp \ - $(liblumiproc_la_srcdir)/engine/processor.hpp \ + $(liblumiproc_la_srcdir)/engine/rendergraph.hpp \ $(liblumiproc_la_srcdir)/mobject/builder/assembler.hpp \ $(liblumiproc_la_srcdir)/mobject/builder/buildertool.hpp \ $(liblumiproc_la_srcdir)/mobject/builder/conmanager.hpp \ diff --git a/src/proc/control/pathmanager.cpp b/src/proc/control/pathmanager.cpp index cf2a01a25..6c2288a28 100644 --- a/src/proc/control/pathmanager.cpp +++ b/src/proc/control/pathmanager.cpp @@ -27,13 +27,7 @@ namespace control { - engine::Processor * - PathManager::buildProcessor () - { - UNIMPLEMENTED ("build a complete processor and optimize render path"); - return 0;//////////////////TODO - } - + /** */ } // namespace control diff --git a/src/proc/control/pathmanager.hpp b/src/proc/control/pathmanager.hpp index 355c500dd..c3057944f 100644 --- a/src/proc/control/pathmanager.hpp +++ b/src/proc/control/pathmanager.hpp @@ -24,7 +24,6 @@ #ifndef CONTROL_PATHMANAGER_H #define CONTROL_PATHMANAGER_H -#include "proc/engine/processor.hpp" @@ -39,7 +38,7 @@ namespace control { class PathManager { public: - engine::Processor* buildProcessor () ; + // TODO: find out about public interface // TODO: allocation, GC?? }; diff --git a/src/proc/engine/renderengine.cpp b/src/proc/engine/renderengine.cpp index daa7084ca..25eb6257d 100644 --- a/src/proc/engine/renderengine.cpp +++ b/src/proc/engine/renderengine.cpp @@ -23,17 +23,10 @@ #include "proc/engine/renderengine.hpp" -namespace engine - { +namespace engine { - - /** - * TODO: will probably be handled differently (see Cehteh) - */ - void - RenderEngine::play () - {} + /** */ diff --git a/src/proc/engine/renderengine.hpp b/src/proc/engine/renderengine.hpp index 121d0618c..1c361c739 100644 --- a/src/proc/engine/renderengine.hpp +++ b/src/proc/engine/renderengine.hpp @@ -26,7 +26,7 @@ #include -#include "proc/engine/processor.hpp" +#include "proc/engine/rendergraph.hpp" using std::list; @@ -36,16 +36,14 @@ namespace engine { - class RenderEngine : public Processor + class RenderEngine : public RenderGraph { public: - /** - * TODO: will probably be handled differently (see Cehteh) - */ - void play () ; + ///// TODO: find out about the public operations + // note: the play controller lives in the backend private: - list renderSegments; + list renderSegments; }; diff --git a/src/proc/engine/processor.cpp b/src/proc/engine/rendergraph.cpp similarity index 87% rename from src/proc/engine/processor.cpp rename to src/proc/engine/rendergraph.cpp index 38ed34c5d..a031deb70 100644 --- a/src/proc/engine/processor.cpp +++ b/src/proc/engine/rendergraph.cpp @@ -1,5 +1,5 @@ /* - Processor - a single render pipeline for one segment of the timeline + RenderGraph - render network corresponding to one segment of the timeline Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -21,11 +21,10 @@ * *****************************************************/ -#include "proc/engine/processor.hpp" +#include "proc/engine/rendergraph.hpp" #include "proc/state.hpp" -namespace engine - { +namespace engine { /** */ diff --git a/src/proc/engine/processor.hpp b/src/proc/engine/rendergraph.hpp similarity index 82% rename from src/proc/engine/processor.hpp rename to src/proc/engine/rendergraph.hpp index f9bb7b164..6fdb28217 100644 --- a/src/proc/engine/processor.hpp +++ b/src/proc/engine/rendergraph.hpp @@ -1,5 +1,5 @@ /* - PROCESSOR.hpp - a single render pipeline for one segment of the timeline + RENDERGRAPH.hpp - render network corresponding to one segment of the timeline Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -21,8 +21,8 @@ */ -#ifndef ENGINE_PROCESSOR_H -#define ENGINE_PROCESSOR_H +#ifndef ENGINE_RENDERGRAPH_H +#define ENGINE_RENDERGRAPH_H #include "proc/common.hpp" #include "proc/state.hpp" @@ -34,12 +34,12 @@ namespace engine class ExitNode; - class Processor + class RenderGraph { protected: ExitNode * output; - /** begin of the timerange covered by this processor */ + /** begin of the timerange covered by this RenderGraph */ lumiera::Time start; /**end (exclusive) of the timerange */ diff --git a/src/proc/mobject/builder/nodecreatortool.hpp b/src/proc/mobject/builder/nodecreatortool.hpp index 0c99cd2f9..f39fefb61 100644 --- a/src/proc/mobject/builder/nodecreatortool.hpp +++ b/src/proc/mobject/builder/nodecreatortool.hpp @@ -27,7 +27,7 @@ #include "proc/mobject/builder/applicablebuildertargettypes.hpp" -#include "proc/engine/processor.hpp" +#include "proc/engine/rendergraph.hpp" #include "proc/mobject/builder/toolfactory.hpp" @@ -49,12 +49,12 @@ namespace mobject { { ToolFactory& toolKit_; - /** holds the Processor (Render Engine Element) + /** holds the RenderGraph (Render Engine Element) * to be built by the current build step */ - engine::Processor& proc_; + engine::RenderGraph& proc_; - NodeCreatorTool (ToolFactory& tofa, engine::Processor& proc) + NodeCreatorTool (ToolFactory& tofa, engine::RenderGraph& proc) : toolKit_(tofa), proc_(proc) { } diff --git a/src/proc/mobject/builder/toolfactory.cpp b/src/proc/mobject/builder/toolfactory.cpp index 95c3627a4..79a305142 100644 --- a/src/proc/mobject/builder/toolfactory.cpp +++ b/src/proc/mobject/builder/toolfactory.cpp @@ -36,7 +36,7 @@ namespace mobject { { session::Fixture & fixedTimeline_; - std::auto_ptr procSegment_; /////////////////TODO consider renaming Processor + std::auto_ptr procSegment_; boost::scoped_ptr segmentation_; boost::scoped_ptr fabrication_; @@ -44,7 +44,7 @@ namespace mobject { BuildProcessState (session::Fixture& theTimeline) : fixedTimeline_(theTimeline), - procSegment_(new engine::Processor()) + procSegment_(new engine::RenderGraph()) { } }; @@ -79,7 +79,7 @@ namespace mobject { } - std::auto_ptr + std::auto_ptr ToolFactory::getProduct () { state_->segmentation_.reset(0); diff --git a/src/proc/mobject/builder/toolfactory.hpp b/src/proc/mobject/builder/toolfactory.hpp index 8c0cfbfed..aac40e827 100644 --- a/src/proc/mobject/builder/toolfactory.hpp +++ b/src/proc/mobject/builder/toolfactory.hpp @@ -28,7 +28,7 @@ #include "proc/mobject/builder/segmentationtool.hpp" #include "proc/mobject/builder/nodecreatortool.hpp" #include "proc/mobject/builder/mould.hpp" -#include "proc/engine/processor.hpp" +#include "proc/engine/rendergraph.hpp" #include @@ -58,12 +58,12 @@ namespace mobject { /** prepare a tool for properly segmenting the Fixture */ SegmentationTool & configureSegmentation (); - /** prepare a tool for building the processor for a single segment */ + /** prepare a tool for building the render engine (graph) for a single segment */ NodeCreatorTool & configureFabrication (); /** receive the finished product of the build process; effectively * releases any other builder tool object */ - std::auto_ptr getProduct (); + std::auto_ptr getProduct (); };