diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-20 15:12:25 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-20 15:12:25 +0000 |
commit | e85db91c6b6a326e3339020bc434063db6c957f9 (patch) | |
tree | afbed715e697fd265d14c58b8fbd2b077334e697 /gfx/models/obj.h | |
parent | Fix constness of Mesh constructor params (diff) | |
download | ilt-e85db91c6b6a326e3339020bc434063db6c957f9.tar.bz2 ilt-e85db91c6b6a326e3339020bc434063db6c957f9.tar.xz ilt-e85db91c6b6a326e3339020bc434063db6c957f9.zip |
Fix test-obj by splitting mesh processing
Don't invoke GL parts from test code
Diffstat (limited to 'gfx/models/obj.h')
-rw-r--r-- | gfx/models/obj.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gfx/models/obj.h b/gfx/models/obj.h index 2921e34..71733fe 100644 --- a/gfx/models/obj.h +++ b/gfx/models/obj.h @@ -12,6 +12,7 @@ #include <vector> class Mesh; +class Vertex; class ObjParser : yyFlexLexer { public: @@ -38,6 +39,8 @@ public: std::vector<Object> objects; glm::length_t axis {0}; + using NamedMeshData = std::pair<std::string, std::pair<std::vector<Vertex>, std::vector<unsigned int>>>; + [[nodiscard]] std::vector<NamedMeshData> createMeshData() const; using NamedMesh = std::pair<std::string, std::shared_ptr<const Mesh>>; [[nodiscard]] std::vector<NamedMesh> createMeshes() const; }; |