Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Uses std::mt19937_64 to generate a r32u image of decent quality random noise. More...
#include <foray_noisesource.hpp>
Public Member Functions | |
NoiseSource ()=default | |
void | Create (core::Context *context, uint32_t edge=2048U, uint32_t depth=1) |
Creates and uploads. | |
virtual void | Regenerate () |
Regenerates all values and uploads to texture. | |
virtual void | Destroy () override |
Destroy the resource. | |
virtual bool | Exists () const override |
Return true, if the managed resource is allocated. | |
![]() | |
virtual std::string_view | GetTypeName () const |
Return a hint for the type of resource managed by the instantiation. | |
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 Attributes | |
core::ManagedImage | mImage |
![]() | |
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 () |
Uses std::mt19937_64 to generate a r32u image of decent quality random noise.
|
default |
void foray::util::NoiseSource::Create | ( | core::Context * | context, |
uint32_t | edge = 2048U , |
||
uint32_t | depth = 1 |
||
) |
Creates and uploads.
edge | Width & Height |
depth | Depth |
|
overridevirtual |
Destroy the resource.
Implements foray::core::ManagedResource.
|
overridevirtual |
Return true, if the managed resource is allocated.
Example: Vulkan object stored could be nullptr or instantiated
Implements foray::core::ManagedResource.
|
virtual |
Regenerates all values and uploads to texture.
|
protected |