[Remove] Removed the ResizeWindow() function from Globals.

This commit is contained in:
Rtch90 2012-04-09 21:27:14 +01:00
parent c4789fd077
commit e894dddcb7
3 changed files with 1 additions and 17 deletions

View File

@ -1,14 +1,5 @@
#include <GL/gl.h>
#include "Globals.h"
static void ResizeWindow(int w, int h) {
SDL_SetVideoMode(w, h, 32, SDL_OPENGL | SDL_RESIZABLE);
glViewport(0,0,w,h);
glLoadIdentity();
glOrtho(0.0, 800.0, 600.0, 0.0, 0.0, 1.0);
SDL_GL_SwapBuffers();
}
SDL_Surface* screen = NULL;
SDL_Event event;

View File

@ -4,4 +4,3 @@
extern SDL_Surface* screen;
extern SDL_Event event;
static void ResizeWindow(int w, int h);

View File

@ -87,13 +87,7 @@ int main(int argc, char** argv) {
break;
}
if(event.type == SDL_VIDEORESIZE) {
// // Resize the window.
// screen = SDL_SetVideoMode(event.resize.w, event.resize.h, 32, flags);
// // Error?
// if(!screen) {
// Debug::logger->message("Window resize is screwed");
// Destroy();
// }
// Resize the window.
ResizeWindow(event.resize.w, event.resize.h);
break;
}