diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /apps/openmb/renderer/Texture.hpp | |
Diffstat (limited to 'apps/openmb/renderer/Texture.hpp')
| -rw-r--r-- | apps/openmb/renderer/Texture.hpp | 28 |
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 |