Index: orxonox/trunk/importer/Makefile.am
===================================================================
--- orxonox/trunk/importer/Makefile.am	(revision 2812)
+++ orxonox/trunk/importer/Makefile.am	(revision 2812)
@@ -0,0 +1,27 @@
+AM_CXXFLAGS="-I/usr/X11R6/include"
+AM_LDFLAGS="-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
+
+#"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
+
+
+bin_PROGRAMS=importer
+importer_SOURCES=framework.cc windowHandler.cc object.cc array.cc material.cc
+
+noinst_HEADERS=windowHandler.h object.h array.h material.h
+
+
+#  uncomment the following if bencoder requires the math library
+#orxonox_LDADD=-lm
+
+#EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
+
+#  if you write a self-test script named `chk', uncomment the
+#  following and add `chk' to the EXTRA_DIST list
+#TESTS=chk
+
+#  build and install the .info pages
+#info_TEXINFOS = orxonox.texinfo
+#orxonox_TEXINFOS = gpl.texinfo
+
+#  install the man pages
+#man_MANS=orxonox.1
Index: orxonox/trunk/importer/Makefile.in
===================================================================
--- orxonox/trunk/importer/Makefile.in	(revision 2812)
+++ orxonox/trunk/importer/Makefile.in	(revision 2812)
@@ -0,0 +1,428 @@
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+SOURCES = $(importer_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+bin_PROGRAMS = importer$(EXEEXT)
+subdir = importer
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+PROGRAMS = $(bin_PROGRAMS)
+am_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \
+	object.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT)
+importer_OBJECTS = $(am_importer_OBJECTS)
+importer_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/framework.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/material.Po ./$(DEPDIR)/object.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/windowHandler.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+SOURCES = $(importer_SOURCES)
+DIST_SOURCES = $(importer_SOURCES)
+HEADERS = $(noinst_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MSBITFIELDS = @MSBITFIELDS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build_alias = @build_alias@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+AM_CXXFLAGS = "-I/usr/X11R6/include"
+AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
+importer_SOURCES = framework.cc windowHandler.cc object.cc array.cc material.cc
+noinst_HEADERS = windowHandler.h object.h array.h material.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  importer/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  importer/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
+	done
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+importer$(EXEEXT): $(importer_OBJECTS) $(importer_DEPENDENCIES) 
+	@rm -f importer$(EXEEXT)
+	$(CXXLINK) $(importer_LDFLAGS) $(importer_OBJECTS) $(importer_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/framework.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windowHandler.Po@am__quote@
+
+.cc.o:
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cc.obj:
+@am__fastdepCXX_TRUE@	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	    $$tags $$unique; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am
+
+
+#  uncomment the following if bencoder requires the math library
+#orxonox_LDADD=-lm
+
+#EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
+
+#  if you write a self-test script named `chk', uncomment the
+#  following and add `chk' to the EXTRA_DIST list
+#TESTS=chk
+
+#  build and install the .info pages
+#info_TEXINFOS = orxonox.texinfo
+#orxonox_TEXINFOS = gpl.texinfo
+
+#  install the man pages
+#man_MANS=orxonox.1
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: orxonox/trunk/importer/array.cc
===================================================================
--- orxonox/trunk/importer/array.cc	(revision 2812)
+++ orxonox/trunk/importer/array.cc	(revision 2812)
@@ -0,0 +1,78 @@
+#include "array.h"
+
+Array::Array ()
+{
+  createArray ();
+}
+
+void Array::createArray ()
+{
+  if (verbose >= 2)
+    printf ("crating new Array\n");
+  firstEntry = new Entry;
+  firstEntry->next =NULL;
+  currentEntry=firstEntry;
+  finalized = false;
+  entryCount = 0; //0 means one entry
+  return;
+}
+
+void Array::finalizeArray (void)
+{
+  if (verbose >= 3)
+    printf ("Finalizing array.\n");  
+  if ((array = (GLfloat*)malloc( entryCount* sizeof(GLfloat))) == NULL)
+    printf ("could not allocate %i data Blocks\n", entryCount);
+  Entry* walker = firstEntry;
+  for (int i=0; i<entryCount; i++)
+    {
+      array[i] = walker->value;
+      walker = walker->next;
+    }
+  finalized = true;
+  return;
+}
+
+
+void Array::addEntry (GLfloat entry)
+{
+  if (!finalized)
+    {
+      if (verbose >= 3)
+	printf ("adding new Entry to Array: %f\n", entry);
+      
+      entryCount++;
+      currentEntry->value = entry;
+      currentEntry->next = new Entry;
+      currentEntry = currentEntry->next;
+      currentEntry->next = NULL;
+    }
+  else 
+    if (verbose >= 1)
+      printf ("adding failed, because list has been finalized\n");
+}
+
+void Array::addEntry (GLfloat entry0, GLfloat entry1, GLfloat entry2)
+{
+  addEntry (entry0);
+  addEntry (entry1);
+  addEntry (entry2);
+}
+  
+
+GLfloat* Array::getArray ()
+{
+  return array;
+}
+
+int Array::getCount()
+{
+  return entryCount;
+}
+
+
+
+void Array::debug ()
+{
+  printf ("entryCount=%i, address=%p\n", entryCount, array);
+}
Index: orxonox/trunk/importer/array.h
===================================================================
--- orxonox/trunk/importer/array.h	(revision 2812)
+++ orxonox/trunk/importer/array.h	(revision 2812)
@@ -0,0 +1,38 @@
+#ifndef _ARRAY_H
+#define _ARRAY_H
+
+extern int verbose;
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <fstream.h>
+class Array
+{
+ public:
+  Array ();
+
+  void createArray ();
+  void finalizeArray (void);
+  void addEntry (GLfloat entry);
+  void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2);
+  
+  GLfloat* getArray ();
+  int getCount();
+  void debug(void);
+ private:
+  struct Entry
+  {
+    GLfloat value;
+    Entry* next;
+  };
+
+  GLfloat* array;
+  int entryCount;
+  bool finalized;
+  Entry* firstEntry;
+  Entry* currentEntry;
+  
+  
+};
+
+#endif
Index: orxonox/trunk/importer/framework.cc
===================================================================
--- orxonox/trunk/importer/framework.cc	(revision 2812)
+++ orxonox/trunk/importer/framework.cc	(revision 2812)
@@ -0,0 +1,93 @@
+#include "windowHandler.h" // Include the Whandler Basecode
+#include "object.h"
+
+int verbose = 1;
+WindowHandler wHandler;  // Create an instance of the whandler basecode class
+Object* obj;
+float rotator = 0.0;
+  GLfloat whiteLight[] = {1.0, 1.0, 0.0,1.0};
+
+void DrawGLScene()
+{
+  rotator +=.001;
+  
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
+  glLoadIdentity(); // Reset the view
+  
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();	
+  gluPerspective(45.0f,500/375,0.1f,100.0f);
+  gluLookAt (5*sin(rotator),7.5,5*cos(rotator), 0,0,0, 0,1,0);
+  whiteLight[1] = .5+.5*sin(rotator*10);
+  whiteLight[2] = .5+.5*sin(rotator*10);
+
+  GLfloat lightPosition[] = {10.0*sin(rotator*10), 10, 19.0, 0.0};
+  glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
+
+  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
+  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 (argv[1]);
+
+  GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
+  glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
+  glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
+  glEnable(GL_LIGHTING);
+  glEnable(GL_LIGHT0);
+  glEnable(GL_DEPTH_TEST);
+
+  // 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/trunk/importer/material.cc
===================================================================
--- orxonox/trunk/importer/material.cc	(revision 2812)
+++ orxonox/trunk/importer/material.cc	(revision 2812)
@@ -0,0 +1,173 @@
+#include "material.h"
+
+Material::Material()
+{
+  init();
+  
+  setName ("");
+}
+
+Material::Material (char* mtlName)
+{
+  init();
+  
+  setName (mtlName);
+}
+
+Material* Material::addMaterial(char* mtlName)
+{
+  if (verbose >=2)
+    printf ("adding Material %s\n", mtlName);
+  Material* newMat = new Material(mtlName);
+  Material* tmpMat = this;
+  while (tmpMat->nextMat != NULL)
+    {
+      tmpMat = tmpMat->nextMat;
+    }
+      tmpMat->nextMat = newMat;
+      return newMat;
+  
+}
+
+void Material::init(void)
+{
+  if (verbose >= 3)
+    printf ("initializing new Material\n");
+  nextMat = NULL;
+
+  setIllum(1);
+  setDiffuse(0,0,0);
+  setAmbient(0,0,0);
+  setSpecular(0,0,0);
+  setTransparency(0.0);
+}
+
+
+void Material::setName (char* mtlName)
+{
+  if (verbose >= 3)
+    printf("setting Material Name to %s", mtlName);
+  strcpy(name, mtlName);
+  //  printf ("adding new Material: %s, %p\n", this->getName(), this);
+
+}
+char* Material::getName (void)
+{
+  return name;
+}
+
+
+void Material::setIllum (int illum)
+{
+  if (verbose >= 3)
+    printf("setting illumModel of Material %s to %i", name, illum);
+  illumModel = illum;
+  //  printf ("setting illumModel to: %i\n", illumModel);
+}
+void Material::setIllum (char* illum)
+{
+  setIllum (atoi(illum));
+}
+
+void Material::setDiffuse (float r, float g, float b)
+{
+  if (verbose >= 3)
+    printf ("setting Diffuse Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  diffuse[0] = r;
+  diffuse[1] = g;
+  diffuse[2] = b;  
+  diffuse[3] = 1.0;
+
+}
+void Material::setDiffuse (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setDiffuse (atof(r), atof(g), atof(b));
+}
+
+void Material::setAmbient (float r, float g, float b)
+{
+  if (verbose >=3)
+    printf ("setting Ambient Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  ambient[0] = r;
+  ambient[1] = g;
+  ambient[2] = b;
+  ambient[3] = 1.0;
+}
+void Material::setAmbient (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setAmbient (atof(r), atof(g), atof(b));
+}
+
+void Material::setSpecular (float r, float g, float b)
+{
+  if (verbose >= 3)
+    printf ("setting Specular Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
+  specular[0] = r;
+  specular[1] = g;
+  specular[2] = b;
+  specular[3] = 1.0;
+ }
+void Material::setSpecular (char* rgb)
+{
+  char r[20],g[20],b[20];
+  sscanf (rgb, "%s %s %s", r, g, b);
+  setSpecular (atof(r), atof(g), atof(b));
+}
+
+
+void Material::setTransparency (float trans)
+{
+  if (verbose >= 3)
+    printf ("setting Transparency of Material %s to %f\n", name, trans);
+  transparency = trans;
+}
+void Material::setTransparency (char* trans)
+{
+  char tr[20];
+  sscanf (trans, "%s", tr);
+  setTransparency (atof(tr));
+}
+
+
+Material* Material::search (char* mtlName)
+{
+  if (verbose >=3)
+    printf ("Searching for material %s", mtlName);
+  Material* searcher = this;
+  while (searcher != NULL)
+    {
+      if (verbose >= 3)
+	printf (".");
+      if (!strcmp (searcher->getName(), mtlName))
+	{
+	  if (verbose >= 3)
+	    printf ("found.\n");
+	  return searcher;
+	}
+      searcher = searcher->nextMat;
+    }
+  return NULL;
+}
+
+bool Material::select (void)
+{
+  // setting diffuse color
+  //  glColor3f (diffuse[0], diffuse[1], diffuse[2]);
+  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuse);
+
+  // setting ambient color
+  glMaterialfv(GL_FRONT, GL_AMBIENT, ambient);
+
+  // setting up Sprecular
+  glMaterialfv(GL_FRONT, GL_SPECULAR, specular);
+  
+  // setting illumination Model 
+  if (illumModel == 1)
+    glShadeModel(GL_FLAT);
+  else if (illumModel >= 2)
+    glShadeModel(GL_SMOOTH);
+}
Index: orxonox/trunk/importer/material.h
===================================================================
--- orxonox/trunk/importer/material.h	(revision 2812)
+++ orxonox/trunk/importer/material.h	(revision 2812)
@@ -0,0 +1,50 @@
+#ifndef _MATERIAL_H
+#define _MATERIAL_H
+
+extern int verbose;
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+#include <stdlib.h>
+#include <fstream.h>
+
+class Material
+{
+ public:
+  Material ();
+  Material (char* mtlName);
+  Material* addMaterial(char* mtlName);
+
+  void init(void);
+  ~Material ();
+
+
+  void setName (char* mtlName);
+  char* getName (void);
+  void setIllum (int illum);
+  void setIllum (char* illum);
+  void setDiffuse (float r, float g, float b);
+  void setDiffuse (char* rgb);
+  void setAmbient (float r, float g, float b);
+  void setAmbient (char* rgb);
+  void setSpecular (float r, float g, float b);
+  void setSpecular (char* rgb);
+  void setTransparency (float trans);
+  void setTransparency (char* trans);
+
+  Material* search (char* mtlName);
+
+  bool select (void);
+
+  Material* nextMat;
+
+ private:
+  char name [50];
+  int illumModel;
+  float diffuse [4];
+  float ambient [4];
+  float specular [4];
+  float transparency;
+
+};
+#endif
Index: orxonox/trunk/importer/object.cc
===================================================================
--- orxonox/trunk/importer/object.cc	(revision 2812)
+++ orxonox/trunk/importer/object.cc	(revision 2812)
@@ -0,0 +1,291 @@
+#include "object.h"
+
+Object::Object ()
+{
+
+  initialize();
+
+  importFile ("reaphigh.obj");
+
+  finalize();
+}
+
+Object::Object(char* fileName)
+{
+  initialize();
+
+  importFile (fileName);
+
+  finalize();
+}
+
+bool Object::importFile (char* fileName)
+{
+  if (verbose >=3)
+    printf("preparing to read in file: %s\n", fileName);   
+  objFileName = fileName;
+  this->readFromObjFile (objFileName);
+  return true;
+}
+
+bool Object::initialize (void)
+{
+  if (verbose >=3)
+    printf("new 3D-Object is being created\n"); 
+  faceMode = -1;
+  if ( (listNumber = glGenLists(1)) == 0 )
+    {
+      printf ("list could not be created for this Object\n");
+      return false;
+    }
+  glNewList (listNumber, GL_COMPILE);
+  glEnableClientState (GL_VERTEX_ARRAY);
+  glEnableClientState (GL_NORMAL_ARRAY);
+  //  glEnableClientState (GL_TEXTURE_COORD_ARRAY);
+
+  return true;
+}
+
+bool Object::finalize(void)
+{
+  if (verbose >=3)
+    printf("finalizing the 3D-Object\n"); 
+  glEndList();
+  return true;
+}
+
+void Object::draw (void)
+{
+  if (verbose >=3)
+    printf("drawing the 3D-Object\n"); 
+  glCallList (listNumber);
+}
+
+
+bool Object::readFromObjFile (char* fileName)
+{
+  OBJ_FILE = new ifstream (fileName);
+  if (!OBJ_FILE->is_open())
+    {
+      if (verbose >=1)
+	printf ("unable to open .OBJ file: %s\n", fileName);
+      return false;
+    }
+  objFileName = fileName;
+  char Buffer[500];
+  vertices = new Array();
+  normals = new Array();
+  while(!OBJ_FILE->eof())
+    {
+      OBJ_FILE->getline(Buffer, 500);
+      if (verbose >=4)
+	printf ("Read input line: %s\n",Buffer);
+      
+
+      // case vertice
+      if (!strncmp(Buffer, "v ", 2))
+	{
+	  readVertex(Buffer+2);
+	}
+
+      // case face
+      else if (!strncmp(Buffer, "f ", 2))
+	{
+	  readFace (Buffer+2);
+	}
+      
+      else if (!strncmp(Buffer, "mtllib", 6))
+	{
+	  readMtlLib (Buffer+7);
+	}
+
+      else if (!strncmp(Buffer, "usemtl", 6))
+	{
+	  readUseMtl (Buffer+7);
+	}
+
+      // case VertexNormal
+      else if (!strncmp(Buffer, "vn ", 2))
+      {
+	readVertexNormal(Buffer+3);
+      }
+
+      // case vt
+      else if (!strncmp(Buffer, "vt ", 2))
+      {
+	//	printf ("verticeTangent found");
+      }
+	  
+
+    }
+  
+
+  
+  OBJ_FILE->close();
+  glEnd();
+  
+}
+
+
+bool Object::readVertex (char* vertexString)
+{
+  readVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  char subbuffer3[20];
+  sscanf (vertexString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
+  if (verbose >= 3)
+    printf ("reading in a vertex: %s %s %s\n", subbuffer1, subbuffer2, subbuffer3);
+  vertices->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3));
+  return true;
+}
+
+bool Object::readFace (char* faceString)
+{
+  if (readVertices == true)
+    {
+      vertices->finalizeArray();
+      glVertexPointer(3, GL_FLOAT, 0, vertices->getArray());
+      normals->finalizeArray();
+      glNormalPointer(GL_FLOAT, 0, normals->getArray());
+    }
+
+  readVertices = false;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  char subbuffer3[20];
+  char subbuffer4[20] ="";
+  sscanf (faceString, "%s %s %s %s", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
+  if (!strcmp(subbuffer4, ""))
+    {
+      if (faceMode != 3)
+	{
+	  if (faceMode != -1)
+	    glEnd();
+	  glBegin(GL_TRIANGLES);
+	}
+      
+      faceMode = 3;
+      if (verbose >=3)
+	printf ("found triag: %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3);
+      addGLElement(subbuffer1);
+      addGLElement(subbuffer2);
+      addGLElement(subbuffer3);
+      return true;
+    }
+  else
+    {
+      if (faceMode != 4)
+	{
+	  if (faceMode != -1)
+	    glEnd();
+	  glBegin(GL_QUADS);
+	}
+      faceMode = 4;
+      if (verbose >=3 )
+	printf ("found quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
+      addGLElement(subbuffer1);
+      addGLElement(subbuffer2);
+      addGLElement(subbuffer3);
+      addGLElement(subbuffer4);
+      return true;
+    }
+}
+
+bool Object::addGLElement (char* elementString)
+{
+  char* vertex = elementString;
+  char* texture;
+  char* normal;
+  texture = strstr (vertex, "/");
+  texture[0] = '\0';
+  texture ++;
+  normal = strstr (texture, "/");
+  normal[0] = '\0';
+  normal ++;
+  if (verbose >= 4)
+    printf ("importing grafical Element.... including to openGL\n");
+  //glArrayElement(atoi(vertex)-1);
+  glNormal3fv(normals->getArray() +(atoi(normal)-1)*3);
+  glVertex3fv(vertices->getArray() +(atoi(vertex)-1)*3);
+
+}
+
+bool Object::readVertexNormal (char* normalString)
+{
+  readVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  char subbuffer3[20];
+  sscanf (normalString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
+  if (verbose >=3 )
+    printf("found vertex-Normal %s, %s, %s\n", subbuffer1,subbuffer2,subbuffer3);
+  normals->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3));
+  return true;
+}
+
+bool Object::readMtlLib (char* mtlFile)
+{
+  MTL_FILE = new ifstream (mtlFile);
+  if (!MTL_FILE->is_open())
+    {
+      if (verbose >= 1)
+	printf ("unable to open file: %s\n", mtlFile);
+      return false;
+    }
+  mtlFileName = mtlFile;
+  if (verbose >=2)
+    printf ("Opening mtlFile: %s\n", mtlFileName);
+  char Buffer[500];
+  vertices = new Array();
+  material = new Material();
+  Material* tmpMat = material;
+  while(!MTL_FILE->eof())
+    {
+      MTL_FILE->getline(Buffer, 500);
+      if (verbose >= 4)
+	printf("found line in mtlFile: %s\n", Buffer);
+      
+
+      // create new Material
+      if (!strncmp(Buffer, "newmtl ", 2))
+	{
+	  tmpMat = tmpMat->addMaterial(Buffer+7);
+	  //	  printf ("%s, %p\n", tmpMat->getName(), tmpMat);
+	}
+      // setting a illumMode
+      else if (!strncmp(Buffer, "illum", 5))
+	{
+	  tmpMat->setIllum(Buffer+6);
+
+	}
+      // setting Diffuse Color
+      else if (!strncmp(Buffer, "Kd", 2))
+	{
+	  tmpMat->setDiffuse(Buffer+3);
+	}
+      // setting Ambient Color
+      else if (!strncmp(Buffer, "Ka", 2))
+	{
+	  tmpMat->setAmbient(Buffer+3);
+	}
+      // setting Specular Color
+      else if (!strncmp(Buffer, "Ks", 2))
+	{
+	  tmpMat->setSpecular(Buffer+3);
+	}
+    }
+  return true;
+}
+
+bool Object::readUseMtl (char* matString)
+{
+  if (faceMode != -1)
+    glEnd();
+  faceMode = 0;
+  if (verbose >= 2)
+    printf ("using material %s for coming Faces.\n", matString);
+  material->search(matString)->select();
+}
+
+
Index: orxonox/trunk/importer/object.h
===================================================================
--- orxonox/trunk/importer/object.h	(revision 2812)
+++ orxonox/trunk/importer/object.h	(revision 2812)
@@ -0,0 +1,53 @@
+#ifndef _OBJECT_H
+#define _OBJECT_H
+
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+#include "array.h"
+#include "material.h"
+#include <fstream.h>
+
+extern int verbose;
+
+class Object
+{
+ public:
+  Object ();
+  Object (char* fileName);
+  ~Object ();
+  
+  bool importFile (char* fileName);
+  bool initialize (void);
+  bool finalize(void);
+  void draw (void);
+
+  bool readFromObjFile (char* fileName);
+
+
+ private:
+  GLuint listNumber;
+  Array* vertices;
+  int verticesCount;
+  Array* colors;
+  Array* normals;
+  char* objFileName;
+  char* mtlFileName;
+  int faceMode;
+  bool readVertices;
+  Material* material;
+
+  ifstream* OBJ_FILE;
+  ifstream* MTL_FILE;
+  
+  bool readVertex (char* vertexString);
+  bool readFace (char* faceString);
+  bool readVT (char* vtString);
+  bool readVertexNormal (char* normalString);
+  bool readMtlLib (char* matFile);
+  bool readUseMtl (char* mtlString);
+
+  bool addGLElement (char* elementString);
+};
+
+#endif
Index: orxonox/trunk/importer/windowHandler.cc
===================================================================
--- orxonox/trunk/importer/windowHandler.cc	(revision 2812)
+++ orxonox/trunk/importer/windowHandler.cc	(revision 2812)
@@ -0,0 +1,81 @@
+
+
+#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/trunk/importer/windowHandler.h
===================================================================
--- orxonox/trunk/importer/windowHandler.h	(revision 2812)
+++ orxonox/trunk/importer/windowHandler.h	(revision 2812)
@@ -0,0 +1,34 @@
+#ifndef _WINDOWHANDLER_H
+#define _WINDOWHANDLER_H
+
+extern int verbose;
+
+#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
