Index: orxonox/branches/importer/importer/framework.cc
===================================================================
--- orxonox/branches/importer/importer/framework.cc	(revision 2748)
+++ orxonox/branches/importer/importer/framework.cc	(revision 2748)
@@ -0,0 +1,73 @@
+#include "windowHandler.h" // Include the Whandler Basecode
+#include "object.h"
+
+
+WindowHandler wHandler;  // Create an instance of the whandler basecode class
+Object* obj;
+
+
+void DrawGLScene()
+{
+
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+  glLoadIdentity(); // Reset the view
+  
+  obj->draw();
+
+  SDL_GL_SwapBuffers(); // Swap the buffers
+}
+
+
+int main(int argc, char *argv[])
+{
+  Uint8* keys; // This variable will be used in the keyboard routine
+  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", 500, 375, 32, FALSE) == FALSE)
+  {
+    // If an error is found, display a message, kill the GL and SDL screens (if they were created) and exit
+    printf("Could not initalize OpenGL :(\n\n");
+    wHandler.KillGLWindow();
+    return 0;
+  }
+
+
+  obj = new Object ();
+
+  // Build the font from a TGA image font.tga in the data directory
+  // Hide the mouse cursor
+  SDL_ShowCursor(0);
+
+  // This is the main loop for the entire program and it will run until done==TRUE
+  while(!done)
+  {
+    // Draw the scene
+    DrawGLScene();
+    // And poll for events
+    SDL_Event event;
+    while ( SDL_PollEvent(&event) ) {
+      switch (event.type) {
+        // If a quit event was recieved
+        case SDL_QUIT:
+          // then we're done and we'll end this program
+          done=TRUE;
+          break;
+        default:
+          break;
+      }
+    }
+
+    // Get the state of the keyboard keys
+    keys = SDL_GetKeyState(NULL);
+
+    // and check if ESCAPE has been pressed. If so then quit
+    if(keys[SDLK_ESCAPE]) done=TRUE;
+  }
+
+  // Kill the GL & SDL screens
+  wHandler.KillGLWindow();
+  // And quit
+  return 0;
+}
Index: orxonox/branches/importer/importer/object.cc
===================================================================
--- orxonox/branches/importer/importer/object.cc	(revision 2748)
+++ orxonox/branches/importer/importer/object.cc	(revision 2748)
@@ -0,0 +1,22 @@
+#include "object.h"
+
+Object::Object ()
+{
+  listNumber = glGenLists(1);
+  glNewList (listNumber, GL_COMPILE);
+  
+  glColor3f(1.0,0,0);
+  glBegin(GL_TRIANGLES);
+  
+  glVertex3f(0,0,0);  
+  glVertex3f(0,1,0);
+  glVertex3f(1,0,0);
+  glEnd();
+  glEndList();
+}
+
+void Object::draw ()
+{
+  glCallList (listNumber);
+
+}
Index: orxonox/branches/importer/importer/object.h
===================================================================
--- orxonox/branches/importer/importer/object.h	(revision 2748)
+++ orxonox/branches/importer/importer/object.h	(revision 2748)
@@ -0,0 +1,15 @@
+#include "windowHandler.h"
+
+class Object
+{
+ public:
+  Object ();
+  ~Object ();
+  
+  void draw();
+
+
+ private:
+  GLuint listNumber;
+  
+};
Index: orxonox/branches/importer/importer/windowHandler.cc
===================================================================
--- orxonox/branches/importer/importer/windowHandler.cc	(revision 2748)
+++ orxonox/branches/importer/importer/windowHandler.cc	(revision 2748)
@@ -0,0 +1,80 @@
+
+
+#include "windowHandler.h"
+#include <stdio.h>
+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
+
+}
+
+
+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;
+}
+
+
+GLvoid WindowHandler::KillGLWindow(GLvoid)								// Properly Kill The Window
+{
+	SDL_Quit();
+}
+
+
+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 ( 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 FALSE
+	}
+
+	return TRUE;										// Success
+}
+
+
Index: orxonox/branches/importer/importer/windowHandler.h
===================================================================
--- orxonox/branches/importer/importer/windowHandler.h	(revision 2748)
+++ orxonox/branches/importer/importer/windowHandler.h	(revision 2748)
@@ -0,0 +1,32 @@
+#ifndef _WINDOWHANDLER_H
+#define _WINDOWHANDLER_H
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <SDL/SDL.h>
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+
+
+#define TRUE 1
+#define FALSE 0
+#define BOOL int
+
+class WindowHandler
+{
+  public:
+    WindowHandler() { };
+    ~WindowHandler() { };
+    GLvoid KillGLWindow(GLvoid);
+    BOOL CreateGLWindow(char* title, int width, int height, int bits, BOOL fullscreenflag);
+  private:
+    int InitGL(GLvoid);
+    void ReSizeGLScene(GLsizei width, GLsizei height);  
+};
+
+
+#endif
