Index: orxonox/trunk/src/subprojects/importer/Makefile.am
===================================================================
--- orxonox/trunk/src/subprojects/importer/Makefile.am	(revision 4271)
+++ orxonox/trunk/src/subprojects/importer/Makefile.am	(revision 4272)
@@ -34,5 +34,4 @@
 
 importer_SOURCES= framework.cc \
-	          windowHandler.cc \
 	  	  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
 		  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
Index: orxonox/trunk/src/subprojects/importer/Makefile.in
===================================================================
--- orxonox/trunk/src/subprojects/importer/Makefile.in	(revision 4271)
+++ orxonox/trunk/src/subprojects/importer/Makefile.in	(revision 4272)
@@ -53,10 +53,10 @@
 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
-am_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \
-	model.$(OBJEXT) objModel.$(OBJEXT) primitive_model.$(OBJEXT) \
-	array.$(OBJEXT) material.$(OBJEXT) texture.$(OBJEXT) \
-	graphics_engine.$(OBJEXT) base_object.$(OBJEXT) \
-	vector.$(OBJEXT) resource_manager.$(OBJEXT) \
-	text_engine.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT)
+am_importer_OBJECTS = framework.$(OBJEXT) model.$(OBJEXT) \
+	objModel.$(OBJEXT) primitive_model.$(OBJEXT) array.$(OBJEXT) \
+	material.$(OBJEXT) texture.$(OBJEXT) graphics_engine.$(OBJEXT) \
+	base_object.$(OBJEXT) vector.$(OBJEXT) \
+	resource_manager.$(OBJEXT) text_engine.$(OBJEXT) \
+	p_node.$(OBJEXT) null_parent.$(OBJEXT)
 importer_OBJECTS = $(am_importer_OBJECTS)
 importer_LDADD = $(LDADD)
@@ -74,5 +74,5 @@
 @AMDEP_TRUE@	./$(DEPDIR)/resource_manager.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/vector.Po ./$(DEPDIR)/windowHandler.Po
+@AMDEP_TRUE@	./$(DEPDIR)/vector.Po
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
@@ -198,5 +198,4 @@
 AM_LDFLAGS = $(MWINDOWS)
 importer_SOURCES = framework.cc \
-	          windowHandler.cc \
 	  	  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
 		  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
@@ -296,5 +295,4 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windowHandler.Po@am__quote@
 
 .cc.o:
Index: orxonox/trunk/src/subprojects/importer/framework.cc
===================================================================
--- orxonox/trunk/src/subprojects/importer/framework.cc	(revision 4271)
+++ orxonox/trunk/src/subprojects/importer/framework.cc	(revision 4272)
@@ -19,4 +19,7 @@
 
 #include "primitive_model.h"
+#include "debug.h"
+#include "graphics_engine.h"
+
 
 
@@ -61,17 +64,10 @@
 
   Uint8* keys; // This variable will be used in the keyboard routine
-  int done=FALSE; // We aren't done yet, are we?
+  int done = false; // We aren't done yet, are we?
 
   // Create a new OpenGL window with the title "Cone3D Basecode" at
   // 640x480x32, fullscreen and check for errors along the way
-  if(wHandler.CreateGLWindow("Whandler Basecode", 800, 600, 32, FALSE) == FALSE)
-  {
-    // If an error is found, display a message, kill the GL and SDL screens (if they were created) and exit
-    PRINTF(1)("Could not initalize OpenGL :(\n\n");
-    wHandler.KillGLWindow();
-    return 0;
-  }
-  
-  PRINTF(2)("screensize: %i, %i\n", wHandler.screen->w, wHandler.screen->h);
+  GraphicsEngine::getInstance();
+
   if (argc>=3)
     obj = new OBJModel (argv[1], atof(argv[2]));
@@ -81,5 +77,5 @@
     obj = new PrimitiveModel(CYLINDER);
 
