src/Graphics/Graphics.cc
author Tero Marttila <terom@fixme.fi>
Mon, 26 Jan 2009 19:50:52 +0200
branchconsole_gui
changeset 429 a86c7c486b14
parent 414 cede5463b845
permissions -rw-r--r--
branch off Graphics/Console development

#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;
    
}

}