aboutsummaryrefslogtreecommitdiff
path: root/apps/openmb/renderer/Skybox.hpp
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /apps/openmb/renderer/Skybox.hpp
move to own git serverHEADmaster
Diffstat (limited to 'apps/openmb/renderer/Skybox.hpp')
-rw-r--r--apps/openmb/renderer/Skybox.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/apps/openmb/renderer/Skybox.hpp b/apps/openmb/renderer/Skybox.hpp
new file mode 100644
index 0000000..656494f
--- /dev/null
+++ b/apps/openmb/renderer/Skybox.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include <glm/glm.hpp>
+#include <string>
+#include <vector>
+
+#ifdef __APPLE__
+#include <OpenGL/gl3.h>
+#else
+#define GLFW_INCLUDE_NONE
+#include <GLFW/glfw3.h>
+#endif
+
+namespace renderer {
+class Skybox {
+ public:
+ Skybox();
+ ~Skybox();
+
+ bool loadFromDirectory( const std::string& dirPath );
+
+ void draw( const glm::mat4& view, const glm::mat4& proj );
+
+ private:
+ bool loadFaces( const std::vector<std::string>& faces );
+ void initMesh();
+
+ GLuint mTexID;
+ GLuint mVAO;
+ GLuint mVBO;
+ bool mInitialized;
+};
+
+} // namespace renderer