-  M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0); 
+  M = Vector(GraphicsEngine::getInstance()->getResolutionY()/2, GraphicsEngine::getInstance()->getResolutionX()/2, 0); 
   rotAxis = Vector (0.0,1.0,0.0);
   rotAngle = 0;
@@ -138,6 +134,6 @@
 	    int mX = event.button.x;
 	    int mY = event.button.y;
-	    int wH = wHandler.screen->h;
-	    int wW = wHandler.screen->w;
+	    int wH = GraphicsEngine::getInstance()->getResolutionY();
+	    int wW = GraphicsEngine::getInstance()->getResolutionX();
 	    Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) ));
 	    //	    PRINTF(0)("tmpV: %f, %f, %f\n", tmpV.x, tmpV.y, tmpV.z);
@@ -182,6 +178,6 @@
 	    int mX = event.button.x;
 	    int mY = event.button.y;
-	    int wH = wHandler.screen->h;
-	    int wW = wHandler.screen->w;
+	    int wH = GraphicsEngine::getInstance()->getResolutionY();
+	    int wW = GraphicsEngine::getInstance()->getResolutionX();
 	    Vector tmpV (mX, mY, sqrt ( (float) abs(wH * wH/4 - (wW/2-mX) * (wW/2-mX) - (wH/2-mY) * (wH/2-mY)) ));
 	    p1 = tmpV-M;
@@ -193,5 +189,5 @@
 	    PRINTF(0)("MouseButton %d pressed at (%d,%d).\n",
 		   event.button.button, event.button.x, event.button.y);
-	    rotatorV = ( (float)wHandler.screen->w/2 -event.button.x) / (float)wHandler.screen->w / 100.0;
+	    rotatorV = ( (float)GraphicsEngine::getInstance()->getResolutionY()/2 -event.button.x) / (float)GraphicsEngine::getInstance()->getResolutionY() / 100.0;
 	  }
 	    
@@ -233,5 +229,5 @@
       case SDL_QUIT:
 	// then we're done and we'll end this program
-          done=TRUE;
+          done=true;
           break;
       default:
@@ -246,5 +242,5 @@
 
     // and check if ESCAPE has been pressed. If so then quit
-    if(keys[SDLK_ESCAPE]) done=TRUE;
+    if(keys[SDLK_ESCAPE]) done=true;
   }
 
@@ -252,5 +248,5 @@
   if (obj)
     delete obj;
-  wHandler.KillGLWindow();
+  delete GraphicsEngine::getInstance();
   // And quit
   return 0;
Index: orxonox/trunk/src/subprojects/importer/framework.h
===================================================================
--- orxonox/trunk/src/subprojects/importer/framework.h	(revision 4271)
+++ orxonox/trunk/src/subprojects/importer/framework.h	(revision 4272)
@@ -2,9 +2,6 @@
 #define _FRAMEWORK_H
  
-#include "windowHandler.h" // Include the Whandler Basecode
 #include "objModel.h"
 #include "vector.h"
-
-class Vector;
 
 float rotatorP;
@@ -34,5 +31,4 @@
 bool mouse1Down;
 
-WindowHandler wHandler;  // Create an instance of the whandler basecode class
 Model* obj;
 
