|
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 () |
Public Member Functions inherited from foray::core::VulkanResource< VkObjectType::VK_OBJECT_TYPE_SAMPLER > | |
| VulkanResource () | |
| VulkanResource (std::string_view name) | |
| virtual std::string_view | GetTypeName () const |
| Returns <OBJECT_TYPE> stringified. | |
Public Member Functions inherited from foray::core::ManagedResource | |
| 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. | |
Public Member Functions inherited from foray::NoMoveDefaults | |
| 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 () |
Protected Member Functions inherited from foray::core::VulkanResource< VkObjectType::VK_OBJECT_TYPE_SAMPLER > | |
| 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 |
Protected Attributes inherited from foray::core::ManagedResource | |
| std::string | mName |
| This objects custom name. | |
Additional Inherited Members | |
Static Public Member Functions inherited from foray::core::ManagedResource | |
| 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 |