Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Provides sampler objects based on VkSamplerCreateInfo specifications. More...
#include <foray_samplercollection.hpp>
Classes | |
struct | SamplerInstance |
Public Member Functions | |
SamplerCollection ()=default | |
void | Init (core::Context *context) |
Prepares for use. | |
virtual bool | Exists () const override |
Return true, if the managed resource is allocated. | |
virtual void | Destroy () override |
Make sure no reference to any existing sampler will be used after calling this! | |
virtual | ~SamplerCollection () |
![]() | |
VulkanResource () | |
VulkanResource (std::string_view name) | |
virtual std::string_view | GetTypeName () const |
Returns <OBJECT_TYPE> stringified. | |
![]() | |
ManagedResource () | |
Default constructor registers the resource. | |
ManagedResource (std::string_view name) | |
Registers the resource and sets its name. | |
virtual | ~ManagedResource () |
Unregisters the resource. | |
std::string_view | GetName () const |
Return a custom name for the object. | |
virtual void | SetName (std::string_view name) |
Set a custom name for the object. | |
std::string | Print () const |
Print name and type in one string. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
Protected Member Functions | |
void | GetSampler (SamplerReference &imageSampler, const VkSamplerCreateInfo &samplerCi) |
void | Register (SamplerReference &imageSampler) |
void | Unregister (SamplerReference &imageSampler) |
void | ClearSamplerMap () |
![]() | |
virtual void | SetObjectName (core::Context *context, const void *handle, std::string_view name, bool updateResourceName=true) |
Set the object name. Sets both ManagedResource::mName aswell as vulkan debug object name. | |
Static Protected Member Functions | |
static uint64_t | GetHash (const VkSamplerCreateInfo &samplerCi) |
Protected Attributes | |
core::Context * | mContext = nullptr |
std::unordered_map< uint64_t, SamplerInstance > | mSamplerInstances |
![]() | |
std::string | mName |
This objects custom name. | |
Additional Inherited Members | |
![]() | |
static void | sPrintAllocatedResources (bool printAsWarning) |
Print a list of all registered existing resources. | |
static const std::unordered_set< ManagedResource * > * | GetTotalAllocatedResources () |
Provides sampler objects based on VkSamplerCreateInfo specifications.
|
default |
|
inlinevirtual |
|
protected |
|
inlineoverridevirtual |
Make sure no reference to any existing sampler will be used after calling this!
Implements foray::core::ManagedResource.
|
inlineoverridevirtual |
Return true, if the managed resource is allocated.
Example: Vulkan object stored could be nullptr or instantiated
Implements foray::core::ManagedResource.
|
staticprotected |
|
protected |
|
inline |
Prepares for use.
context | Requires DispatchTable |
|
protected |
|
protected |
|
protected |
|
protected |