Index: code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.cc	(revision 2241)
+++ code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.cc	(revision 2244)
@@ -43,4 +43,6 @@
 #include "util/Debug.h"
 #include "util/Exception.h"
+#include "util/String.h"
+#include "util/SubString.h"
 #include "core/ConsoleCommand.h"
 #include "core/ConfigValueIncludes.h"
@@ -82,4 +84,6 @@
     {
         SetConfigValue(resourceFile_, "resources.cfg").description("Location of the resources file in the data path.");
+        SetConfigValue(ogrePluginsFolder_, ".").description("Folder where the Ogre plugins are located.");
+        SetConfigValue(ogrePlugins_, "RenderSystem_GL, Plugin_ParticleFX").description("Comma separated list of all plugins to load.");
         SetConfigValue(statisticsRefreshCycle_, 200000).description("Sets the time in microseconds interval at which average fps, etc. get updated.");
     }
@@ -93,6 +97,11 @@
         this->ogreRoot_ = getParent()->getOgreRoot();
 
+        // load all the required plugins for Ogre
+        loadOgrePlugins();
+        // read resource declaration file
         this->declareResources();
-        this->loadRenderer();    // creates the render window
+        // Reads ogre config and creates the render window
+        this->loadRenderer();
+
         // TODO: Spread this so that this call only initialises things needed for the Console and GUI
         this->initialiseResources();
@@ -232,4 +241,22 @@
 
         ++frameCount_;
+    }
+
+    void GSGraphics::loadOgrePlugins()
+    {
+        // just to make sure the next statement doesn't segfault
+        if (ogrePluginsFolder_ == "")
+            ogrePluginsFolder_ = ".";
+
+#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+        convertToWindowsPath(&ogrePluginsFolder_);
+#else
+        convertToUnixPath(&ogrePluginsFolder_);
+#endif
+
+        // Do some SubString magic to get the comma separated list of plugins
+        SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0');
+        for (unsigned int i = 0; i < plugins.size(); ++i)
+            ogreRoot_->loadPlugin(ogrePluginsFolder_ + plugins[i]);
     }
 
Index: code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.h	(revision 2241)
+++ code/branches/buildsystem/src/orxonox/gamestates/GSGraphics.h	(revision 2244)
@@ -56,4 +56,5 @@
         void setConfigValues();
 
+        void loadOgrePlugins();
         void declareResources();
         void loadRenderer();
@@ -88,4 +89,6 @@
         // config values
         std::string           resourceFile_;          //!< resources file name
+        std::string           ogrePluginsFolder_;     //!< Folder where the Ogre plugins are located
+        std::string           ogrePlugins_;           //!< Comma separated list of all plugins to load
         unsigned int          detailLevelParticle_;   //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
     };
Index: code/branches/buildsystem/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/branches/buildsystem/src/orxonox/gamestates/GSRoot.cc	(revision 2241)
+++ code/branches/buildsystem/src/orxonox/gamestates/GSRoot.cc	(revision 2244)
@@ -286,5 +286,6 @@
             probe.close();
 
-        ogreRoot_ = new Ogre::Root(ogrePluginsFile_, ogreConfigFile_, ogreLogFile_);
+        // Leave plugins file empty. We're going to do that part manually later
+        ogreRoot_ = new Ogre::Root("", ogreConfigFile_, ogreLogFile_);
 
 #if 0 // Ogre 1.4.3 doesn't yet support setDebugOutputEnabled(.)
Index: code/branches/buildsystem/src/util/String.cc
===================================================================
--- code/branches/buildsystem/src/util/String.cc	(revision 2241)
+++ code/branches/buildsystem/src/util/String.cc	(revision 2244)
@@ -485,2 +485,38 @@
     return std::string::npos;
 }
+
+/**
+    @brief Converts a path string to windows with "\" instead of "/".
+    @param str String pointer to be manipulated
+*/
+void convertToWindowsPath(std::string* str)
+{
+    std::string& path = *str;
+    // replace all occurences of "/" with "\"
+    for (unsigned int i = 0; i < path.length(); ++i)
+    {
+        if (path[i] == '/')
+            path[i] = '\\';
+    }
+    // add an extra '\\' at the end to make it a complete path
+    if (path != "" && path[path.length() - 1] != '\\')
+        path.append("\\");
+}
+
+/**
+    @brief Converts a path string to unix with "/" instead of "\".
+    @param str String pointer to be manipulated
+*/
+void convertToUnixPath(std::string* str)
+{
+    std::string& path = *str;
+    // replace all occurences of "\" with "/"
+    for (unsigned int i = 0; i < path.length(); ++i)
+    {
+        if (path[i] == '\\')
+            path[i] = '/';
+    }
+    // add an extra '\\' at the end to make it a complete path
+    if (path != "" && path[path.length() - 1] != '/')
+        path.append("/");
+}
Index: code/branches/buildsystem/src/util/String.h
===================================================================
--- code/branches/buildsystem/src/util/String.h	(revision 2241)
+++ code/branches/buildsystem/src/util/String.h	(revision 2244)
@@ -77,3 +77,6 @@
 _UtilExport unsigned int getNextCommentPosition(const std::string& str, unsigned int start = 0);
 
+_UtilExport void         convertToWindowsPath(std::string* str);
+_UtilExport void         convertToUnixPath(std::string* str);
+
 #endif /* _Util_String_H__ */
