diff --git a/Video.cc b/Video.cc index 7ebc981..acad7fa 100644 --- a/Video.cc +++ b/Video.cc @@ -1,5 +1,7 @@ #include "Video.h" +#include +#include #include #include using namespace std; @@ -47,6 +49,15 @@ void Video::start(int width, int height, bool fullscreen) SDL_WM_GrabInput(SDL_GRAB_ON); m_inputGrabbed = true; m_fullscreen = fullscreen; + + glEnable(GL_DEPTH_TEST); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(60.0, (double) width / (double) height, 0.01, 10000.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); } } diff --git a/ag.cc b/ag.cc index 9a15fc9..325033d 100644 --- a/ag.cc +++ b/ag.cc @@ -187,7 +187,9 @@ namespace ag int id = lua_tointeger(L, -1); Engine::Object * obj = g_engine->getObject(id); if (obj != NULL) + { obj->draw(); + } } lua_pop(L, 1); }