aboutsummaryrefslogtreecommitdiff
path: root/apps/openmb/renderer/Texture.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/Texture.hpp
move to own git serverHEADmaster
Diffstat (limited to 'apps/openmb/renderer/Texture.hpp')
-rw-r--r--apps/openmb/renderer/Texture.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/openmb/renderer/Texture.hpp b/apps/openmb/renderer/Texture.hpp
new file mode 100644
index 0000000..9acb5cd
--- /dev/null
+++ b/apps/openmb/renderer/Texture.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#ifdef __APPLE__
+#include <OpenGL/gl3.h>
+#else
+#define GLFW_INCLUDE_NONE
+#include <GLFW/glfw3.h>
+#ifdef __APPLE__
+#include <OpenGL/gl3.h>
+#endif
+#endif
+#include <string>
+
+namespace renderer {
+class Texture {
+ public:
+ Texture();
+ ~Texture();
+
+ bool loadFromFile( const std::string& path, bool flip = true );
+ void bind( unsigned unit = 0 ) const;
+ GLuint id () const { return mID; }
+
+ private:
+ GLuint mID;
+};
+
+} // namespace renderer