X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FTexture.hh;h=4e311ea53a05f75689b0e7b2c31dfedf4b573135;hp=cdb6059ceff00d039a41a8b68f6bae45a543f84c;hb=3f6e44698c38b74bb622ad81ea9d2daa636981d2;hpb=bfa6212d09d8735d8fd5e2638188e4a99f21ada4 diff --git a/src/Moof/Texture.hh b/src/Moof/Texture.hh index cdb6059..4e311ea 100644 --- a/src/Moof/Texture.hh +++ b/src/Moof/Texture.hh @@ -34,8 +34,6 @@ * Image-loading and OpenGL texture loading. */ -#include - #include #include @@ -45,10 +43,20 @@ namespace Mf { +class Texture; +typedef boost::shared_ptr TextureP; + + class Texture : public Resource { public: - Texture(const std::string& name); + + static TextureP alloc(const std::string& name) + { + return TextureP(new Texture(name)); + } + + explicit Texture(const std::string& name); void bind() const; GLuint getObject() const; @@ -65,15 +73,10 @@ public: static std::string getPath(const std::string& name); - struct Exception : std::runtime_error - { - explicit Exception(const std::string& what_arg) : - std::runtime_error(what_arg) {} - }; - private: + class Impl; - boost::shared_ptr impl_; + boost::shared_ptr mImpl; };