#include "Bugsy.h" #include "WgdKeyboard.h" #include "WgdMouse.h" using namespace wgd; OID Bugsy::_base; OID Bugsy::_scene; bool Bugsy::_debugRender = false; const float Bugsy::DEBUG_RENDER_SCALE = 50.0f; Drawable* Bugsy::lines = new Drawable(); Level Bugsy::lvl; void Bugsy::init(OID base) { //Save OID's (a WGDLib-specific thing) _base = base; _scene = base["scene"]["instances"]; //Setup debug drawing lines->mode = GL_LINES; lines->clearData = true; lines->flags &= ~LIGHTING; lines->flags &= ~DEPTH_TEST; glLineWidth(2.0f); //Input wrappers WgdKeyboard::init(); WgdMouse::init(); //Load Level lvl.load("foo"); } void Bugsy::update(float timeStep) { WgdKeyboard::update(); WgdMouse::update(); lvl.update(timeStep); if (WgdKeyboard::keyPressed('d')) _debugRender = !_debugRender; }