SQCSimulator2023/SQCSim2021/worldrenderer.h

23 lines
672 B
C
Raw Normal View History

2023-09-30 14:46:54 -04:00
#ifndef WORLDRENDERER_H__
#define WORLDRENDERER_H__
#include <future>
#include <thread>
#include "../SQCSim-common/world.h"
#include "../SQCSim-common/transformation.h"
#include "define.h"
#include "mesh.h"
#include "textureatlas.h"
#include "shader.h"
class WorldRenderer {
private:
Array2d<Mesh*> m_meshes = Array2d<Mesh*>(WORLD_SIZE_X, WORLD_SIZE_Y);
public:
WorldRenderer();
~WorldRenderer();
void RenderWorld(World* origin, int& rendercount, const Vector3f& player_pos, const Vector3f& player_dir, Transformation& world, Shader& shader, TextureAtlas& atlas);
void UpdateWorld(World* origin, const Vector3f& player, BlockInfo* blockinfo[BTYPE_LAST]);
};
#endif