X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FTexture.hh;h=57102980822e4716e61c65cb759682197b7cb7c7;hp=d55f6f7309c71fe05765ac86c02abfbd53599959;hb=7e898e8ec0ff716e2fc722b883a626a6c346f107;hpb=5fa5f117f28922a7e539a432367960c1a61f837d diff --git a/src/Moof/Texture.hh b/src/Moof/Texture.hh index d55f6f7..5710298 100644 --- a/src/Moof/Texture.hh +++ b/src/Moof/Texture.hh @@ -46,9 +46,22 @@ namespace Mf { +class Texture; +typedef boost::shared_ptr TextureP; + + class Texture : public Resource { + class Impl; + boost::shared_ptr impl_; + public: + + static TextureP alloc(const std::string& name) + { + return TextureP(new Texture(name)); + } + Texture(const std::string& name); void bind() const; @@ -66,6 +79,7 @@ public: static std::string getPath(const std::string& name); + struct Exception : public Mf::Exception { enum @@ -86,15 +100,11 @@ public: switch (code) { case BAD_IMAGE_FORMAT: - return "inappropriate image format"; + return "unknown image format"; } return Mf::Exception::what(); } }; - -private: - class Impl; - boost::shared_ptr impl_; };