2023-04-09 21:44:17 +02:00
|
|
|
#ifndef RENDERER_H
|
|
|
|
#define RENDERER_H
|
|
|
|
|
2023-04-29 14:54:43 +02:00
|
|
|
#include <oneapi/tbb/concurrent_unordered_set.h>
|
2023-05-20 21:19:44 +02:00
|
|
|
#include <oneapi/tbb/concurrent_queue.h>
|
2023-04-29 14:54:43 +02:00
|
|
|
|
|
|
|
#include "chunk.hpp"
|
2023-05-20 21:19:44 +02:00
|
|
|
#include "chunkmesher.hpp"
|
2023-04-09 21:44:17 +02:00
|
|
|
#include "shader.hpp"
|
|
|
|
|
|
|
|
namespace renderer{
|
2023-05-20 21:19:44 +02:00
|
|
|
typedef oneapi::tbb::concurrent_unordered_set<Chunk::Chunk*> RenderSet;
|
|
|
|
|
2023-09-17 10:40:55 +02:00
|
|
|
void init(GLFWwindow* window);
|
|
|
|
void render(GLFWwindow* window);
|
|
|
|
void framebuffer_size_callback(GLFWwindow *window, int width, int height);
|
2023-04-09 21:44:17 +02:00
|
|
|
void destroy();
|
|
|
|
Shader* getRenderShader();
|
2023-05-20 21:19:44 +02:00
|
|
|
RenderSet& getChunksToRender();
|
|
|
|
oneapi::tbb::concurrent_queue<chunkmesher::MeshData*>& getMeshDataQueue();
|
2023-04-09 21:44:17 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|