Cogs.Core
BlueNoiseManager.h
1#pragma once
2
3#include "Resources/BlueNoise.h"
4#include "Resources/BasicBlueNoiseManager.h"
5
6#include <string>
7
8namespace Cogs::Core
9{
11 {
12 };
13 class BlueNoiseManager : public ResourceManager<BlueNoise, BlueNoiseLoadInfo>, public IBlueNoiseManager
14 {
15 public:
16 BlueNoiseManager(Context * context);
18
19 void initialize() override;
20 void clear() override;
21
22 void enable() override
23 {
24 if (!enabled) {
25 handleEnable();
26 }
27 }
28
29 uint32_t RandIndex();
30
31 BlueNoiseHandle loadBlueNoise(const std::string& name, const ResourceId resourceId);
32
33 BlueNoiseHandle getBlueNoiseHandle(bool stable) override;
34
35 private:
36 uint32_t count;
37 bool enabled = false;
38 void handleEnable();
39 BlueNoiseHandle blueNoise[64];
40
41 };
42}
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
The generic resource manager provides a base implementation for specialized resource managers to buil...
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....