diff options
Diffstat (limited to 'apps/openmb/renderer/Skybox.hpp')
| -rw-r--r-- | apps/openmb/renderer/Skybox.hpp | 34 |
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 |