X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FTexture.hh;h=4e311ea53a05f75689b0e7b2c31dfedf4b573135;hp=5aa38e1dc85e04ea70aa5f910c6c91992b688a0f;hb=8a1acac01b444dccf8b57cedf08392ada2e473c1;hpb=bffc879fc8ee8167bb123310d39fad4e2f426ffd diff --git a/src/Moof/Texture.hh b/src/Moof/Texture.hh index 5aa38e1..4e311ea 100644 --- a/src/Moof/Texture.hh +++ b/src/Moof/Texture.hh @@ -34,11 +34,8 @@ * Image-loading and OpenGL texture loading. */ -#include - #include -#include #include #include @@ -52,9 +49,6 @@ typedef boost::shared_ptr TextureP; class Texture : public Resource { - class Impl; - boost::shared_ptr mImpl; - public: static TextureP alloc(const std::string& name) @@ -62,7 +56,7 @@ public: return TextureP(new Texture(name)); } - Texture(const std::string& name); + explicit Texture(const std::string& name); void bind() const; GLuint getObject() const; @@ -79,32 +73,10 @@ public: static std::string getPath(const std::string& name); +private: - struct Exception : public Mf::Exception - { - enum - { - BAD_IMAGE_FORMAT = 1024 - }; - - explicit Exception(unsigned error) : - Mf::Exception(error) {} - - void raise() - { - throw *this; - } - - const char* what() const throw() - { - switch (code) - { - case BAD_IMAGE_FORMAT: - return "unknown image format"; - } - return Mf::Exception::what(); - } - }; + class Impl; + boost::shared_ptr mImpl; };