summaryrefslogtreecommitdiff
path: root/gfx/models
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/models')
-rw-r--r--gfx/models/mesh.h5
-rw-r--r--gfx/models/obj.h5
-rw-r--r--gfx/models/stb_image.c4
-rw-r--r--gfx/models/stb_image.impl.c2
-rw-r--r--gfx/models/texture.h5
-rw-r--r--gfx/models/vertex.hpp5
6 files changed, 6 insertions, 20 deletions
diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h
index 9b74f48..c6f11a2 100644
--- a/gfx/models/mesh.h
+++ b/gfx/models/mesh.h
@@ -1,5 +1,4 @@
-#ifndef MESH_INCLUDED_H
-#define MESH_INCLUDED_H
+#pragma once
#include <GL/glew.h>
#include <glArrays.h>
@@ -21,5 +20,3 @@ private:
GLenum mode;
};
using MeshPtr = std::shared_ptr<const Mesh>;
-
-#endif
diff --git a/gfx/models/obj.h b/gfx/models/obj.h
index 6db16c0..e28f7de 100644
--- a/gfx/models/obj.h
+++ b/gfx/models/obj.h
@@ -1,5 +1,4 @@
-#ifndef OBJ_H
-#define OBJ_H
+#pragma once
#ifndef yyFlexLexer
# define yyFlexLexer objbaseFlexLexer
@@ -37,5 +36,3 @@ public:
using NamedMeshes = std::map<std::string, std::shared_ptr<const Mesh>>;
[[nodiscard]] NamedMeshes createMeshes() const;
};
-
-#endif
diff --git a/gfx/models/stb_image.c b/gfx/models/stb_image.c
deleted file mode 100644
index c15369e..0000000
--- a/gfx/models/stb_image.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef TIDY
-# define STB_IMAGE_IMPLEMENTATION
-# include "stb/stb_image.h"
-#endif
diff --git a/gfx/models/stb_image.impl.c b/gfx/models/stb_image.impl.c
new file mode 100644
index 0000000..38c72e9
--- /dev/null
+++ b/gfx/models/stb_image.impl.c
@@ -0,0 +1,2 @@
+#define STB_IMAGE_IMPLEMENTATION
+#include "stb/stb_image.h"
diff --git a/gfx/models/texture.h b/gfx/models/texture.h
index e029a9b..04aa9ec 100644
--- a/gfx/models/texture.h
+++ b/gfx/models/texture.h
@@ -1,5 +1,4 @@
-#ifndef TEXTURE_H
-#define TEXTURE_H
+#pragma once
#include <cache.h>
#include <filesystem>
@@ -18,5 +17,3 @@ public:
private:
glTexture m_texture;
};
-
-#endif
diff --git a/gfx/models/vertex.hpp b/gfx/models/vertex.hpp
index 3d7f933..f2e38f6 100644
--- a/gfx/models/vertex.hpp
+++ b/gfx/models/vertex.hpp
@@ -1,5 +1,4 @@
-#ifndef VERTEX_H
-#define VERTEX_H
+#pragma once
#include <glm/glm.hpp>
@@ -14,5 +13,3 @@ public:
glm::vec2 texCoord;
glm::vec3 normal;
};
-
-#endif