![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
Material collection, with additional functions. More...
#include <MaterialCache.hpp>
Public Types | |
using | ElementT = castor3d::Material |
using | ElementKeyT = String |
using | ElementCacheTraitsT = castor3d::MaterialCacheTraits |
using | ElementCacheT = ResourceCacheBaseT< ElementT, ElementKeyT, ElementCacheTraitsT > |
using | ElementPtrT = typename ElementCacheT::ElementPtrT |
using | ElementContT = typename ElementCacheT::ElementContT |
using | ElementInitialiserT = typename ElementCacheT::ElementInitialiserT |
using | ElementCleanerT = typename ElementCacheT::ElementCleanerT |
using | ElementMergerT = typename ElementCacheT::ElementMergerT |
Public Member Functions | |
C3D_API | ResourceCacheT (castor3d::Engine &engine) |
Constructor. More... | |
C3D_API | ~ResourceCacheT ()=default |
Destructor. More... | |
C3D_API void | initialise (castor3d::RenderDevice const &device, castor3d::PassTypeID passType) |
Intialises the default material. More... | |
C3D_API void | cleanup () |
Sets all the elements to be cleaned up. More... | |
C3D_API void | clear () |
Deletes the default material, flush the collection. More... | |
C3D_API void | update (castor3d::CpuUpdater &updater) |
Updates the render pass, CPU wise. More... | |
C3D_API void | update (castor3d::GpuUpdater &updater) |
Updates the render pass, GPU wise. More... | |
C3D_API void | upload (ashes::CommandBuffer const &cb) const |
Uploads all GPU buffers to VRAM. More... | |
C3D_API void | getNames (StringArray &names) |
Puts all the materials names in the given array. More... | |
C3D_API bool | registerPass (castor3d::Pass &pass) |
C3D_API void | unregisterPass (castor3d::Pass &pass) |
C3D_API bool | registerUnit (castor3d::TextureUnit &unit) |
C3D_API void | unregisterUnit (castor3d::TextureUnit &unit) |
C3D_API bool | registerTexture (castor3d::AnimatedTexture const &texture) |
C3D_API void | unregisterTexture (castor3d::AnimatedTexture const &texture) |
castor3d::MaterialRPtr | getDefaultMaterial () const |
castor3d::PassBuffer const & | getPassBuffer () const |
castor3d::SssProfileBuffer const & | getSssProfileBuffer () const |
castor3d::TextureConfigurationBuffer const & | getTexConfigBuffer () const |
castor3d::TextureAnimationBuffer const & | getTexAnimBuffer () const |
Material collection, with additional functions.
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementCacheT = ResourceCacheBaseT< ElementT, ElementKeyT, ElementCacheTraitsT > |
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementCacheTraitsT = castor3d::MaterialCacheTraits |
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementCleanerT = typename ElementCacheT::ElementCleanerT |
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementContT = typename ElementCacheT::ElementContT |
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementInitialiserT = typename ElementCacheT::ElementInitialiserT |
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementKeyT = String |
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementMergerT = typename ElementCacheT::ElementMergerT |
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementPtrT = typename ElementCacheT::ElementPtrT |
using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementT = castor3d::Material |
|
explicit |
Constructor.
[in] | engine | The engine. |
|
default |
Destructor.
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::cleanup | ( | ) |
Sets all the elements to be cleaned up.
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::clear | ( | ) |
Deletes the default material, flush the collection.
|
inline |
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::getNames | ( | StringArray & | names | ) |
Puts all the materials names in the given array.
[out] | names | The array of names to be filled |
|
inline |
|
inline |
|
inline |
|
inline |
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::initialise | ( | castor3d::RenderDevice const & | device, |
castor3d::PassTypeID | passType | ||
) |
Intialises the default material.
[in] | device | The GPU device. |
[in] | passType | The materials type. |
C3D_API bool castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::registerPass | ( | castor3d::Pass & | pass | ) |
C3D_API bool castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::registerTexture | ( | castor3d::AnimatedTexture const & | texture | ) |
C3D_API bool castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::registerUnit | ( | castor3d::TextureUnit & | unit | ) |
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::unregisterPass | ( | castor3d::Pass & | pass | ) |
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::unregisterTexture | ( | castor3d::AnimatedTexture const & | texture | ) |
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::unregisterUnit | ( | castor3d::TextureUnit & | unit | ) |
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::update | ( | castor3d::CpuUpdater & | updater | ) |
Updates the render pass, CPU wise.
[in,out] | updater | The update data. |
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::update | ( | castor3d::GpuUpdater & | updater | ) |
Updates the render pass, GPU wise.
[in,out] | updater | The update data. |
C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::upload | ( | ashes::CommandBuffer const & | cb | ) | const |
Uploads all GPU buffers to VRAM.
[in] | cb | The command buffer on which transfer commands are recorded. |