![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <Engine.hpp>


Public Member Functions | |
| C3D_API | Engine (castor::String const &appName, Version const &appVersion, bool enableValidation) |
| Constructor. More... | |
| C3D_API | Engine (castor::String const &appName, Version const &appVersion, bool enableValidation, castor::LoggerInstance &logger) |
| Constructor. More... | |
| C3D_API | ~Engine () |
| Destructor. More... | |
| C3D_API void | initialise (uint32_t wantedFPS=100, bool threaded=false) |
| Initialisation function, Sets the wanted frame rate. More... | |
| C3D_API void | cleanup () |
| Cleanup function, destroys everything created from the beginning. More... | |
| C3D_API bool | loadRenderer (castor::String const &type) |
| Loads a renderer plug-in, given the renderer type. More... | |
| C3D_API void | loadRenderer (Renderer renderer) |
| Loads a renderer plug-in, given the renderer type. More... | |
| C3D_API CpuFrameEvent * | postEvent (CpuFrameEventUPtr event) |
| Posts a frame event to the default frame listener. More... | |
| C3D_API void | sendEvent (GpuFrameEventUPtr event) |
| If a device is enabled, executes the given event, if not posts it to the default frame listener. More... | |
| C3D_API GpuFrameEvent * | postEvent (GpuFrameEventUPtr event) |
| Posts a frame event to the default frame listener. More... | |
| C3D_API bool | fireMouseMove (castor::Position const &position) |
| C3D_API void | update (CpuUpdater &updater) |
| Updates the engine, CPU wise. More... | |
| C3D_API void | update (GpuUpdater &updater) |
| Updates the engine, GPU wise. More... | |
| C3D_API void | upload (ashes::CommandBuffer const &commandBuffer) |
| Updates the buffers. More... | |
| C3D_API bool | isCleaned () |
| Retrieves the cleanup status. More... | |
| C3D_API void | setCleaned () |
| Tells the engine is cleaned up. More... | |
| C3D_API void | pushCpuJob (castor::AsyncJobQueue::Job job) |
| Enqueues the given CPU job. More... | |
| C3D_API void | pushGpuJob (std::function< void(RenderDevice const &, QueueData const &) > job) |
| Enqueues the given GPU job. More... | |
| C3D_API castor::RgbaColour | getNextRainbowColour () const |
| Retrieves a colour issued from a rainbow colours iterator. More... | |
| C3D_API void | registerWindow (RenderWindow &window) |
| Registers a RenderWindow. More... | |
| C3D_API void | unregisterWindow (RenderWindow const &window) |
| Unregisters a RenderWindow. More... | |
| C3D_API void | registerParsers (castor::String const &name, castor::AttributeParsers const &parsers, castor::StrUInt32Map const §ions, castor::UserContextCreator contextCreator) |
| Registers additional parsers for SceneFileParser. More... | |
| C3D_API void | unregisterParsers (castor::String const &name) |
| Unregisters parsers for SceneFileParser. More... | |
| C3D_API uint32_t | registerTimer (castor::String const &category, FramePassTimer &timer) |
| Registers a render pass timer. More... | |
| C3D_API void | unregisterTimer (castor::String const &category, FramePassTimer &timer) |
| Unregisters a render pass timer. More... | |
| C3D_API void | registerLightingModel (castor::String const &name, shader::LightingModelCreator creator) |
| Registers a Lighting Model. More... | |
| C3D_API void | unregisterLightingModel (castor::String const &name) |
| Unregisters a Lighting Model. More... | |
| C3D_API void | registerBuffer (ShaderBuffer const &buffer) |
| Registers a ShaderBuffer. More... | |
| C3D_API void | unregisterBuffer (ShaderBuffer const &buffer) |
| Unregisters a ShaderBuffer. More... | |
| C3D_API void | registerPassType (castor::String const &type, PassRegisterInfo info) |
| Registers a material pass type. More... | |
| C3D_API void | unregisterPassType (castor::String const &type) |
| Unregisters a material pass type. More... | |
| C3D_API void | registerRenderPassType (castor::String const &renderPassType, castor::UniquePtr< RenderPassRegisterInfo > info) |
| Registers a scene render pass type, used to render given material pass type. More... | |
| C3D_API void | setRenderPassTypeConfiguration (castor::String const &renderPassType, Parameters parameters) |
| Registers a scene render pass type's configuration parameters. More... | |
| C3D_API Parameters | getRenderPassTypeConfiguration (castor::String const &renderPassType) const |
| Retrieve a scene render pass type's configuration parameters. More... | |
| C3D_API RenderPassTypeID | getRenderPassTypeID (castor::String const &renderPassType) const |
| Retrieves the ID for given scene render pass type name. More... | |
| C3D_API RenderPassRegisterInfo * | getRenderPassInfo (castor::String const &renderPassType) const |
| Retrieves a scene render pass type's creation informations. More... | |
| C3D_API std::vector< RenderPassRegisterInfo * > | getRenderPassInfos (TechniquePassEvent event) const |
| Retrieves the scene render passes type creation informations. More... | |
| C3D_API void | unregisterRenderPassType (castor::String const &renderPassType) |
| Unregisters a scene render pass type. More... | |
| C3D_API castor::String | getPassesName () const |
| C3D_API ToneMappingFactory const & | getToneMappingFactory () const |
| C3D_API ToneMappingFactory & | getToneMappingFactory () |
| C3D_API PostEffectFactory const & | getPostEffectFactory () const |
| C3D_API PostEffectFactory & | getPostEffectFactory () |
| castor::String const & | getAppName () const |
| Version const & | getAppVersion () const |
| castor::ImageCache const & | getImageCache () const |
| castor::ImageCache & | getImageCache () |
| castor::FontCache const & | getFontCache () const |
| castor::FontCache & | getFontCache () |
| UserInputListenerSPtr | getUserInputListener () |
| RenderSystem * | getRenderSystem () const |
| auto | getDefaultSampler () const |
| auto | getLightsSampler () const |
| std::map< castor::String, castor::AdditionalParsers > const & | getAdditionalParsers () const |
| Version const & | getVersion () const |
| bool | isValidationEnabled () const |
| void | enableUpdateOptimisations (bool value) |
| bool | areUpdateOptimisationsEnabled () const |
| bool | isApiTraceEnabled () const |
| bool | hasRenderLoop () const |
| RenderLoop & | getRenderLoop () const |
| bool | isThreaded () |
| MeshFactory & | getMeshFactory () const |
| PassFactory & | getPassFactory () const |
| MeshSubdividerFactory & | getSubdividerFactory () const |
| MeshImporterFactory & | getImporterFactory () const |
| ParticleFactory & | getParticleFactory () const |
| castor::CpuInformations const & | getCpuInformations () const |
| PassTypeID | getPassesType () const |
| castor::ImageLoader const & | getImageLoader () const |
| castor::ImageLoader & | getImageLoader () |
| castor::ImageWriter const & | getImageWriter () const |
| ashes::RendererList const & | getRenderersList () const |
| castor::LoggerInstance & | getLogger () const |
| uint32_t | getLpvGridSize () const |
| uint32_t | getMaxImageSize () const |
| std::map< castor::String, RenderWindow * > const & | getRenderWindows () const |
| crg::ResourceHandler & | getGraphResourceHandler () |
| shader::LightingModelFactory const & | getLightingModelFactory () const |
| SceneRPtr | getLoadingScene () const |
| C3D_API void | setLoadingScene (SceneUPtr scene) |
| void | setUserInputListener (UserInputListenerSPtr listener) |
| void | setPassesType (PassTypeID type) |
| void | setMaxImageSize (uint32_t size) |
| void | setLpvGridSize (uint32_t size) |
Static Public Member Functions | |
| static C3D_API castor::Path | getPluginsDirectory () |
| Retrieves plug-ins path. More... | |
| static C3D_API castor::Path | getEngineDirectory () |
| Gives the Castor directory. More... | |
| static C3D_API castor::Path | getDataDirectory () |
| Retrieves data path. More... | |
| static C3D_API std::locale const & | getLocale () |
| Retrieves data path. More... | |
| C3D_API castor3d::Engine::Engine | ( | castor::String const & | appName, |
| Version const & | appVersion, | ||
| bool | enableValidation | ||
| ) |
Constructor.
| [in] | appName | The user application name. |
| [in] | appVersion | The user application version. |
| [in] | enableValidation | true to enable rendering API validation. |
| C3D_API castor3d::Engine::Engine | ( | castor::String const & | appName, |
| Version const & | appVersion, | ||
| bool | enableValidation, | ||
| castor::LoggerInstance & | logger | ||
| ) |
Constructor.
| [in] | appName | The user application name. |
| [in] | appVersion | The user application version. |
| [in] | enableValidation | true to enable rendering API validation. |
| [in] | logger | The logger instance. |
| C3D_API castor3d::Engine::~Engine | ( | ) |
Destructor.
|
inline |
| C3D_API void castor3d::Engine::cleanup | ( | ) |
Cleanup function, destroys everything created from the beginning.
|
inline |
| C3D_API bool castor3d::Engine::fireMouseMove | ( | castor::Position const & | position | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Retrieves data path.
|
inline |
|
static |
Gives the Castor directory.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Retrieves data path.
|
inline |
|
inline |
|
inline |
|
inline |
| C3D_API castor::RgbaColour castor3d::Engine::getNextRainbowColour | ( | ) | const |
Retrieves a colour issued from a rainbow colours iterator.
|
inline |
| C3D_API castor::String castor3d::Engine::getPassesName | ( | ) | const |
name Getters.
|
inline |
|
inline |
|
static |
Retrieves plug-ins path.
| C3D_API PostEffectFactory & castor3d::Engine::getPostEffectFactory | ( | ) |
| C3D_API PostEffectFactory const & castor3d::Engine::getPostEffectFactory | ( | ) | const |
|
inline |
|
inline |
| C3D_API RenderPassRegisterInfo * castor3d::Engine::getRenderPassInfo | ( | castor::String const & | renderPassType | ) | const |
Retrieves a scene render pass type's creation informations.
| [in] | renderPassType | The pass type name. |
| C3D_API std::vector< RenderPassRegisterInfo * > castor3d::Engine::getRenderPassInfos | ( | TechniquePassEvent | event | ) | const |
Retrieves the scene render passes type creation informations.
| [in] | event | The event type for wanted passes. |
| C3D_API Parameters castor3d::Engine::getRenderPassTypeConfiguration | ( | castor::String const & | renderPassType | ) | const |
Retrieve a scene render pass type's configuration parameters.
| [in] | renderPassType | The pass type name. |
| C3D_API RenderPassTypeID castor3d::Engine::getRenderPassTypeID | ( | castor::String const & | renderPassType | ) | const |
Retrieves the ID for given scene render pass type name.
| [in] | renderPassType | The pass type name. |
|
inline |
|
inline |
|
inline |
| C3D_API ToneMappingFactory & castor3d::Engine::getToneMappingFactory | ( | ) |
| C3D_API ToneMappingFactory const & castor3d::Engine::getToneMappingFactory | ( | ) | const |
|
inline |
|
inline |
|
inline |
| C3D_API void castor3d::Engine::initialise | ( | uint32_t | wantedFPS = 100, |
| bool | threaded = false |
||
| ) |
Initialisation function, Sets the wanted frame rate.
| [in] | wantedFPS | The wanted FPS count |
| [in] | threaded | If false, the render can't be threaded |
|
inline |
| C3D_API bool castor3d::Engine::isCleaned | ( | ) |
Retrieves the cleanup status.
true if cleaned up
|
inline |
|
inline |
| C3D_API bool castor3d::Engine::loadRenderer | ( | castor::String const & | type | ) |
Loads a renderer plug-in, given the renderer type.
| [in] | type | The renderer type. |
true if ok Loads a renderer plug-in, given the renderer type.
| [in] | renderer | The renderer. |
| C3D_API CpuFrameEvent * castor3d::Engine::postEvent | ( | CpuFrameEventUPtr | event | ) |
Posts a frame event to the default frame listener.
| [in] | event | The event to add |
| C3D_API GpuFrameEvent * castor3d::Engine::postEvent | ( | GpuFrameEventUPtr | event | ) |
Posts a frame event to the default frame listener.
| [in] | event | The event to add |
| C3D_API void castor3d::Engine::pushCpuJob | ( | castor::AsyncJobQueue::Job | job | ) |
Enqueues the given CPU job.
| [in] | job | The job to execute. |
| C3D_API void castor3d::Engine::pushGpuJob | ( | std::function< void(RenderDevice const &, QueueData const &) > | job | ) |
Enqueues the given GPU job.
| [in] | job | The job to execute. |
| C3D_API void castor3d::Engine::registerBuffer | ( | ShaderBuffer const & | buffer | ) |
Registers a ShaderBuffer.
| [in] | buffer | The ShaderBuffer. |
| C3D_API void castor3d::Engine::registerLightingModel | ( | castor::String const & | name, |
| shader::LightingModelCreator | creator | ||
| ) |
Registers a Lighting Model.
| [in] | name | The lighting model name. |
| [in] | creator | The model creation function. |
| C3D_API void castor3d::Engine::registerParsers | ( | castor::String const & | name, |
| castor::AttributeParsers const & | parsers, | ||
| castor::StrUInt32Map const & | sections, | ||
| castor::UserContextCreator | contextCreator | ||
| ) |
Registers additional parsers for SceneFileParser.
| [in] | name | The registering name. |
| [in] | parsers | The parsers. |
| [in] | sections | The sections. |
| [in] | contextCreator | The user parser context creation function. |
| C3D_API void castor3d::Engine::registerPassType | ( | castor::String const & | type, |
| PassRegisterInfo | info | ||
| ) |
Registers a material pass type.
| [in] | type | The pass type name. |
| [in] | info | The pass creation informations. |
| C3D_API void castor3d::Engine::registerRenderPassType | ( | castor::String const & | renderPassType, |
| castor::UniquePtr< RenderPassRegisterInfo > | info | ||
| ) |
Registers a scene render pass type, used to render given material pass type.
| [in] | renderPassType | The pass type name. |
| [in] | info | The pass creation informations. |
| C3D_API uint32_t castor3d::Engine::registerTimer | ( | castor::String const & | category, |
| FramePassTimer & | timer | ||
| ) |
Registers a render pass timer.
| [in] | category | The timer category name. |
| [in] | timer | The timer to register. |
| C3D_API void castor3d::Engine::registerWindow | ( | RenderWindow & | window | ) |
Registers a RenderWindow.
| [in] | window | The RenderWindow. |
| C3D_API void castor3d::Engine::sendEvent | ( | GpuFrameEventUPtr | event | ) |
If a device is enabled, executes the given event, if not posts it to the default frame listener.
| [in] | event | The event. |
| C3D_API void castor3d::Engine::setCleaned | ( | ) |
Tells the engine is cleaned up.
| C3D_API void castor3d::Engine::setLoadingScene | ( | SceneUPtr | scene | ) |
name Mutators.
|
inline |
|
inline |
|
inline |
| C3D_API void castor3d::Engine::setRenderPassTypeConfiguration | ( | castor::String const & | renderPassType, |
| Parameters | parameters | ||
| ) |
Registers a scene render pass type's configuration parameters.
| [in] | renderPassType | The pass type name. |
| [in] | parameters | The pass configuration parameters. |
|
inline |
| C3D_API void castor3d::Engine::unregisterBuffer | ( | ShaderBuffer const & | buffer | ) |
Unregisters a ShaderBuffer.
| [in] | buffer | The ShaderBuffer. |
| C3D_API void castor3d::Engine::unregisterLightingModel | ( | castor::String const & | name | ) |
Unregisters a Lighting Model.
| [in] | name | The lighting model name. |
| C3D_API void castor3d::Engine::unregisterParsers | ( | castor::String const & | name | ) |
Unregisters parsers for SceneFileParser.
| [in] | name | The registering name. |
| C3D_API void castor3d::Engine::unregisterPassType | ( | castor::String const & | type | ) |
Unregisters a material pass type.
| [in] | type | The pass type name. |
| C3D_API void castor3d::Engine::unregisterRenderPassType | ( | castor::String const & | renderPassType | ) |
Unregisters a scene render pass type.
| [in] | renderPassType | The pass type name. |
| C3D_API void castor3d::Engine::unregisterTimer | ( | castor::String const & | category, |
| FramePassTimer & | timer | ||
| ) |
Unregisters a render pass timer.
| [in] | category | The timer category name. |
| [in] | timer | The timer to unregister. |
| C3D_API void castor3d::Engine::unregisterWindow | ( | RenderWindow const & | window | ) |
Unregisters a RenderWindow.
| [in] | window | The RenderWindow. |
| C3D_API void castor3d::Engine::update | ( | CpuUpdater & | updater | ) |
Updates the engine, CPU wise.
| [in,out] | updater | The update data. |
| C3D_API void castor3d::Engine::update | ( | GpuUpdater & | updater | ) |
Updates the engine, GPU wise.
| [in,out] | updater | The update data. |
| C3D_API void castor3d::Engine::upload | ( | ashes::CommandBuffer const & | commandBuffer | ) |
Updates the buffers.
| [in] | commandBuffer | Receives the upload commands. |