rereading (and rewrapping) the builder/engine code...
started this a long time ago, then got sidelined....
This commit is contained in:
parent
ee56ab36a0
commit
8802beb753
7 changed files with 64 additions and 45 deletions
|
|
@ -24,10 +24,10 @@
|
||||||
#include "proc/engine/renderengine.hpp"
|
#include "proc/engine/renderengine.hpp"
|
||||||
|
|
||||||
namespace engine {
|
namespace engine {
|
||||||
|
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace engine
|
} // namespace engine
|
||||||
|
|
|
||||||
|
|
@ -32,19 +32,26 @@
|
||||||
using std::list;
|
using std::list;
|
||||||
|
|
||||||
|
|
||||||
namespace engine
|
namespace engine {
|
||||||
{
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo this is planned to become the frontend
|
||||||
|
* to the render node network, which can be considered
|
||||||
|
* at the lower end of the middle layer; the actual
|
||||||
|
* render operations are mostly implemented by the backend
|
||||||
|
* ////////TODO WIP as of 12/2010
|
||||||
|
*/
|
||||||
class RenderEngine : public RenderGraph
|
class RenderEngine : public RenderGraph
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
///// TODO: find out about the public operations
|
///// TODO: find out about the public operations
|
||||||
// note: the play controller lives in the backend
|
// note: the play controller lives in the proc-layer,
|
||||||
|
// but is a subsystem separate of the sesison.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
list<RenderGraph> renderSegments;
|
list<RenderGraph> renderSegments;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace engine
|
} // namespace engine
|
||||||
|
|
|
||||||
|
|
@ -26,17 +26,17 @@
|
||||||
#include "proc/state.hpp"
|
#include "proc/state.hpp"
|
||||||
|
|
||||||
namespace lumiera {
|
namespace lumiera {
|
||||||
|
|
||||||
/** storage for the unique node-ID counter */
|
/** storage for the unique node-ID counter */
|
||||||
ulong NodeID::currID (0);
|
ulong NodeID::currID (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace engine {
|
namespace engine {
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace engine
|
} // namespace engine
|
||||||
|
|
|
||||||
|
|
@ -29,25 +29,27 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace engine
|
namespace engine {
|
||||||
{
|
|
||||||
|
|
||||||
class ExitNode;
|
class ExitNode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo likely to be reworked into the engine backbone /////////////TODO WIP as of 12/2010
|
||||||
|
*/
|
||||||
class RenderGraph
|
class RenderGraph
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
ExitNode * output;
|
ExitNode * output;
|
||||||
|
|
||||||
/** begin of the timerange covered by this RenderGraph */
|
/** begin of the timerange covered by this RenderGraph */
|
||||||
lumiera::Time start;
|
lumiera::Time start;
|
||||||
|
|
||||||
/**end (exclusive) of the timerange */
|
/**end (exclusive) of the timerange */
|
||||||
lumiera::Time end;
|
lumiera::Time end;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace engine
|
} // namespace engine
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
|
|
||||||
namespace mobject {
|
namespace mobject {
|
||||||
|
|
||||||
class Buildable;
|
class Buildable;
|
||||||
|
|
||||||
namespace builder {
|
namespace builder {
|
||||||
|
|
@ -105,7 +105,7 @@ namespace mobject {
|
||||||
* as we simply store a pointer within the BuilderTool instance.
|
* as we simply store a pointer within the BuilderTool instance.
|
||||||
*/
|
*/
|
||||||
class BuilderTool
|
class BuilderTool
|
||||||
: public lumiera::visitor::Tool<void, InvokeCatchAllFunction>
|
: public lumiera::visitor::Tool<void, InvokeCatchAllFunction>
|
||||||
{
|
{
|
||||||
lumiera::WrapperPtr currentWrapper_;
|
lumiera::WrapperPtr currentWrapper_;
|
||||||
|
|
||||||
|
|
@ -172,7 +172,9 @@ namespace mobject {
|
||||||
|
|
||||||
using lumiera::typelist::Types; // convenience for the users of "Applicable"
|
using lumiera::typelist::Types; // convenience for the users of "Applicable"
|
||||||
|
|
||||||
} // namespace mobject::builder
|
}// namespace mobject::builder
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -185,8 +187,15 @@ namespace mobject {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace builder { // to be found by ADL
|
namespace builder {
|
||||||
|
|
||||||
|
/** to be picked up by ADL: redirect tool invocation for double dispatch.
|
||||||
|
* The purpose of this function is to apply a visitor, while the actual target
|
||||||
|
* is managed by a generic wrapper (smart-ptr). This template function serves
|
||||||
|
* to generate forwarding functions, which pass on the \c apply() call to the
|
||||||
|
* actual embedded target, while passing on the fully wrapped object for later
|
||||||
|
* referral and usage too.
|
||||||
|
*/
|
||||||
template<typename WRA>
|
template<typename WRA>
|
||||||
inline Buildable::ReturnType
|
inline Buildable::ReturnType
|
||||||
apply (BuilderTool& tool, WRA& wrappedTargetObj)
|
apply (BuilderTool& tool, WRA& wrappedTargetObj)
|
||||||
|
|
@ -195,8 +204,7 @@ namespace mobject {
|
||||||
wrappedTargetObj->apply (tool); // dispatch to suitable treat() function
|
wrappedTargetObj->apply (tool); // dispatch to suitable treat() function
|
||||||
tool.forgetWrapper();
|
tool.forgetWrapper();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mobject::builder
|
|
||||||
|
|
||||||
} // namespace mobject
|
|
||||||
|
}} // namespace mobject::builder
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ namespace mobject {
|
||||||
using ::NOBUG_FLAG(memory);
|
using ::NOBUG_FLAG(memory);
|
||||||
NOBUG_CPP_DEFINE_FLAG_PARENT(buildermem, memory);
|
NOBUG_CPP_DEFINE_FLAG_PARENT(buildermem, memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main Operation of the Builder:
|
* Main Operation of the Builder:
|
||||||
* create a render engine for a given part of the timeline
|
* create a render engine for a given part of the timeline
|
||||||
|
|
@ -41,7 +41,7 @@ namespace mobject {
|
||||||
{
|
{
|
||||||
//////////////////////TODO
|
//////////////////////TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace mobject
|
} // namespace mobject
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@
|
||||||
|
|
||||||
|
|
||||||
namespace mobject {
|
namespace mobject {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides unified access to the builder functionality.
|
* Provides unified access to the builder functionality.
|
||||||
* While individual components of the builder subsystem may be called
|
* While individual components of the builder subsystem may be called
|
||||||
|
|
@ -44,12 +44,14 @@ namespace mobject {
|
||||||
/**
|
/**
|
||||||
* Main Operation of the Builder:
|
* Main Operation of the Builder:
|
||||||
* create a render engine for a given part of the timeline
|
* create a render engine for a given part of the timeline
|
||||||
|
* @deprecated thats a placeholder! the real invocation is now
|
||||||
|
* in the course of being worked out ////////////TODO 12/2010
|
||||||
*/
|
*/
|
||||||
engine::RenderEngine & buildEngine () ;
|
engine::RenderEngine & buildEngine () ;
|
||||||
// TODO: allocation, GC??????
|
// TODO: allocation, GC??????
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace mobject
|
} // namespace mobject
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue