aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/DataView.hpp2
-rw-r--r--include/File.hpp7
-rw-r--r--include/model_loader/ObjModelLoader.hpp11
3 files changed, 20 insertions, 0 deletions
diff --git a/include/DataView.hpp b/include/DataView.hpp
index c9e25e7..d4200c5 100644
--- a/include/DataView.hpp
+++ b/include/DataView.hpp
@@ -23,4 +23,6 @@ namespace amalgine
T *data;
usize size;
};
+
+ using StringView = DataView<char>;
}
diff --git a/include/File.hpp b/include/File.hpp
new file mode 100644
index 0000000..6c5212f
--- /dev/null
+++ b/include/File.hpp
@@ -0,0 +1,7 @@
+#pragma once
+
+#include <stddef.h>
+
+namespace amalgine {
+ char* file_get_content(const char *filepath, size_t *filesize);
+} \ No newline at end of file
diff --git a/include/model_loader/ObjModelLoader.hpp b/include/model_loader/ObjModelLoader.hpp
new file mode 100644
index 0000000..3cdeb7d
--- /dev/null
+++ b/include/model_loader/ObjModelLoader.hpp
@@ -0,0 +1,11 @@
+#pragma once
+
+#include "../Triangle.hpp"
+#include <vector>
+
+namespace amalgine {
+ class ObjModelLoader {
+ public:
+ static void load_from_file(const char *filepath, std::vector<Triangle3D> &triangles);
+ };
+} \ No newline at end of file