/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Benjamin Grauer co-programmer: ... this file extends the framework file, so it renders what i want. */ #include "framework.h" #include "fields.h" #include "stdlibincl.h" #include "light.h" #include "cd_engine.h" #include "md2Model.h" MD2Model* model; void Framework::moduleInit(int argc, char** argv) { CDEngine::getInstance(); //CDEngine::getInstance()->debug(); model = new MD2Model("models/tris.md2", "models/tris.pcx"); model->tick(0.1f); CDEngine::getInstance()->debugSpawnTree(10, model->data->pVertices, model->data->numVertices); LightManager* lightMan = LightManager::getInstance(); lightMan->setAmbientColor(.1,.1,.1); lightMan->addLight(); lightMan->addLight(); lightMan->setPosition(10, 20, 100); } void Framework::moduleEventHandler(SDL_Event* event) { switch (event->type) { case SDL_KEYDOWN: switch (event->key.keysym.sym) { case SDLK_i: break; case SDLK_1: printf("alsjdf;lajsfd;lajsdf\n"); break; } } } void Framework::moduleTick(float dt) { } void Framework::moduleDraw() const { CDEngine::getInstance()->drawBV(2); LightManager::getInstance()->draw(); //model->draw(); } void Framework::moduleHelp(void) const { PRINT(0)("\n"); PRINT(0)("i - print debug information of Collision-detection\n"); PRINT(0)("\n"); } void Framework::moduleInitGui(int argc, char** argv) { Window* guiMainWindow = NULL; initGUI(0, NULL); guiMainWindow = new Window("Collision_detection"); { //all the Widgets you need } Window::mainWindow->showall(); Window::mainWindow->setSize(300, 500); }