mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
Remove monolithic World, Player, Chunk classes. Introduce ClientWorld, ServerWorld, ClientPlayer, and related networked components. Add Abseil dependency for logging and checks. Rename old files to pre_remove_* and update all includes and references accordingly.
26 lines
623 B
C++
26 lines
623 B
C++
#pragma once
|
|
#include "Cubed/primitive_data.hpp"
|
|
|
|
#include <atomic>
|
|
#include <glad/glad.h>
|
|
#include <vector>
|
|
namespace Cubed {
|
|
class ClientWorld;
|
|
struct VertexData {
|
|
std::vector<Vertex3D> m_vertices;
|
|
GLuint m_vbo = 0;
|
|
GLuint m_vao = 0;
|
|
std::atomic<std::size_t> m_sum{0};
|
|
ClientWorld& m_world;
|
|
VertexData(ClientWorld& world);
|
|
~VertexData();
|
|
VertexData(const VertexData&) = delete;
|
|
VertexData(VertexData&&) noexcept;
|
|
VertexData& operator=(const VertexData&) = delete;
|
|
VertexData& operator=(VertexData&&) noexcept;
|
|
|
|
void upload();
|
|
void update_sum();
|
|
};
|
|
} // namespace Cubed
|