Browse Source

Register 2D library after 3D graphic library is registered.

Yao Wei Tjong 姚伟忠 11 years ago
parent
commit
7e3a6c71a3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Source/Engine/Engine/Engine.cpp

+ 2 - 1
Source/Engine/Engine/Engine.cpp

@@ -127,7 +127,6 @@ Engine::Engine(Context* context) :
     RegisterSceneLibrary(context_);
     RegisterSceneLibrary(context_);
     RegisterPhysicsLibrary(context_);
     RegisterPhysicsLibrary(context_);
     RegisterNavigationLibrary(context_);
     RegisterNavigationLibrary(context_);
-    RegisterUrho2DLibrary(context_);
 
 
     SubscribeToEvent(E_EXITREQUESTED, HANDLER(Engine, HandleExitRequested));
     SubscribeToEvent(E_EXITREQUESTED, HANDLER(Engine, HandleExitRequested));
 }
 }
@@ -157,6 +156,8 @@ bool Engine::Initialize(const VariantMap& parameters)
         // Register graphics library objects explicitly in headless mode to allow them to work without using actual GPU resources
         // Register graphics library objects explicitly in headless mode to allow them to work without using actual GPU resources
         RegisterGraphicsLibrary(context_);
         RegisterGraphicsLibrary(context_);
     }
     }
+    // 2D graphics library is dependent on 3D graphics library
+    RegisterUrho2DLibrary(context_);
 
 
     // Start logging
     // Start logging
     Log* log = GetSubsystem<Log>();
     Log* log = GetSubsystem<Log>();