src/Graphics/Graphics.cc
author Tero Marttila <terom@fixme.fi>
Tue, 27 Jan 2009 03:02:02 +0200
changeset 441 f769fab21a6c
parent 414 cede5463b845
permissions -rw-r--r--
fix bug with NetworkBufferOutput where push_write doesn't update offset

#include "Graphics.hh"

#include <cassert>

namespace graphics
{

// initialize the global graphics object
Graphics *graphics = NULL;

Graphics::Graphics (Engine &engine, CL_ResourceManager &resources, const DisplayConfig &display_config) :
    engine(engine), display(display_config), 
    // display must be set up before fonts, due to implicit CL_DisplayWindow
    fonts(resources), 
    // get the InputContext from display
    input(display.get_ic()->get_keyboard())
{
    assert(!graphics);

    // set the global graphics object
    graphics = this;
    
}

}