Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
Loading...
Searching...
No Matches
foray_noisesource.hpp
Go to the documentation of this file.
1#pragma once
2#include "../foray_basics.hpp"
3#include "../core/foray_managedimage.hpp"
4#include "../core/foray_samplercollection.hpp"
5
6namespace foray::util {
9 {
10 public:
11 NoiseSource() = default;
12
16 void Create(core::Context* context, uint32_t edge = 2048U, uint32_t depth = 1);
18 virtual void Regenerate();
19 virtual void Destroy() override;
20 virtual bool Exists() const override;
21
22 FORAY_GETTER_R(Image)
23
24 protected:
26
27 };
28} // namespace foray
Wraps allocation and lifetime functionality of VkImage.
Definition foray_managedimage.hpp:13
Base class enforcing common interface for all classes wrapping a device resource.
Definition foray_managedresource.hpp:11
Uses std::mt19937_64 to generate a r32u image of decent quality random noise.
Definition foray_noisesource.hpp:9
virtual void Destroy() override
Destroy the resource.
core::ManagedImage mImage
Definition foray_noisesource.hpp:25
virtual void Regenerate()
Regenerates all values and uploads to texture.
virtual bool Exists() const override
Return true, if the managed resource is allocated.
void Create(core::Context *context, uint32_t edge=2048U, uint32_t depth=1)
Creates and uploads.
#define FORAY_GETTER_R(member)
Shorthand for mutable & constant reference getters.
Definition foray_basics.hpp:75
Definition foray_dualbuffer.hpp:5
Non owning context object.
Definition foray_context.hpp:16