diff options
| author | Mel <einebeere@gmail.com> | 2023-07-29 03:31:42 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-07-29 03:31:42 +0200 |
| commit | 6b69d4b5b648253f894707723af0e2eae9f71445 (patch) | |
| tree | 0cd0b6c7b18c30abbb2618f553f144d1d06dacba /src/GFX/Binder.hpp | |
| parent | 2eef7cf49b7a15559ee7bb6719411bcf67386213 (diff) | |
| download | meowcraft-6b69d4b5b648253f894707723af0e2eae9f71445.tar.zst meowcraft-6b69d4b5b648253f894707723af0e2eae9f71445.zip | |
Move chunk reification to worker threads and set stage for chunk-unbound lighting
Diffstat (limited to 'src/GFX/Binder.hpp')
| -rw-r--r-- | src/GFX/Binder.hpp | 48 |
1 files changed, 0 insertions, 48 deletions
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 |
