void* sdl_renderer::create_context(i_native_surface& aSurface) { if (iContexts.find(&aSurface) != iContexts.end()) throw context_exists(); SDL_GL_SetAttribute(SDL_GL_SHARE_WITH_CURRENT_CONTEXT, 1); return (iContexts[&aSurface] = SDL_GL_CreateContext(static_cast<SDL_Window*>(aSurface.handle()))); }
BOOST_FOREACH(std::string k, order) { if (context_exists(k)) { get_logger()->debug("settings", __FILE__, __LINE__, "Activating: " + k); set_instance(k); return; } }