summaryrefslogtreecommitdiff
path: root/lib/glArrays.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-01-01 16:44:19 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-01-01 16:44:19 +0000
commit7c03d93c367b842c464dca30e121bc4c20547c36 (patch)
tree6df340dc3b0bd16f6ced2a051a68fc8a3c67a08c /lib/glArrays.cpp
parentFirst iteration with font/text support (diff)
downloadilt-7c03d93c367b842c464dca30e121bc4c20547c36.tar.bz2
ilt-7c03d93c367b842c464dca30e121bc4c20547c36.tar.xz
ilt-7c03d93c367b842c464dca30e121bc4c20547c36.zip
Generic solution for glGen/glDel arrays, then tidy-up the uses
Diffstat (limited to 'lib/glArrays.cpp')
-rw-r--r--lib/glArrays.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/glArrays.cpp b/lib/glArrays.cpp
new file mode 100644
index 0000000..7c5b2ea
--- /dev/null
+++ b/lib/glArrays.cpp
@@ -0,0 +1,21 @@
+#include "glArrays.h"
+#include <type_traits>
+
+// Base
+static_assert(!std::is_default_constructible_v<glArraysBase<1>>);
+static_assert(!std::is_copy_constructible_v<glArraysBase<1>>);
+static_assert(!std::is_copy_assignable_v<glArraysBase<1>>);
+static_assert(std::is_nothrow_move_constructible_v<glArraysBase<1>>);
+static_assert(std::is_nothrow_move_assignable_v<glArraysBase<1>>);
+
+// 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));