diff --git a/libs/openengine/ogre/renderer.cpp b/libs/openengine/ogre/renderer.cpp index f27858a78..c27d8871a 100644 --- a/libs/openengine/ogre/renderer.cpp +++ b/libs/openengine/ogre/renderer.cpp @@ -23,29 +23,9 @@ #include #include -#if defined(__APPLE__) && !defined(__LP64__) -#include -#endif - using namespace Ogre; using namespace OEngine::Render; - -#if defined(__APPLE__) && !defined(__LP64__) - -CustomRoot::CustomRoot(const Ogre::String& pluginFileName, - const Ogre::String& configFileName, - const Ogre::String& logFileName) -: Ogre::Root(pluginFileName, configFileName, logFileName) -{} - -bool CustomRoot::isQueuedEnd() const -{ - return mQueuedEnd; -} - -#endif - void OgreRenderer::cleanup() { delete mFader; @@ -68,34 +48,7 @@ void OgreRenderer::cleanup() void OgreRenderer::start() { - //TODO: Check if we still need to do this if we're using SDL's - //message pump -#if defined(__APPLE__) && !defined(__LP64__) - // OSX Carbon Message Pump - do { - EventRef event = NULL; - EventTargetRef targetWindow; - targetWindow = GetEventDispatcherTarget(); - - // If we are unable to get the target then we no longer care about events. - if (!targetWindow) return; - - // Grab the next event while possible - while (ReceiveNextEvent(0, NULL, kEventDurationNoWait, true, &event) == noErr) - { - // Dispatch the event - SendEventToEventTarget(event, targetWindow); - ReleaseEvent(event); - } - - if (!mRoot->renderOneFrame()) { - break; - } - - } while (!mRoot->isQueuedEnd()); -#else mRoot->startRendering(); -#endif } void OgreRenderer::loadPlugins() @@ -188,11 +141,7 @@ void OgreRenderer::configure(const std::string &logPath, // Disable logging log->setDebugOutputEnabled(false); -#if defined(__APPLE__) && !defined(__LP64__) - mRoot = new CustomRoot("", "", ""); -#else mRoot = new Root("", "", ""); -#endif #if defined(ENABLE_PLUGIN_GL) || defined(ENABLE_PLUGIN_Direct3D9) || defined(ENABLE_PLUGIN_CgProgramManager) || defined(ENABLE_PLUGIN_OctreeSceneManager) || defined(ENABLE_PLUGIN_ParticleFX) loadPlugins(); diff --git a/libs/openengine/ogre/renderer.hpp b/libs/openengine/ogre/renderer.hpp index 8b73675c3..0cd0e74e8 100644 --- a/libs/openengine/ogre/renderer.hpp +++ b/libs/openengine/ogre/renderer.hpp @@ -27,18 +27,12 @@ #include "OgreTexture.h" #include -#if defined(__APPLE__) && !defined(__LP64__) -#include -#endif - struct SDL_Window; struct SDL_Surface; namespace Ogre { -#if !defined(__APPLE__) || defined(__LP64__) class Root; -#endif class RenderWindow; class SceneManager; class Camera; @@ -60,26 +54,11 @@ namespace OEngine std::string icon; }; -#if defined(__APPLE__) && !defined(__LP64__) - class CustomRoot : public Ogre::Root { - public: - bool isQueuedEnd() const; - - CustomRoot(const Ogre::String& pluginFileName = "plugins.cfg", - const Ogre::String& configFileName = "ogre.cfg", - const Ogre::String& logFileName = "Ogre.log"); - }; -#endif - class Fader; class OgreRenderer { -#if defined(__APPLE__) && !defined(__LP64__) - CustomRoot *mRoot; -#else Ogre::Root *mRoot; -#endif Ogre::RenderWindow *mWindow; SDL_Window *mSDLWindow; SDL_Surface *mWindowIconSurface;