Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
foray::scene::gcomp::MaterialManager Class Reference

Manages a device local storage buffer providing material information for rendering. More...

#include <foray_materialmanager.hpp>

Inheritance diagram for foray::scene::gcomp::MaterialManager:
foray::scene::GlobalComponent foray::scene::Component foray::NoMoveDefaults foray::Polymorphic

Public Member Functions

 MaterialManager (core::Context *context)
 
std::vector< Material > & GetVector ()
 
void UpdateDeviceLocal ()
 Apply changes made to the cpu local buffer to the device local buffer.
 
void Destroy ()
 
virtual ~MaterialManager ()
 
VkDescriptorBufferInfo GetVkDescriptorInfo () const
 
VkBuffer GetVkBuffer () const
 
- Public Member Functions inherited from foray::scene::GlobalComponent
virtual SceneGetScene () override
 Scene this component is a part of. Casts mRegistry to Scene.
 
virtual RegistryGetGlobals () override
 Global component registry. Returns mRegistry.
 
virtual core::ContextGetContext () override
 Vulkan Context. Casts mRegistry to Scene and returns Scene->GetContext()
 
- Public Member Functions inherited from foray::scene::Component
virtual ~Component ()
 Destructor. Provide virtual constructors in inheriting classes, to make sure they get finalized correctly.
 
- Public Member Functions inherited from foray::NoMoveDefaults
 NoMoveDefaults ()=default
 
 NoMoveDefaults (const NoMoveDefaults &other)=delete
 
 NoMoveDefaults (NoMoveDefaults &&other)=default
 
NoMoveDefaultsoperator= (const NoMoveDefaults &other)=delete
 

Protected Attributes

util::ManagedVectorBuffer< MaterialmBuffer = {}
 
- Protected Attributes inherited from foray::scene::Component
RegistrymRegistry = nullptr
 
std::string mName = ""
 

Additional Inherited Members

- Public Attributes inherited from foray::scene::Component
friend Registry
 
- Protected Member Functions inherited from foray::Polymorphic
virtual void __makeMePolymorphic ()
 

Detailed Description

Manages a device local storage buffer providing material information for rendering.

Constructor & Destructor Documentation

◆ MaterialManager()

foray::scene::gcomp::MaterialManager::MaterialManager ( core::Context context)
explicit

◆ ~MaterialManager()

virtual foray::scene::gcomp::MaterialManager::~MaterialManager ( )
inlinevirtual

Member Function Documentation

◆ Destroy()

void foray::scene::gcomp::MaterialManager::Destroy ( )

◆ GetVector()

std::vector< Material > & foray::scene::gcomp::MaterialManager::GetVector ( )
inline

◆ GetVkBuffer()

VkBuffer foray::scene::gcomp::MaterialManager::GetVkBuffer ( ) const
inline

◆ GetVkDescriptorInfo()

VkDescriptorBufferInfo foray::scene::gcomp::MaterialManager::GetVkDescriptorInfo ( ) const
inline

◆ UpdateDeviceLocal()

void foray::scene::gcomp::MaterialManager::UpdateDeviceLocal ( )

Apply changes made to the cpu local buffer to the device local buffer.

Member Data Documentation

◆ mBuffer

util::ManagedVectorBuffer<Material> foray::scene::gcomp::MaterialManager::mBuffer = {}
protected

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