//! Universe base class /*! * Universe base class * * Base class to develop custom universes (technically, game modules) from. * * * Copyright (C) 2007-2008 Alejandro Valenzuela Roca, * * http://mexinetica.com/~lanjoe9 * * This file is part of MotorJ, a free framework for videogame development. * * * * MotorJ is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MotorJ is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with MotorJ. If not, see . */ #include "universe-class.h" Universe * Universe::GetNextUniverse(void) { return NextUniverse; } void Universe::SetNextUniverse(Universe * next) { NextUniverse = next; } #ifdef PC_SDL void Universe::Resize(int newWidth, int newHeight) { // Handle resizing glViewport (0, 0, (GLsizei) newWidth, (GLsizei) newHeight); glMatrixMode(GL_PROJECTION); /* Reset projection matrix */ glLoadIdentity (); // SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); ? // Establish a perspective matrix gluPerspective( 60.0, (GLfloat) newWidth / (GLfloat) newHeight, 0.7,1000.0); /* Set modelview matrix as the current matrix */ glMatrixMode(GL_MODELVIEW); } #endif