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()
GLuint mObject; ///< GL texture handle.
static GLuint gObject; ///< Global GL texture handle.
- Dispatch::Handler mDispatchHandler;
+ Dispatch::Handle mNewContextDispatch;
};
GLuint Texture::Impl::gObject = 0;