From 6b69d4b5b648253f894707723af0e2eae9f71445 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 29 Jul 2023 03:31:42 +0200 Subject: Move chunk reification to worker threads and set stage for chunk-unbound lighting --- src/GFX/Binder.hpp | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 src/GFX/Binder.hpp (limited to 'src/GFX/Binder.hpp') diff --git a/src/GFX/Binder.hpp b/src/GFX/Binder.hpp deleted file mode 100644 index 6103e09..0000000 --- a/src/GFX/Binder.hpp +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include "../Common/Sizes.hpp" -#include "Mesh.hpp" - -namespace MC::GFX { - -class BindableMesh { -public: - void bind() const; - void unbind() const; - - Bool has_indices() const; - USize size() const; - -private: - BindableMesh( - U32 vao, - USize vertex_count, - USize attribute_count - ) : m_vao(vao), - m_vertex_count(vertex_count), - m_has_indices(vertex_count > 0), - m_attribute_count(attribute_count) {} - - U32 m_vao; - USize m_vertex_count; - Bool m_has_indices; - USize m_attribute_count; - - friend class Binder; -}; - -class Binder { -public: - Binder() = default; - - static BindableMesh load(const Mesh& mesh); - -private: - static U32 create_vao(); - static void unbind_vao(); - - static void store_in_attribute_list(U32 attribute, Int attribute_size, Int type_size, const void* data, long data_size); - static void store_indices(const U32* indices, USize indices_size); -}; - -} \ No newline at end of file -- cgit 1.4.1