]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Texture.cc
destroyed global classes; view hierarchy instead
[chaz/yoink] / src / Moof / Texture.cc
index 48e6e1b6193909766df411c85757ab6393201a41..7d82e2d093416cf5190475a803de81873405d662 100644 (file)
@@ -121,12 +121,13 @@ public:
                mObject(0)
        {
                // make sure we have a video context
-               ASSERT(video &&
-                          "cannot load textures without a current video context");
+               Video* video = Video::current();
+               ASSERT(video && "should have a video context set");
 
                // we want to know when the GL context is recreated
-               mDispatchHandler = core.addHandler("video.newcontext",
-                               boost::bind(&Impl::contextRecreated, this));
+               Dispatch& dispatch = Dispatch::global();
+               mNewContextDispatch = dispatch.addTarget("video.newcontext",
+                                                       boost::bind(&Impl::contextRecreated, this));
        }
 
        ~Impl()
@@ -388,7 +389,7 @@ public:
        GLuint                          mObject;        ///< GL texture handle.
        static GLuint           gObject;        ///< Global GL texture handle.
 
-       Dispatch::Handler       mDispatchHandler;
+       Dispatch::Handle        mNewContextDispatch;
 };
 
 GLuint Texture::Impl::gObject = 0;
This page took 0.019958 seconds and 4 git commands to generate.