Index: orxonox/trunk/src/subprojects/importer/windowHandler.cc
===================================================================
--- orxonox/trunk/src/subprojects/importer/windowHandler.cc	(revision 4271)
+++ 	(revision )
@@ -1,112 +1,0 @@
-/* 
-   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: ...
-*/
-
-#include "windowHandler.h"
-#include <stdio.h>
-
-/**
-   \brief Resizes the Window
-   \param width the new size in the width.
-   \param height the new size in the height.
-*/
-void WindowHandler::ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window
-{
-	if (height==0)	// Prevent A Divide By Zero By
-	{
-		height=1;// Making Height Equal One
-	}
-
-	glViewport(0,0,width,height); // Reset The Current Viewport
-
-	
-	glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
-	glLoadIdentity();	
-
-
-	// Calculate The Aspect Ratio Of The Window
-	gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);
-	gluLookAt (0,0,15, 0,0,0, 0,1,0);
-
-	glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
-	glLoadIdentity(); // Reset The Modelview Matrix
-
-}
-
-/**
-   \brief initializes openGL
-*/
-int WindowHandler::InitGL(GLvoid)										// All Setup For OpenGL Goes Here
-{
-	glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
-	glShadeModel(GL_SMOOTH); // Enable Smooth Shading
-	glClearColor(0.00f, 0.00f, 0.00f, 0.0f); // Black Background
-	glClearDepth(1.0f);  // Depth Buffer Setup
-	glEnable(GL_DEPTH_TEST); // Enables Depth Testing
-	glDepthFunc(GL_LEQUAL);	// The Type Of Depth Testing To Do
-	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);  // Really Nice Perspective Calculations
-
-    return TRUE;
-}
-
-/**
-   \brief kills the window
-*/
-GLvoid WindowHandler::KillGLWindow(GLvoid) // Properly Kill The Window
-{
-	SDL_Quit();
-}
-
-/**
-   \brief creates a new Window for the scene
-   \param title the name of the Window
-   \param width the width of the window
-   \param height the height of the window
-   \param bits the bits per pixel to use
-   \param fullscreenflag TRUE if fullscreen FALSE if windowed/
-   \returns FALSE if initialisation failed, TRUE otherwise
-*/
-BOOL WindowHandler::CreateGLWindow(char* title, int width, int height, int bits, BOOL fullscreenflag)
-{
-	Uint32 flags;
-	int size;
-
-	/* Initialize SDL */
-	if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
-		fprintf(stderr, "Couldn't init SDL: %s\n", SDL_GetError());
-		return FALSE;
-	}
-
-	flags = SDL_OPENGL;
-	if ( fullscreenflag ) {
-		flags |= SDL_FULLSCREEN;
-	}
-	SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 1 );
-	if ( (screen = SDL_SetVideoMode(width, height, 0, flags)) == NULL ) {
-		return FALSE;
-	}
-	SDL_GL_GetAttribute( SDL_GL_STENCIL_SIZE, &size);
-
-	ReSizeGLScene(width, height); // Set Up Our Perspective GL Screen
-
-	if (!InitGL()) // Initialize Our Newly Created GL Window
-	{
-	  KillGLWindow();  // Reset The Display
-	  return FALSE;
-	}
-
-	return TRUE;
-}
-
-
Index: orxonox/trunk/src/subprojects/importer/windowHandler.h
===================================================================
--- orxonox/trunk/src/subprojects/importer/windowHandler.h	(revision 4271)
+++ 	(revision )
@@ -1,41 +1,0 @@
-/*!
-  \file windowHandler.h
-  \brief contains the WindowHandler class for the minimal display system
-*/
-
-
-#ifndef _WINDOWHANDLER_H
-#define _WINDOWHANDLER_H
-
-#include "stdincl.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <math.h>
-
-#ifdef __WIN32__
-#include <windows.h>
-#endif /* __WIN32__ */
-
-#define TRUE 1     //!< define true
-#define FALSE 0    //!< define false
-#define BOOL int   //!< define BOOL
-
-//! A simple class to handle a minimal display system
-class WindowHandler
-{
-  public:
-    WindowHandler() { };
-    ~WindowHandler() { };
-    GLvoid KillGLWindow(GLvoid);
-    BOOL CreateGLWindow(char* title, int width, int height, int bits, BOOL fullscreenflag);
-    SDL_Surface* screen;   //!< The screen to which to display the rendered stuff
-  private:
-    int InitGL(GLvoid);
-    void ReSizeGLScene(GLsizei width, GLsizei height);  
-};
-
-
-#endif
