summaryrefslogtreecommitdiffhomepage
path: root/loader/error-tex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'loader/error-tex.cpp')
-rw-r--r--loader/error-tex.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/loader/error-tex.cpp b/loader/error-tex.cpp
new file mode 100644
index 00000000..4cc64f91
--- /dev/null
+++ b/loader/error-tex.cpp
@@ -0,0 +1,15 @@
+#include "impl.hpp"
+#include <Magnum/Math/Vector4.h>
+#include <Magnum/PixelFormat.h>
+#include <Magnum/Trade/ImageData.h>
+
+namespace floormat::loader_detail {
+
+Trade::ImageData2D loader_impl::make_error_texture()
+{
+ static const Vector4ub data[] = { {255, 0, 255, 255} }; // magenta
+ return Trade::ImageData2D{PixelFormat::RGBA8Unorm, {1, 1}, {},
+ Containers::arrayView(data, 1), {}, {}};
+}
+
+} // namespace floormat::loader_detail