diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-06 14:11:38 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-06 14:11:38 +0000 |
| commit | 182f823116458ad357823f4cc56638980aafa0f6 (patch) | |
| tree | b6937e27e6d2875d8242e40645929f12138712c4 /lib | |
| parent | Define SequentialCollection in terms of contiguous_range (diff) | |
| download | ilt-182f823116458ad357823f4cc56638980aafa0f6.tar.bz2 ilt-182f823116458ad357823f4cc56638980aafa0f6.tar.xz ilt-182f823116458ad357823f4cc56638980aafa0f6.zip | |
Replace generic glBuffer type alias with a full implementation
Adds wrappers for DSA storage and data uploads.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/glArrays.cpp | 14 | ||||
| -rw-r--r-- | lib/glArrays.h | 2 | ||||
| -rw-r--r-- | lib/glContainer.h | 2 |
3 files changed, 1 insertions, 17 deletions
diff --git a/lib/glArrays.cpp b/lib/glArrays.cpp deleted file mode 100644 index cb12f91..0000000 --- a/lib/glArrays.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "glArrays.h" -#include <type_traits> - -// Specialisations (glBuffer is an example of the typedef) -static_assert(std::is_nothrow_default_constructible_v<glBuffer>); -static_assert(!std::is_trivially_default_constructible_v<glBuffer>); -static_assert(std::is_nothrow_destructible_v<glBuffer>); -static_assert(!std::is_trivially_destructible_v<glBuffer>); -static_assert(std::is_default_constructible_v<glBuffer>); -static_assert(!std::is_copy_constructible_v<glBuffer>); -static_assert(!std::is_copy_assignable_v<glBuffer>); -static_assert(std::is_nothrow_move_constructible_v<glBuffer>); -static_assert(std::is_nothrow_move_assignable_v<glBuffer>); -static_assert(sizeof(glBuffer) == sizeof(GLuint)); diff --git a/lib/glArrays.h b/lib/glArrays.h index e949ccd..1cf2fbf 100644 --- a/lib/glArrays.h +++ b/lib/glArrays.h @@ -119,8 +119,6 @@ struct glManagedArray : public std::array<Named, N> { }; // NOLINTBEGIN(readability-identifier-naming) -template<size_t N> using glBuffers = glManagedArray<Detail::glNamed, N, &glGenBuffers, &glDeleteBuffers>; -using glBuffer = glManagedSingle<Detail::glNamed, &glGenBuffers, &glDeleteBuffers>; template<size_t N> using glFrameBuffers = glManagedArray<Detail::glNamed, N, &glGenFramebuffers, &glDeleteFramebuffers>; using glFrameBuffer = glManagedSingle<Detail::glNamed, &glGenFramebuffers, &glDeleteFramebuffers>; template<size_t N> diff --git a/lib/glContainer.h b/lib/glContainer.h index 4119ef5..45f1030 100644 --- a/lib/glContainer.h +++ b/lib/glContainer.h @@ -1,6 +1,6 @@ #pragma once -#include "glArrays.h" +#include "gfx/gl/glBuffer.h" #include <cassert> #include <span> #include <stdexcept> |
