summaryrefslogtreecommitdiff
path: root/assetFactory/modelFactoryMesh.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-03-14 19:16:57 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-03-14 19:18:30 +0000
commit3fea21a2d8f2aa67fd212837fe7e09e4f29ad515 (patch)
tree2c7a212745ddda5d55caf0cfd3c85b2cb39c15b5 /assetFactory/modelFactoryMesh.h
parentAdd postLoad support to persistence (diff)
downloadilt-3fea21a2d8f2aa67fd212837fe7e09e4f29ad515.tar.bz2
ilt-3fea21a2d8f2aa67fd212837fe7e09e4f29ad515.tar.xz
ilt-3fea21a2d8f2aa67fd212837fe7e09e4f29ad515.zip
Support creating a super texture from fragments
Currently makes wild assumptions about vertices and doesn't actually populate the texture, it's just grey
Diffstat (limited to 'assetFactory/modelFactoryMesh.h')
-rw-r--r--assetFactory/modelFactoryMesh.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/assetFactory/modelFactoryMesh.h b/assetFactory/modelFactoryMesh.h
index 149ff1a..493ce1b 100644
--- a/assetFactory/modelFactoryMesh.h
+++ b/assetFactory/modelFactoryMesh.h
@@ -4,6 +4,7 @@
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>
#include <OpenMesh/Core/Mesh/Traits.hh>
#include <glm/geometric.hpp>
+#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>
@@ -34,10 +35,11 @@ namespace OpenMesh {
struct ModelFactoryTraits : public OpenMesh::DefaultTraits {
FaceAttributes(OpenMesh::Attributes::Normal | OpenMesh::Attributes::Status | OpenMesh::Attributes::Color);
EdgeAttributes(OpenMesh::Attributes::Status);
- VertexAttributes(OpenMesh::Attributes::Normal | OpenMesh::Attributes::Status);
+ VertexAttributes(OpenMesh::Attributes::Normal | OpenMesh::Attributes::Status | OpenMesh::Attributes::TexCoord2D);
using Point = glm::vec3;
using Normal = glm::vec3;
using Color = glm::vec4;
+ using TexCoord2D = glm::vec2;
};
struct ModelFactoryMesh : public OpenMesh::PolyMesh_ArrayKernelT<ModelFactoryTraits> {