8#ifndef META_OCEAN_RENDERING_ENGINE_H
9#define META_OCEAN_RENDERING_ENGINE_H
186 inline Lock& lock()
const;
193 inline Lock& renderLock();
This class implements a container for callback functions.
Definition Callback.h:3456
This class implements a recursive lock object.
Definition Lock.h:31
This template class implements a object reference with an internal reference counter.
Definition base/ObjectRef.h:58
This class is the base class for all dynamic scene graph objects.
Definition DynamicObject.h:40
This class is the base class for all rendering engines like.
Definition Engine.h:46
GraphicAPI graphicAPI() const
Returns the selected graphic API.
Definition Engine.h:284
GraphicAPI supportedAPIs() const
Returns the graphic APIs supported by this engine.
Definition Engine.h:289
GraphicAPI graphicAPI_
Selected graphic API.
Definition Engine.h:260
Lock renderLock_
Render lock.
Definition Engine.h:278
ObjectRef object(const ObjectId objectId) const
Returns an object by a given object id belonging to this engine.
Engine(const Engine &engine)=delete
Disabled copy constructor.
std::vector< ObjectId > ObjectIds
Definition of a vector holding framebuffer ids.
Definition Engine.h:85
Engine(const GraphicAPI graphicAPI)
Creates a new render engine.
Lock & renderLock()
Returns the render lock of this engine.
Definition Engine.h:306
static bool unregisterEngine(const std::string &engine)
Unregisters an engine at the manager.
ObjectIds framebufferIds_
Vector holding all ids of created framebuffers.
Definition Engine.h:272
virtual std::string extensions() const
Returns the extensions supported by the first created framebuffer.
static void registerEngine(const std::string &engineName, const CreateCallback &callback, const GraphicAPI graphicAPI, const unsigned int priority)
Registers an engine at the manager.
ObjectRefs objects(const std::string &name) const
Returns all objects having a specified name and belonging to this engine.
virtual Framebuffer * internalCreateFramebuffer(const Framebuffer::FramebufferType type, const Framebuffer::FramebufferConfig &config)=0
Returns a framebuffer reference of a just created framebuffer object.
void unregisterDynamicObject(DynamicObject *object)
Unregisters a dynamic object.
Lock objectLock_
Dynamic object lock.
Definition Engine.h:281
FramebufferRef createFramebuffer(const Framebuffer::FramebufferType type=Framebuffer::FRAMEBUFFER_WINDOW, const Framebuffer::FramebufferConfig &config={})
Returns a new framebuffer of this render engine.
virtual bool hasExtension(const std::string &extension) const
Returns whether the first framebuffer created by this engine supports a specific extension.
virtual ~Engine()
Destructs a render engine.
virtual const Factory & factory() const =0
Returns the factory of this render engine.
Callback< Engine *, const GraphicAPI > CreateCallback
Definition of a callback function used to create a registered engine.
Definition Engine.h:73
ObjectIds dynamicObjects_
Vector holding ids of all registered dynamic objects for this engine.
Definition Engine.h:266
Lock lock_
Engine lock.
Definition Engine.h:275
const GraphicAPI supportedGraphicAPIs_
Supported graphic API.
Definition Engine.h:263
Engine & operator=(const Engine &engine)=delete
Disabled copy operator.
virtual void update(const Timestamp timestamp)
Updates dynamic objects in the engine.
virtual const std::string & engineName() const =0
Returns the name of this engine.
Timestamp timestamp() const
Returns the recent timestamp of the engine.
Definition Engine.h:294
Framebuffers framebuffers() const
Returns all created and valid framebuffer.
Lock & lock() const
Retruns the lock object of this engine.
Definition Engine.h:301
ObjectRef object(const std::string &name) const
Returns the first object having a specified name and belonging to this engine.
std::vector< FramebufferRef > Framebuffers
Definition of a vector holding framebuffer references.
Definition Engine.h:78
void registerDynamicObject(DynamicObject *object)
Registers a new dynamic object.
Timestamp timestamp_
The recent timestamp of the engine, to control e.g., animations or video textures.
Definition Engine.h:269
GraphicAPI
Definition of different graphic APIs.
Definition Engine.h:57
This class implements a node and object factory.
Definition rendering/Factory.h:30
This class holds framebuffer configurations.
Definition rendering/Framebuffer.h:94
This class is the base class for all rendering framebuffers.
Definition rendering/Framebuffer.h:48
FramebufferType
Definition of different framebuffer types.
Definition rendering/Framebuffer.h:55
This class manages all scene graphs.
Definition rendering/Manager.h:31
This class implements a scoped lock object for recursive lock objects.
Definition Lock.h:135
This class implements a timestamp.
Definition Timestamp.h:36
Ocean::ObjectRef< Engine > EngineRef
Definition of an engine reference object.
Definition Engine.h:30
std::vector< ObjectRef > ObjectRefs
Definition of a vector holding rendering object references.
Definition Object.h:41
The namespace covering the entire Ocean framework.
Definition Accessor.h:15