diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-23 20:56:49 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-23 20:56:49 +0100 |
commit | 8f84e67b7b9dcd4f5993909aa9ee2e222a207836 (patch) | |
tree | 233ca163ef9a28056f069623c99251f55dd5473c /gfx | |
parent | Merge branch 'instancing' (diff) | |
download | ilt-8f84e67b7b9dcd4f5993909aa9ee2e222a207836.tar.bz2 ilt-8f84e67b7b9dcd4f5993909aa9ee2e222a207836.tar.xz ilt-8f84e67b7b9dcd4f5993909aa9ee2e222a207836.zip |
Assert the buffer is actually mapped
Will fail if the context is deleted. We shouldn't trigger that, but we do right now.
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/gl/instanceVertices.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gfx/gl/instanceVertices.h b/gfx/gl/instanceVertices.h index 228020d..8bb2f21 100644 --- a/gfx/gl/instanceVertices.h +++ b/gfx/gl/instanceVertices.h @@ -1,6 +1,7 @@ #pragma once #include "glArrays.h" +#include <cassert> #include <iterator> #include <span> #include <special_members.hpp> @@ -186,6 +187,7 @@ protected: { if (!data) { data = static_cast<T *>(glMapNamedBuffer(buffer, GL_READ_WRITE)); + assert(data); } } |