* Move ILUT initialization down to below OpenGL initilization, to prevent segfaults.
authorMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 11 Jun 2007 13:46:00 +0000 (15:46 +0200)
committerMatthijs Kooijman <m.kooijman@student.utwente.nl>
Mon, 11 Jun 2007 13:46:00 +0000 (15:46 +0200)
ABM2/Amaltheia/Graphics.cpp

index 270f6c5080e747b06b7c0ae4307994d31ab92d47..68242976390b5fb89757d13d30cbfa065c1b4305 100644 (file)
@@ -373,9 +373,6 @@ int Graphics::createDisplay()
     std::cerr << "Video query failed: " << SDL_GetError() << std::endl;
     return 2;
   }
-       ilInit();
-       iluInit();
-       ilutRenderer(ILUT_OPENGL);
 
   /*
    * Now, we want to setup our requested
@@ -415,6 +412,10 @@ int Graphics::createDisplay()
     return 2;
   }
 
+  ilInit();
+  iluInit();
+  ilutRenderer(ILUT_OPENGL);
+
   SDL_SetGamma(1.8, 1.8, 1.8);
   
   float ratio = ( float ) width / ( float ) height;