]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Texture.hh
cade lab fixes
[chaz/yoink] / src / Moof / Texture.hh
index cdb6059ceff00d039a41a8b68f6bae45a543f84c..4e311ea53a05f75689b0e7b2c31dfedf4b573135 100644 (file)
@@ -34,8 +34,6 @@
  * Image-loading and OpenGL texture loading.
  */
 
-#include <stdexcept>
-
 #include <boost/shared_ptr.hpp>
 
 #include <Moof/OpenGL.hh>
 namespace Mf {
 
 
+class Texture;
+typedef boost::shared_ptr<Texture> 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> impl_;
+       boost::shared_ptr<Impl> mImpl;
 };
 
 
This page took 0.017817 seconds and 4 git commands to generate.