Castor3D 0.12.0
Multiplatform 3D engine
Public Types | Public Member Functions | List of all members
castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits > Class Referencefinal

Material collection, with additional functions. More...

#include <MaterialCache.hpp>

Inheritance diagram for castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >:
Inheritance graph
[legend]
Collaboration diagram for castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >:
Collaboration graph
[legend]

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
 

Detailed Description

Material collection, with additional functions.

Member Typedef Documentation

◆ ElementCacheT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementCacheT = ResourceCacheBaseT< ElementT, ElementKeyT, ElementCacheTraitsT >

◆ ElementCacheTraitsT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementCacheTraitsT = castor3d::MaterialCacheTraits

◆ ElementCleanerT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementCleanerT = typename ElementCacheT::ElementCleanerT

◆ ElementContT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementContT = typename ElementCacheT::ElementContT

◆ ElementInitialiserT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementInitialiserT = typename ElementCacheT::ElementInitialiserT

◆ ElementKeyT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementKeyT = String

◆ ElementMergerT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementMergerT = typename ElementCacheT::ElementMergerT

◆ ElementPtrT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementPtrT = typename ElementCacheT::ElementPtrT

◆ ElementT

using castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ElementT = castor3d::Material

Constructor & Destructor Documentation

◆ ResourceCacheT()

C3D_API castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::ResourceCacheT ( castor3d::Engine engine)
explicit

Constructor.

Parameters
[in]engineThe engine.

◆ ~ResourceCacheT()

C3D_API castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::~ResourceCacheT ( )
default

Destructor.

Member Function Documentation

◆ cleanup()

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::cleanup ( )

Sets all the elements to be cleaned up.

◆ clear()

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::clear ( )

Deletes the default material, flush the collection.

◆ getDefaultMaterial()

castor3d::MaterialRPtr castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::getDefaultMaterial ( ) const
inline

◆ getNames()

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::getNames ( StringArray &  names)

Puts all the materials names in the given array.

Parameters
[out]namesThe array of names to be filled

◆ getPassBuffer()

castor3d::PassBuffer const & castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::getPassBuffer ( ) const
inline

◆ getSssProfileBuffer()

castor3d::SssProfileBuffer const & castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::getSssProfileBuffer ( ) const
inline

◆ getTexAnimBuffer()

castor3d::TextureAnimationBuffer const & castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::getTexAnimBuffer ( ) const
inline

◆ getTexConfigBuffer()

castor3d::TextureConfigurationBuffer const & castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::getTexConfigBuffer ( ) const
inline

◆ initialise()

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::initialise ( castor3d::RenderDevice const &  device,
castor3d::PassTypeID  passType 
)

Intialises the default material.

Parameters
[in]deviceThe GPU device.
[in]passTypeThe materials type.

◆ registerPass()

C3D_API bool castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::registerPass ( castor3d::Pass pass)

◆ registerTexture()

C3D_API bool castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::registerTexture ( castor3d::AnimatedTexture const &  texture)

◆ registerUnit()

C3D_API bool castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::registerUnit ( castor3d::TextureUnit unit)

◆ unregisterPass()

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::unregisterPass ( castor3d::Pass pass)

◆ unregisterTexture()

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::unregisterTexture ( castor3d::AnimatedTexture const &  texture)

◆ unregisterUnit()

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::unregisterUnit ( castor3d::TextureUnit unit)

◆ update() [1/2]

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::update ( castor3d::CpuUpdater updater)

Updates the render pass, CPU wise.

Parameters
[in,out]updaterThe update data.

◆ update() [2/2]

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::update ( castor3d::GpuUpdater updater)

Updates the render pass, GPU wise.

Parameters
[in,out]updaterThe update data.

◆ upload()

C3D_API void castor::ResourceCacheT< castor3d::Material, String, castor3d::MaterialCacheTraits >::upload ( ashes::CommandBuffer const &  cb) const

Uploads all GPU buffers to VRAM.

Parameters
[in]cbThe command buffer on which transfer commands are recorded.

The documentation for this class was generated from the following file: