VOX
A little voxel engine
Loading...
Searching...
No Matches
RenderThread.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "define.hpp"
4#include "Settings.hpp"
5#include "RenderAPI.hpp"
6#include "Chunk.hpp"
7#include "WorldGenerator.hpp"
8#include "DebugGui.hpp"
9
10#include <chrono>
11#include <map>
12
17{
18 glm::mat4 model;
19};
20
21
30{
31
32public:
33
38 const Settings & settings,
39 RenderAPI & render_api,
40 std::chrono::nanoseconds start_time
41 );
42
47
48 RenderThread(RenderThread & renderer) = delete;
49 RenderThread(RenderThread && renderer) = delete;
50 RenderThread & operator=(RenderThread & renderer) = delete;
51 RenderThread & operator=(RenderThread && renderer) = delete;
52
53private:
54
55 RenderAPI & m_render_api;
56
57 // Should be the last member
58 std::jthread m_thread;
59
64 void launch();
65
66 void init();
67 void loop();
68};
Definition: RenderAPI.hpp:288
A wrapper for the thread that handles rendering.
Definition: RenderThread.hpp:30
RenderThread(RenderThread &&renderer)=delete
RenderThread & operator=(RenderThread &renderer)=delete
RenderThread(RenderThread &renderer)=delete
RenderThread & operator=(RenderThread &&renderer)=delete
~RenderThread()
Destroy the RenderThread object.
Definition: RenderThread.cpp:24
Class to hold the settings of the application.
Definition: Settings.hpp:12
The push constant for the model matrix.
Definition: RenderThread.hpp:17
glm::mat4 model
Definition: RenderThread.hpp:18