]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Texture.hh
big batch of changes
[chaz/yoink] / src / Moof / Texture.hh
index 5aa38e1dc85e04ea70aa5f910c6c91992b688a0f..4e311ea53a05f75689b0e7b2c31dfedf4b573135 100644 (file)
  * Image-loading and OpenGL texture loading.
  */
 
  * Image-loading and OpenGL texture loading.
  */
 
-#include <stdexcept>
-
 #include <boost/shared_ptr.hpp>
 
 #include <boost/shared_ptr.hpp>
 
-#include <Moof/Exception.hh>
 #include <Moof/OpenGL.hh>
 #include <Moof/Resource.hh>
 
 #include <Moof/OpenGL.hh>
 #include <Moof/Resource.hh>
 
@@ -52,9 +49,6 @@ typedef boost::shared_ptr<Texture> TextureP;
 
 class Texture : public Resource
 {
 
 class Texture : public Resource
 {
-       class Impl;
-       boost::shared_ptr<Impl> mImpl;
-
 public:
 
        static TextureP alloc(const std::string& name)
 public:
 
        static TextureP alloc(const std::string& name)
@@ -62,7 +56,7 @@ public:
                return TextureP(new Texture(name));
        }
 
                return TextureP(new Texture(name));
        }
 
-       Texture(const std::string& name);
+       explicit Texture(const std::string& name);
 
        void bind() const;
        GLuint getObject() const;
 
        void bind() const;
        GLuint getObject() const;
@@ -79,32 +73,10 @@ public:
 
        static std::string getPath(const std::string& name);
 
 
        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<Impl> mImpl;
 };
 
 
 };
 
 
This page took 0.020229 seconds and 4 git commands to generate.