summaryrefslogtreecommitdiff
path: root/graphics/asymptote/EXRFiles.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/EXRFiles.h')
-rw-r--r--graphics/asymptote/EXRFiles.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/graphics/asymptote/EXRFiles.h b/graphics/asymptote/EXRFiles.h
new file mode 100644
index 0000000000..36bd8b9b57
--- /dev/null
+++ b/graphics/asymptote/EXRFiles.h
@@ -0,0 +1,32 @@
+//
+// Created by jamie on 8/23/21.
+//
+
+#pragma once
+#include "common.h"
+#include "cudareflect/tinyexr/tinyexr.h"
+
+namespace camp
+{
+class IEXRFile
+{
+public:
+ IEXRFile(string const& file);
+ ~IEXRFile();
+
+ [[nodiscard]]
+ float const* getData() const {
+ return data;
+ }
+
+ [[nodiscard]]
+ std::pair<int,int> size() const {
+ return std::make_pair(width, height);
+ }
+
+private:
+ float* data=nullptr;
+ int width=0, height=0;
+};
+
+} // namespace gl;