diff options
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 |