/* -*- C++ -*- * Copyright ©2008 Hugo Mills * * This software is distributed under the terms of the GNU GPL * For more information on the GPL, see the file COPYING or * visit http://www.gnu.org/ * * This software is distributed without warranty */ #include "renderer.h" #include "magellan/output.h" #include "rendercontext.h" #include "magellan/configuration.h" #include "magellan/options.h" Renderer::Renderer(Configuration* c, Output* o) : /*boost::function0,*/ config(c), output(o) { } void Renderer::operator()(void) { while(RenderContext* ctx = config->nextcontext()) { if(opts->debug_render() >= 1) std::cerr << "Thread at " << this << " got context " << ctx << std::endl; ctx->render(output); // output->commit(); } // When we've run out of contexts, say so, and die if(opts->debug_render() >= 1) std::cerr << "Thread at " << this << " has no more work" << std::endl; }