Browse Source

PROFILE -> URHO3D_PROFILE

Ivan K 10 years ago
parent
commit
db15f0358e
52 changed files with 177 additions and 177 deletions
  1. 1 1
      Source/Samples/20_HugeObjectCount/HugeObjectCount.cpp
  2. 1 1
      Source/Samples/34_DynamicGeometry/DynamicGeometry.cpp
  3. 1 1
      Source/Urho3D/AngelScript/Script.cpp
  4. 3 3
      Source/Urho3D/AngelScript/ScriptFile.cpp
  5. 1 1
      Source/Urho3D/AngelScript/ScriptInstance.cpp
  6. 1 1
      Source/Urho3D/Audio/Audio.cpp
  7. 1 1
      Source/Urho3D/Audio/Sound.cpp
  8. 2 2
      Source/Urho3D/Core/Profiler.h
  9. 2 2
      Source/Urho3D/Core/Timer.cpp
  10. 1 1
      Source/Urho3D/Core/WorkQueue.cpp
  11. 2 2
      Source/Urho3D/Database/Database.cpp
  12. 4 4
      Source/Urho3D/Engine/Engine.cpp
  13. 1 1
      Source/Urho3D/Graphics/CustomGeometry.cpp
  14. 1 1
      Source/Urho3D/Graphics/DebugRenderer.cpp
  15. 1 1
      Source/Urho3D/Graphics/DecalSet.cpp
  16. 10 10
      Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp
  17. 1 1
      Source/Urho3D/Graphics/Direct3D11/D3D11Texture2D.cpp
  18. 1 1
      Source/Urho3D/Graphics/Direct3D11/D3D11Texture3D.cpp
  19. 1 1
      Source/Urho3D/Graphics/Direct3D11/D3D11TextureCube.cpp
  20. 9 9
      Source/Urho3D/Graphics/Direct3D9/D3D9Graphics.cpp
  21. 1 1
      Source/Urho3D/Graphics/Direct3D9/D3D9Texture2D.cpp
  22. 1 1
      Source/Urho3D/Graphics/Direct3D9/D3D9Texture3D.cpp
  23. 1 1
      Source/Urho3D/Graphics/Direct3D9/D3D9TextureCube.cpp
  24. 6 6
      Source/Urho3D/Graphics/Octree.cpp
  25. 8 8
      Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp
  26. 1 1
      Source/Urho3D/Graphics/OpenGL/OGLTexture2D.cpp
  27. 1 1
      Source/Urho3D/Graphics/OpenGL/OGLTexture3D.cpp
  28. 1 1
      Source/Urho3D/Graphics/OpenGL/OGLTextureCube.cpp
  29. 5 5
      Source/Urho3D/Graphics/Renderer.cpp
  30. 9 9
      Source/Urho3D/Graphics/Terrain.cpp
  31. 17 17
      Source/Urho3D/Graphics/View.cpp
  32. 1 1
      Source/Urho3D/IO/File.cpp
  33. 1 1
      Source/Urho3D/Input/Input.cpp
  34. 5 5
      Source/Urho3D/LuaScript/LuaScript.cpp
  35. 1 1
      Source/Urho3D/Navigation/CrowdAgent.cpp
  36. 1 1
      Source/Urho3D/Navigation/CrowdManager.cpp
  37. 4 4
      Source/Urho3D/Navigation/DynamicNavigationMesh.cpp
  38. 6 6
      Source/Urho3D/Navigation/NavigationMesh.cpp
  39. 1 1
      Source/Urho3D/Network/Connection.cpp
  40. 9 9
      Source/Urho3D/Network/Network.cpp
  41. 1 1
      Source/Urho3D/Physics/CollisionShape.cpp
  42. 1 1
      Source/Urho3D/Physics/Constraint.cpp
  43. 10 10
      Source/Urho3D/Physics/PhysicsWorld.cpp
  44. 1 1
      Source/Urho3D/Physics/RigidBody.cpp
  45. 10 10
      Source/Urho3D/Resource/Image.cpp
  46. 1 1
      Source/Urho3D/Resource/ResourceCache.cpp
  47. 1 1
      Source/Urho3D/Scene/Node.cpp
  48. 15 15
      Source/Urho3D/Scene/Scene.cpp
  49. 2 2
      Source/Urho3D/UI/Font.cpp
  50. 6 6
      Source/Urho3D/UI/UI.cpp
  51. 2 2
      Source/Urho3D/Urho2D/PhysicsWorld2D.cpp
  52. 2 2
      Source/Urho3D/Urho2D/Renderer2D.cpp

+ 1 - 1
Source/Samples/20_HugeObjectCount/HugeObjectCount.cpp

@@ -230,7 +230,7 @@ void HugeObjectCount::MoveCamera(float timeStep)
 
 
 void HugeObjectCount::AnimateObjects(float timeStep)
 void HugeObjectCount::AnimateObjects(float timeStep)
 {
 {
-    PROFILE(AnimateObjects);
+    URHO3D_PROFILE(AnimateObjects);
 
 
     const float ROTATE_SPEED = 15.0f;
     const float ROTATE_SPEED = 15.0f;
     // Rotate about the Z axis (roll)
     // Rotate about the Z axis (roll)

+ 1 - 1
Source/Samples/34_DynamicGeometry/DynamicGeometry.cpp

@@ -319,7 +319,7 @@ void DynamicGeometry::MoveCamera(float timeStep)
 
 
 void DynamicGeometry::AnimateObjects(float timeStep)
 void DynamicGeometry::AnimateObjects(float timeStep)
 {
 {
-    PROFILE(AnimateObjects);
+    URHO3D_PROFILE(AnimateObjects);
 
 
     time_ += timeStep * 100.0f;
     time_ += timeStep * 100.0f;
 
 

+ 1 - 1
Source/Urho3D/AngelScript/Script.cpp

@@ -166,7 +166,7 @@ Script::~Script()
 bool Script::Execute(const String& line)
 bool Script::Execute(const String& line)
 {
 {
     // Note: compiling code each time is slow. Not to be used for performance-critical or repeating activity
     // Note: compiling code each time is slow. Not to be used for performance-critical or repeating activity
-    PROFILE(ExecuteImmediate);
+    URHO3D_PROFILE(ExecuteImmediate);
 
 
     ClearObjectTypeCache();
     ClearObjectTypeCache();
 
 

+ 3 - 3
Source/Urho3D/AngelScript/ScriptFile.cpp

@@ -285,7 +285,7 @@ bool ScriptFile::Execute(const String& declaration, const VariantVector& paramet
 
 
 bool ScriptFile::Execute(asIScriptFunction* function, const VariantVector& parameters, bool unprepare)
 bool ScriptFile::Execute(asIScriptFunction* function, const VariantVector& parameters, bool unprepare)
 {
 {
-    PROFILE(ExecuteFunction);
+    URHO3D_PROFILE(ExecuteFunction);
 
 
     if (!compiled_ || !function)
     if (!compiled_ || !function)
         return false;
         return false;
@@ -326,7 +326,7 @@ bool ScriptFile::Execute(asIScriptObject* object, const String& declaration, con
 
 
 bool ScriptFile::Execute(asIScriptObject* object, asIScriptFunction* method, const VariantVector& parameters, bool unprepare)
 bool ScriptFile::Execute(asIScriptObject* object, asIScriptFunction* method, const VariantVector& parameters, bool unprepare)
 {
 {
-    PROFILE(ExecuteMethod);
+    URHO3D_PROFILE(ExecuteMethod);
 
 
     if (!compiled_ || !object || !method)
     if (!compiled_ || !object || !method)
         return false;
         return false;
@@ -386,7 +386,7 @@ void ScriptFile::ClearDelayedExecute(const String& declaration)
 
 
 asIScriptObject* ScriptFile::CreateObject(const String& className, bool useInterface)
 asIScriptObject* ScriptFile::CreateObject(const String& className, bool useInterface)
 {
 {
-    PROFILE(CreateObject);
+    URHO3D_PROFILE(CreateObject);
 
 
     if (!compiled_)
     if (!compiled_)
         return 0;
         return 0;

+ 1 - 1
Source/Urho3D/AngelScript/ScriptInstance.cpp

@@ -519,7 +519,7 @@ void ScriptInstance::CreateObject()
     if (!scriptFile_ || className_.Empty())
     if (!scriptFile_ || className_.Empty())
         return;
         return;
 
 
-    PROFILE(CreateScriptObject);
+    URHO3D_PROFILE(CreateScriptObject);
 
 
     scriptObject_ = scriptFile_->CreateObject(className_);
     scriptObject_ = scriptFile_->CreateObject(className_);
     if (scriptObject_)
     if (scriptObject_)

+ 1 - 1
Source/Urho3D/Audio/Audio.cpp

@@ -141,7 +141,7 @@ bool Audio::SetMode(int bufferLengthMSec, int mixRate, bool stereo, bool interpo
 
 
 void Audio::Update(float timeStep)
 void Audio::Update(float timeStep)
 {
 {
-    PROFILE(UpdateAudio);
+    URHO3D_PROFILE(UpdateAudio);
 
 
     // Update in reverse order, because sound sources might remove themselves
     // Update in reverse order, because sound sources might remove themselves
     for (unsigned i = soundSources_.Size() - 1; i < soundSources_.Size(); --i)
     for (unsigned i = soundSources_.Size() - 1; i < soundSources_.Size(); --i)

+ 1 - 1
Source/Urho3D/Audio/Sound.cpp

@@ -83,7 +83,7 @@ void Sound::RegisterObject(Context* context)
 
 
 bool Sound::BeginLoad(Deserializer& source)
 bool Sound::BeginLoad(Deserializer& source)
 {
 {
-    PROFILE(LoadSound);
+    URHO3D_PROFILE(LoadSound);
 
 
     bool success;
     bool success;
     if (GetExtension(source.GetName()) == ".ogg")
     if (GetExtension(source.GetName()) == ".ogg")

+ 2 - 2
Source/Urho3D/Core/Profiler.h

@@ -256,9 +256,9 @@ private:
 };
 };
 
 
 #ifdef URHO3D_PROFILING
 #ifdef URHO3D_PROFILING
-#define PROFILE(name) Urho3D::AutoProfileBlock profile_ ## name (GetSubsystem<Urho3D::Profiler>(), #name)
+#define URHO3D_PROFILE(name) Urho3D::AutoProfileBlock profile_ ## name (GetSubsystem<Urho3D::Profiler>(), #name)
 #else
 #else
-#define PROFILE(name)
+#define URHO3D_PROFILE(name)
 #endif
 #endif
 
 
 }
 }

+ 2 - 2
Source/Urho3D/Core/Timer.cpp

@@ -115,7 +115,7 @@ void Time::BeginFrame(float timeStep)
         profiler->BeginFrame();
         profiler->BeginFrame();
 
 
     {
     {
-        PROFILE(BeginFrame);
+        URHO3D_PROFILE(BeginFrame);
 
 
         // Frame begin event
         // Frame begin event
         using namespace BeginFrame;
         using namespace BeginFrame;
@@ -130,7 +130,7 @@ void Time::BeginFrame(float timeStep)
 void Time::EndFrame()
 void Time::EndFrame()
 {
 {
     {
     {
-        PROFILE(EndFrame);
+        URHO3D_PROFILE(EndFrame);
 
 
         // Frame end event
         // Frame end event
         SendEvent(E_ENDFRAME);
         SendEvent(E_ENDFRAME);

+ 1 - 1
Source/Urho3D/Core/WorkQueue.cpp

@@ -397,7 +397,7 @@ void WorkQueue::HandleBeginFrame(StringHash eventType, VariantMap& eventData)
     // If no worker threads, complete low-priority work here
     // If no worker threads, complete low-priority work here
     if (threads_.Empty() && !queue_.Empty())
     if (threads_.Empty() && !queue_.Empty())
     {
     {
-        PROFILE(CompleteWorkNonthreaded);
+        URHO3D_PROFILE(CompleteWorkNonthreaded);
 
 
         HiresTimer timer;
         HiresTimer timer;
 
 

+ 2 - 2
Source/Urho3D/Database/Database.cpp

@@ -49,7 +49,7 @@ DBAPI Database::GetAPI()
 
 
 DbConnection* Database::Connect(const String& connectionString)
 DbConnection* Database::Connect(const String& connectionString)
 {
 {
-    PROFILE(DatabaseConnect);
+    URHO3D_PROFILE(DatabaseConnect);
 
 
     SharedPtr<DbConnection> connection;
     SharedPtr<DbConnection> connection;
     if (IsPooling())
     if (IsPooling())
@@ -80,7 +80,7 @@ void Database::Disconnect(DbConnection* connection)
     if (!connection)
     if (!connection)
         return;
         return;
 
 
-    PROFILE(DatabaseDisconnect);
+    URHO3D_PROFILE(DatabaseDisconnect);
 
 
     SharedPtr<DbConnection> dbConnection(connection);
     SharedPtr<DbConnection> dbConnection(connection);
     connections_.Remove(dbConnection);
     connections_.Remove(dbConnection);

+ 4 - 4
Source/Urho3D/Engine/Engine.cpp

@@ -157,7 +157,7 @@ bool Engine::Initialize(const VariantMap& parameters)
     if (initialized_)
     if (initialized_)
         return true;
         return true;
 
 
-    PROFILE(InitEngine);
+    URHO3D_PROFILE(InitEngine);
 
 
     // Set headless mode
     // Set headless mode
     headless_ = GetParameter(parameters, "Headless", false).GetBool();
     headless_ = GetParameter(parameters, "Headless", false).GetBool();
@@ -634,7 +634,7 @@ void Engine::DumpMemory()
 
 
 void Engine::Update()
 void Engine::Update()
 {
 {
-    PROFILE(Update);
+    URHO3D_PROFILE(Update);
 
 
     // Logic update event
     // Logic update event
     using namespace Update;
     using namespace Update;
@@ -658,7 +658,7 @@ void Engine::Render()
     if (headless_)
     if (headless_)
         return;
         return;
 
 
-    PROFILE(Render);
+    URHO3D_PROFILE(Render);
 
 
     // If device is lost, BeginFrame will fail and we skip rendering
     // If device is lost, BeginFrame will fail and we skip rendering
     Graphics* graphics = GetSubsystem<Graphics>();
     Graphics* graphics = GetSubsystem<Graphics>();
@@ -686,7 +686,7 @@ void Engine::ApplyFrameLimit()
     // Perform waiting loop if maximum FPS set
     // Perform waiting loop if maximum FPS set
     if (maxFps)
     if (maxFps)
     {
     {
-        PROFILE(ApplyFrameLimit);
+        URHO3D_PROFILE(ApplyFrameLimit);
 
 
         long long targetMax = 1000000LL / maxFps;
         long long targetMax = 1000000LL / maxFps;
 
 

+ 1 - 1
Source/Urho3D/Graphics/CustomGeometry.cpp

@@ -328,7 +328,7 @@ void CustomGeometry::DefineGeometry(unsigned index, PrimitiveType type, unsigned
 
 
 void CustomGeometry::Commit()
 void CustomGeometry::Commit()
 {
 {
-    PROFILE(CommitCustomGeometry);
+    URHO3D_PROFILE(CommitCustomGeometry);
 
 
     unsigned totalVertices = 0;
     unsigned totalVertices = 0;
     boundingBox_.Clear();
     boundingBox_.Clear();

+ 1 - 1
Source/Urho3D/Graphics/DebugRenderer.cpp

@@ -398,7 +398,7 @@ void DebugRenderer::Render()
     // Engine does not render when window is closed or device is lost
     // Engine does not render when window is closed or device is lost
     assert(graphics && graphics->IsInitialized() && !graphics->IsDeviceLost());
     assert(graphics && graphics->IsInitialized() && !graphics->IsDeviceLost());
 
 
-    PROFILE(RenderDebugGeometry);
+    URHO3D_PROFILE(RenderDebugGeometry);
 
 
     ShaderVariation* vs = graphics->GetShader(VS, "Basic", "VERTEXCOLOR");
     ShaderVariation* vs = graphics->GetShader(VS, "Basic", "VERTEXCOLOR");
     ShaderVariation* ps = graphics->GetShader(PS, "Basic", "VERTEXCOLOR");
     ShaderVariation* ps = graphics->GetShader(PS, "Basic", "VERTEXCOLOR");

+ 1 - 1
Source/Urho3D/Graphics/DecalSet.cpp

@@ -293,7 +293,7 @@ bool DecalSet::AddDecal(Drawable* target, const Vector3& worldPosition, const Qu
     float aspectRatio, float depth, const Vector2& topLeftUV, const Vector2& bottomRightUV, float timeToLive, float normalCutoff,
     float aspectRatio, float depth, const Vector2& topLeftUV, const Vector2& bottomRightUV, float timeToLive, float normalCutoff,
     unsigned subGeometry)
     unsigned subGeometry)
 {
 {
-    PROFILE(AddDecal);
+    URHO3D_PROFILE(AddDecal);
 
 
     // Do not add decals in headless mode
     // Do not add decals in headless mode
     if (!node_ || !GetSubsystem<Graphics>())
     if (!node_ || !GetSubsystem<Graphics>())

+ 10 - 10
Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -388,7 +388,7 @@ void Graphics::SetWindowPosition(int x, int y)
 bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer,
 bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer,
     int multiSample)
     int multiSample)
 {
 {
-    PROFILE(SetScreenMode);
+    URHO3D_PROFILE(SetScreenMode);
 
 
     bool maximize = false;
     bool maximize = false;
 
 
@@ -564,7 +564,7 @@ void Graphics::Close()
 
 
 bool Graphics::TakeScreenShot(Image& destImage)
 bool Graphics::TakeScreenShot(Image& destImage)
 {
 {
-    PROFILE(TakeScreenShot);
+    URHO3D_PROFILE(TakeScreenShot);
 
 
     if (!impl_->device_)
     if (!impl_->device_)
         return false;
         return false;
@@ -687,7 +687,7 @@ void Graphics::EndFrame()
         return;
         return;
 
 
     {
     {
-        PROFILE(Present);
+        URHO3D_PROFILE(Present);
 
 
         SendEvent(E_ENDRENDERING);
         SendEvent(E_ENDRENDERING);
 
 
@@ -760,7 +760,7 @@ bool Graphics::ResolveToTexture(Texture2D* destination, const IntRect& viewport)
     if (!destination || !destination->GetRenderSurface())
     if (!destination || !destination->GetRenderSurface())
         return false;
         return false;
 
 
-    PROFILE(ResolveToTexture);
+    URHO3D_PROFILE(ResolveToTexture);
 
 
     IntRect vpCopy = viewport;
     IntRect vpCopy = viewport;
     if (vpCopy.right_ <= vpCopy.left_)
     if (vpCopy.right_ <= vpCopy.left_)
@@ -994,7 +994,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
         {
         {
             if (vs->GetCompilerOutput().Empty())
             if (vs->GetCompilerOutput().Empty())
             {
             {
-                PROFILE(CompileVertexShader);
+                URHO3D_PROFILE(CompileVertexShader);
 
 
                 bool success = vs->Create();
                 bool success = vs->Create();
                 if (!success)
                 if (!success)
@@ -1018,7 +1018,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
         {
         {
             if (ps->GetCompilerOutput().Empty())
             if (ps->GetCompilerOutput().Empty())
             {
             {
-                PROFILE(CompilePixelShader);
+                URHO3D_PROFILE(CompilePixelShader);
 
 
                 bool success = ps->Create();
                 bool success = ps->Create();
                 if (!success)
                 if (!success)
@@ -1677,7 +1677,7 @@ void Graphics::EndDumpShaders()
 
 
 void Graphics::PrecacheShaders(Deserializer& source)
 void Graphics::PrecacheShaders(Deserializer& source)
 {
 {
-    PROFILE(PrecacheShaders);
+    URHO3D_PROFILE(PrecacheShaders);
 
 
     ShaderPrecache::LoadShaders(this, source);
     ShaderPrecache::LoadShaders(this, source);
 }
 }
@@ -2559,7 +2559,7 @@ void Graphics::PrepareDraw()
             HashMap<unsigned, ID3D11BlendState*>::Iterator i = impl_->blendStates_.Find(newBlendStateHash);
             HashMap<unsigned, ID3D11BlendState*>::Iterator i = impl_->blendStates_.Find(newBlendStateHash);
             if (i == impl_->blendStates_.End())
             if (i == impl_->blendStates_.End())
             {
             {
-                PROFILE(CreateBlendState);
+                URHO3D_PROFILE(CreateBlendState);
 
 
                 D3D11_BLEND_DESC stateDesc;
                 D3D11_BLEND_DESC stateDesc;
                 memset(&stateDesc, 0, sizeof stateDesc);
                 memset(&stateDesc, 0, sizeof stateDesc);
@@ -2600,7 +2600,7 @@ void Graphics::PrepareDraw()
             HashMap<unsigned, ID3D11DepthStencilState*>::Iterator i = impl_->depthStates_.Find(newDepthStateHash);
             HashMap<unsigned, ID3D11DepthStencilState*>::Iterator i = impl_->depthStates_.Find(newDepthStateHash);
             if (i == impl_->depthStates_.End())
             if (i == impl_->depthStates_.End())
             {
             {
-                PROFILE(CreateDepthState);
+                URHO3D_PROFILE(CreateDepthState);
 
 
                 D3D11_DEPTH_STENCIL_DESC stateDesc;
                 D3D11_DEPTH_STENCIL_DESC stateDesc;
                 memset(&stateDesc, 0, sizeof stateDesc);
                 memset(&stateDesc, 0, sizeof stateDesc);
@@ -2650,7 +2650,7 @@ void Graphics::PrepareDraw()
             HashMap<unsigned, ID3D11RasterizerState*>::Iterator i = impl_->rasterizerStates_.Find(newRasterizerStateHash);
             HashMap<unsigned, ID3D11RasterizerState*>::Iterator i = impl_->rasterizerStates_.Find(newRasterizerStateHash);
             if (i == impl_->rasterizerStates_.End())
             if (i == impl_->rasterizerStates_.End())
             {
             {
-                PROFILE(CreateRasterizerState);
+                URHO3D_PROFILE(CreateRasterizerState);
 
 
                 D3D11_RASTERIZER_DESC stateDesc;
                 D3D11_RASTERIZER_DESC stateDesc;
                 memset(&stateDesc, 0, sizeof stateDesc);
                 memset(&stateDesc, 0, sizeof stateDesc);

+ 1 - 1
Source/Urho3D/Graphics/Direct3D11/D3D11Texture2D.cpp

@@ -166,7 +166,7 @@ bool Texture2D::SetSize(int width, int height, unsigned format, TextureUsage usa
 
 
 bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, const void* data)
 bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_)
     if (!object_)
     {
     {

+ 1 - 1
Source/Urho3D/Graphics/Direct3D11/D3D11Texture3D.cpp

@@ -212,7 +212,7 @@ bool Texture3D::SetSize(int width, int height, int depth, unsigned format, Textu
 
 
 bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int height, int depth, const void* data)
 bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int height, int depth, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_)
     if (!object_)
     {
     {

+ 1 - 1
Source/Urho3D/Graphics/Direct3D11/D3D11TextureCube.cpp

@@ -328,7 +328,7 @@ bool TextureCube::SetSize(int size, unsigned format, TextureUsage usage)
 
 
 bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int width, int height, const void* data)
 bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int width, int height, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_)
     if (!object_)
     {
     {

+ 9 - 9
Source/Urho3D/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -387,7 +387,7 @@ void Graphics::SetWindowPosition(int x, int y)
 bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer,
 bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer,
     int multiSample)
     int multiSample)
 {
 {
-    PROFILE(SetScreenMode);
+    URHO3D_PROFILE(SetScreenMode);
 
 
     bool maximize = false;
     bool maximize = false;
 
 
@@ -616,7 +616,7 @@ void Graphics::Close()
 
 
 bool Graphics::TakeScreenShot(Image& destImage)
 bool Graphics::TakeScreenShot(Image& destImage)
 {
 {
-    PROFILE(TakeScreenShot);
+    URHO3D_PROFILE(TakeScreenShot);
 
 
     if (!impl_->device_)
     if (!impl_->device_)
         return false;
         return false;
@@ -756,7 +756,7 @@ bool Graphics::BeginFrame()
     HRESULT hr = impl_->device_->TestCooperativeLevel();
     HRESULT hr = impl_->device_->TestCooperativeLevel();
     if (hr != D3D_OK)
     if (hr != D3D_OK)
     {
     {
-        PROFILE(DeviceLost);
+        URHO3D_PROFILE(DeviceLost);
 
 
         deviceLost_ = true;
         deviceLost_ = true;
 
 
@@ -797,7 +797,7 @@ void Graphics::EndFrame()
         return;
         return;
 
 
     {
     {
-        PROFILE(Present);
+        URHO3D_PROFILE(Present);
 
 
         SendEvent(E_ENDRENDERING);
         SendEvent(E_ENDRENDERING);
 
 
@@ -811,7 +811,7 @@ void Graphics::EndFrame()
     {
     {
         if (queryIssued_)
         if (queryIssued_)
         {
         {
-            PROFILE(FlushGPU);
+            URHO3D_PROFILE(FlushGPU);
 
 
             while (impl_->frameQuery_->GetData(0, 0, D3DGETDATA_FLUSH) == S_FALSE)
             while (impl_->frameQuery_->GetData(0, 0, D3DGETDATA_FLUSH) == S_FALSE)
             {
             {
@@ -849,7 +849,7 @@ bool Graphics::ResolveToTexture(Texture2D* destination, const IntRect& viewport)
     if (!destination || !destination->GetRenderSurface())
     if (!destination || !destination->GetRenderSurface())
         return false;
         return false;
 
 
-    PROFILE(ResolveToTexture);
+    URHO3D_PROFILE(ResolveToTexture);
 
 
     IntRect vpCopy = viewport;
     IntRect vpCopy = viewport;
     if (vpCopy.right_ <= vpCopy.left_)
     if (vpCopy.right_ <= vpCopy.left_)
@@ -1053,7 +1053,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
         {
         {
             if (vs->GetCompilerOutput().Empty())
             if (vs->GetCompilerOutput().Empty())
             {
             {
-                PROFILE(CompileVertexShader);
+                URHO3D_PROFILE(CompileVertexShader);
 
 
                 bool success = vs->Create();
                 bool success = vs->Create();
                 if (!success)
                 if (!success)
@@ -1083,7 +1083,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
         {
         {
             if (ps->GetCompilerOutput().Empty())
             if (ps->GetCompilerOutput().Empty())
             {
             {
-                PROFILE(CompilePixelShader);
+                URHO3D_PROFILE(CompilePixelShader);
 
 
                 bool success = ps->Create();
                 bool success = ps->Create();
                 if (!success)
                 if (!success)
@@ -1868,7 +1868,7 @@ void Graphics::EndDumpShaders()
 
 
 void Graphics::PrecacheShaders(Deserializer& source)
 void Graphics::PrecacheShaders(Deserializer& source)
 {
 {
-    PROFILE(PrecacheShaders);
+    URHO3D_PROFILE(PrecacheShaders);
 
 
     ShaderPrecache::LoadShaders(this, source);
     ShaderPrecache::LoadShaders(this, source);
 }
 }

+ 1 - 1
Source/Urho3D/Graphics/Direct3D9/D3D9Texture2D.cpp

@@ -199,7 +199,7 @@ bool Texture2D::SetSize(int width, int height, unsigned format, TextureUsage usa
 
 
 bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, const void* data)
 bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_)
     if (!object_)
     {
     {

+ 1 - 1
Source/Urho3D/Graphics/Direct3D9/D3D9Texture3D.cpp

@@ -241,7 +241,7 @@ bool Texture3D::SetSize(int width, int height, int depth, unsigned format, Textu
 
 
 bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int height, int depth, const void* data)
 bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int height, int depth, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_)
     if (!object_)
     {
     {

+ 1 - 1
Source/Urho3D/Graphics/Direct3D9/D3D9TextureCube.cpp

@@ -356,7 +356,7 @@ bool TextureCube::SetSize(int size, unsigned format, TextureUsage usage)
 
 
 bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int width, int height, const void* data)
 bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int width, int height, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_)
     if (!object_)
     {
     {

+ 6 - 6
Source/Urho3D/Graphics/Octree.cpp

@@ -375,7 +375,7 @@ void Octree::DrawDebugGeometry(DebugRenderer* debug, bool depthTest)
 {
 {
     if (debug)
     if (debug)
     {
     {
-        PROFILE(OctreeDrawDebug);
+        URHO3D_PROFILE(OctreeDrawDebug);
 
 
         Octant::DrawDebugGeometry(debug, depthTest);
         Octant::DrawDebugGeometry(debug, depthTest);
     }
     }
@@ -383,7 +383,7 @@ void Octree::DrawDebugGeometry(DebugRenderer* debug, bool depthTest)
 
 
 void Octree::SetSize(const BoundingBox& box, unsigned numLevels)
 void Octree::SetSize(const BoundingBox& box, unsigned numLevels)
 {
 {
-    PROFILE(ResizeOctree);
+    URHO3D_PROFILE(ResizeOctree);
 
 
     // If drawables exist, they are temporarily moved to the root
     // If drawables exist, they are temporarily moved to the root
     for (unsigned i = 0; i < NUM_OCTANTS; ++i)
     for (unsigned i = 0; i < NUM_OCTANTS; ++i)
@@ -399,7 +399,7 @@ void Octree::Update(const FrameInfo& frame)
     // Let drawables update themselves before reinsertion. This can be used for animation
     // Let drawables update themselves before reinsertion. This can be used for animation
     if (!drawableUpdates_.Empty())
     if (!drawableUpdates_.Empty())
     {
     {
-        PROFILE(UpdateDrawables);
+        URHO3D_PROFILE(UpdateDrawables);
 
 
         // Perform updates in worker threads. Notify the scene that a threaded update is going on and components
         // Perform updates in worker threads. Notify the scene that a threaded update is going on and components
         // (for example physics objects) should not perform non-threadsafe work when marked dirty
         // (for example physics objects) should not perform non-threadsafe work when marked dirty
@@ -450,7 +450,7 @@ void Octree::Update(const FrameInfo& frame)
     // the proper octant yet
     // the proper octant yet
     if (!drawableUpdates_.Empty())
     if (!drawableUpdates_.Empty())
     {
     {
-        PROFILE(ReinsertToOctree);
+        URHO3D_PROFILE(ReinsertToOctree);
 
 
         for (PODVector<Drawable*>::Iterator i = drawableUpdates_.Begin(); i != drawableUpdates_.End(); ++i)
         for (PODVector<Drawable*>::Iterator i = drawableUpdates_.Begin(); i != drawableUpdates_.End(); ++i)
         {
         {
@@ -509,7 +509,7 @@ void Octree::GetDrawables(OctreeQuery& query) const
 
 
 void Octree::Raycast(RayOctreeQuery& query) const
 void Octree::Raycast(RayOctreeQuery& query) const
 {
 {
-    PROFILE(Raycast);
+    URHO3D_PROFILE(Raycast);
 
 
     query.result_.Clear();
     query.result_.Clear();
 
 
@@ -567,7 +567,7 @@ void Octree::Raycast(RayOctreeQuery& query) const
 
 
 void Octree::RaycastSingle(RayOctreeQuery& query) const
 void Octree::RaycastSingle(RayOctreeQuery& query) const
 {
 {
-    PROFILE(Raycast);
+    URHO3D_PROFILE(Raycast);
 
 
     query.result_.Clear();
     query.result_.Clear();
     rayQueryDrawables_.Clear();
     rayQueryDrawables_.Clear();

+ 8 - 8
Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp

@@ -322,7 +322,7 @@ void Graphics::SetWindowPosition(int x, int y)
 bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer,
 bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless, bool resizable, bool vsync, bool tripleBuffer,
     int multiSample)
     int multiSample)
 {
 {
-    PROFILE(SetScreenMode);
+    URHO3D_PROFILE(SetScreenMode);
 
 
     bool maximize = false;
     bool maximize = false;
 
 
@@ -615,7 +615,7 @@ void Graphics::Close()
 
 
 bool Graphics::TakeScreenShot(Image& destImage)
 bool Graphics::TakeScreenShot(Image& destImage)
 {
 {
-    PROFILE(TakeScreenShot);
+    URHO3D_PROFILE(TakeScreenShot);
 
 
     ResetRenderTargets();
     ResetRenderTargets();
 
 
@@ -666,7 +666,7 @@ void Graphics::EndFrame()
     if (!IsInitialized())
     if (!IsInitialized())
         return;
         return;
 
 
-    PROFILE(Present);
+    URHO3D_PROFILE(Present);
 
 
     SendEvent(E_ENDRENDERING);
     SendEvent(E_ENDRENDERING);
 
 
@@ -733,7 +733,7 @@ bool Graphics::ResolveToTexture(Texture2D* destination, const IntRect& viewport)
     if (!destination || !destination->GetRenderSurface())
     if (!destination || !destination->GetRenderSurface())
         return false;
         return false;
 
 
-    PROFILE(ResolveToTexture);
+    URHO3D_PROFILE(ResolveToTexture);
 
 
     IntRect vpCopy = viewport;
     IntRect vpCopy = viewport;
     if (vpCopy.right_ <= vpCopy.left_)
     if (vpCopy.right_ <= vpCopy.left_)
@@ -961,7 +961,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
     {
     {
         if (vs->GetCompilerOutput().Empty())
         if (vs->GetCompilerOutput().Empty())
         {
         {
-            PROFILE(CompileVertexShader);
+            URHO3D_PROFILE(CompileVertexShader);
 
 
             bool success = vs->Create();
             bool success = vs->Create();
             if (success)
             if (success)
@@ -980,7 +980,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
     {
     {
         if (ps->GetCompilerOutput().Empty())
         if (ps->GetCompilerOutput().Empty())
         {
         {
-            PROFILE(CompilePixelShader);
+            URHO3D_PROFILE(CompilePixelShader);
 
 
             bool success = ps->Create();
             bool success = ps->Create();
             if (success)
             if (success)
@@ -1027,7 +1027,7 @@ void Graphics::SetShaders(ShaderVariation* vs, ShaderVariation* ps)
         else
         else
         {
         {
             // Link a new combination
             // Link a new combination
-            PROFILE(LinkShaders);
+            URHO3D_PROFILE(LinkShaders);
 
 
             SharedPtr<ShaderProgram> newProgram(new ShaderProgram(this, vs, ps));
             SharedPtr<ShaderProgram> newProgram(new ShaderProgram(this, vs, ps));
             if (newProgram->Link())
             if (newProgram->Link())
@@ -1914,7 +1914,7 @@ void Graphics::EndDumpShaders()
 
 
 void Graphics::PrecacheShaders(Deserializer& source)
 void Graphics::PrecacheShaders(Deserializer& source)
 {
 {
-    PROFILE(PrecacheShaders);
+    URHO3D_PROFILE(PrecacheShaders);
 
 
     ShaderPrecache::LoadShaders(this, source);
     ShaderPrecache::LoadShaders(this, source);
 }
 }

+ 1 - 1
Source/Urho3D/Graphics/OpenGL/OGLTexture2D.cpp

@@ -196,7 +196,7 @@ bool Texture2D::SetSize(int width, int height, unsigned format, TextureUsage usa
 
 
 bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, const void* data)
 bool Texture2D::SetData(unsigned level, int x, int y, int width, int height, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {

+ 1 - 1
Source/Urho3D/Graphics/OpenGL/OGLTexture3D.cpp

@@ -242,7 +242,7 @@ bool Texture3D::SetSize(int width, int height, int depth, unsigned format, Textu
 
 
 bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int height, int depth, const void* data)
 bool Texture3D::SetData(unsigned level, int x, int y, int z, int width, int height, int depth, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {

+ 1 - 1
Source/Urho3D/Graphics/OpenGL/OGLTextureCube.cpp

@@ -363,7 +363,7 @@ bool TextureCube::SetSize(int size, unsigned format, TextureUsage usage)
 
 
 bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int width, int height, const void* data)
 bool TextureCube::SetData(CubeMapFace face, unsigned level, int x, int y, int width, int height, const void* data)
 {
 {
-    PROFILE(SetTextureData);
+    URHO3D_PROFILE(SetTextureData);
 
 
     if (!object_ || !graphics_)
     if (!object_ || !graphics_)
     {
     {

+ 5 - 5
Source/Urho3D/Graphics/Renderer.cpp

@@ -564,7 +564,7 @@ unsigned Renderer::GetNumOccluders(bool allViews) const
 
 
 void Renderer::Update(float timeStep)
 void Renderer::Update(float timeStep)
 {
 {
-    PROFILE(UpdateViews);
+    URHO3D_PROFILE(UpdateViews);
 
 
     views_.Clear();
     views_.Clear();
     preparedViews_.Clear();
     preparedViews_.Clear();
@@ -663,7 +663,7 @@ void Renderer::Render()
     // Engine does not render when window is closed or device is lost
     // Engine does not render when window is closed or device is lost
     assert(graphics_ && graphics_->IsInitialized() && !graphics_->IsDeviceLost());
     assert(graphics_ && graphics_->IsInitialized() && !graphics_->IsDeviceLost());
 
 
-    PROFILE(RenderViews);
+    URHO3D_PROFILE(RenderViews);
 
 
     // If the indirection textures have lost content (OpenGL mode only), restore them now
     // If the indirection textures have lost content (OpenGL mode only), restore them now
     if (faceSelectCubeMap_ && faceSelectCubeMap_->IsDataLost())
     if (faceSelectCubeMap_ && faceSelectCubeMap_->IsDataLost())
@@ -724,7 +724,7 @@ void Renderer::Render()
 
 
 void Renderer::DrawDebugGeometry(bool depthTest)
 void Renderer::DrawDebugGeometry(bool depthTest)
 {
 {
-    PROFILE(RendererDrawDebug);
+    URHO3D_PROFILE(RendererDrawDebug);
 
 
     /// \todo Because debug geometry is per-scene, if two cameras show views of the same area, occlusion is not shown correctly
     /// \todo Because debug geometry is per-scene, if two cameras show views of the same area, occlusion is not shown correctly
     HashSet<Drawable*> processedGeometries;
     HashSet<Drawable*> processedGeometries;
@@ -1464,7 +1464,7 @@ void Renderer::Initialize()
     if (!graphics || !graphics->IsInitialized() || !cache)
     if (!graphics || !graphics->IsInitialized() || !cache)
         return;
         return;
 
 
-    PROFILE(InitRenderer);
+    URHO3D_PROFILE(InitRenderer);
 
 
     graphics_ = graphics;
     graphics_ = graphics;
 
 
@@ -1520,7 +1520,7 @@ void Renderer::LoadShaders()
 
 
 void Renderer::LoadPassShaders(Pass* pass)
 void Renderer::LoadPassShaders(Pass* pass)
 {
 {
-    PROFILE(LoadPassShaders);
+    URHO3D_PROFILE(LoadPassShaders);
 
 
     unsigned shadows = (unsigned)((graphics_->GetHardwareShadowSupport() ? 1 : 0) | (shadowQuality_ & SHADOWQUALITY_HIGH_16BIT));
     unsigned shadows = (unsigned)((graphics_->GetHardwareShadowSupport() ? 1 : 0) | (shadowQuality_ & SHADOWQUALITY_HIGH_16BIT));
 
 

+ 9 - 9
Source/Urho3D/Graphics/Terrain.cpp

@@ -491,7 +491,7 @@ IntVector2 Terrain::WorldToHeightMap(const Vector3& worldPosition) const
 
 
 void Terrain::CreatePatchGeometry(TerrainPatch* patch)
 void Terrain::CreatePatchGeometry(TerrainPatch* patch)
 {
 {
-    PROFILE(CreatePatchGeometry);
+    URHO3D_PROFILE(CreatePatchGeometry);
 
 
     unsigned row = (unsigned)(patchSize_ + 1);
     unsigned row = (unsigned)(patchSize_ + 1);
     VertexBuffer* vertexBuffer = patch->GetVertexBuffer();
     VertexBuffer* vertexBuffer = patch->GetVertexBuffer();
@@ -693,7 +693,7 @@ void Terrain::CreateGeometry()
     if (!node_)
     if (!node_)
         return;
         return;
 
 
-    PROFILE(CreateTerrainGeometry);
+    URHO3D_PROFILE(CreateTerrainGeometry);
 
 
     unsigned prevNumPatches = patches_.Size();
     unsigned prevNumPatches = patches_.Size();
 
 
@@ -749,7 +749,7 @@ void Terrain::CreateGeometry()
     // Remove old patch nodes which are not needed
     // Remove old patch nodes which are not needed
     if (updateAll)
     if (updateAll)
     {
     {
-        PROFILE(RemoveOldPatches);
+        URHO3D_PROFILE(RemoveOldPatches);
 
 
         PODVector<Node*> oldPatchNodes;
         PODVector<Node*> oldPatchNodes;
         node_->GetChildrenWithComponent<TerrainPatch>(oldPatchNodes);
         node_->GetChildrenWithComponent<TerrainPatch>(oldPatchNodes);
@@ -788,7 +788,7 @@ void Terrain::CreateGeometry()
 
 
         if (imgComps == 1)
         if (imgComps == 1)
         {
         {
-            PROFILE(CopyHeightData);
+            URHO3D_PROFILE(CopyHeightData);
 
 
             for (int z = 0; z < numVertices_.y_; ++z)
             for (int z = 0; z < numVertices_.y_; ++z)
             {
             {
@@ -813,7 +813,7 @@ void Terrain::CreateGeometry()
         }
         }
         else
         else
         {
         {
-            PROFILE(CopyHeightData);
+            URHO3D_PROFILE(CopyHeightData);
 
 
             // If more than 1 component, use the green channel for more accuracy
             // If more than 1 component, use the green channel for more accuracy
             for (int z = 0; z < numVertices_.y_; ++z)
             for (int z = 0; z < numVertices_.y_; ++z)
@@ -865,7 +865,7 @@ void Terrain::CreateGeometry()
         bool enabled = IsEnabledEffective();
         bool enabled = IsEnabledEffective();
 
 
         {
         {
-            PROFILE(CreatePatches);
+            URHO3D_PROFILE(CreatePatches);
 
 
             // Create patches and set node transforms
             // Create patches and set node transforms
             for (int z = 0; z < numPatches_.y_; ++z)
             for (int z = 0; z < numPatches_.y_; ++z)
@@ -921,7 +921,7 @@ void Terrain::CreateGeometry()
         // Create vertex data for patches. First update smoothing to ensure normals are calculated correctly across patch borders
         // Create vertex data for patches. First update smoothing to ensure normals are calculated correctly across patch borders
         if (smoothing_)
         if (smoothing_)
         {
         {
-            PROFILE(UpdateSmoothing);
+            URHO3D_PROFILE(UpdateSmoothing);
 
 
             for (unsigned i = 0; i < patches_.Size(); ++i)
             for (unsigned i = 0; i < patches_.Size(); ++i)
             {
             {
@@ -978,7 +978,7 @@ void Terrain::CreateGeometry()
 
 
 void Terrain::CreateIndexData()
 void Terrain::CreateIndexData()
 {
 {
-    PROFILE(CreateIndexData);
+    URHO3D_PROFILE(CreateIndexData);
 
 
     PODVector<unsigned short> indices;
     PODVector<unsigned short> indices;
     drawRanges_.Clear();
     drawRanges_.Clear();
@@ -1207,7 +1207,7 @@ Vector3 Terrain::GetRawNormal(int x, int z) const
 
 
 void Terrain::CalculateLodErrors(TerrainPatch* patch)
 void Terrain::CalculateLodErrors(TerrainPatch* patch)
 {
 {
-    PROFILE(CalculateLodErrors);
+    URHO3D_PROFILE(CalculateLodErrors);
 
 
     const IntVector2& coords = patch->GetCoordinates();
     const IntVector2& coords = patch->GetCoordinates();
     PODVector<float>& lodErrors = patch->GetLodErrors();
     PODVector<float>& lodErrors = patch->GetLodErrors();

+ 17 - 17
Source/Urho3D/Graphics/View.cpp

@@ -786,7 +786,7 @@ void View::GetDrawables()
     if (!octree_ || !cullCamera_)
     if (!octree_ || !cullCamera_)
         return;
         return;
 
 
-    PROFILE(GetDrawables);
+    URHO3D_PROFILE(GetDrawables);
 
 
     WorkQueue* queue = GetSubsystem<WorkQueue>();
     WorkQueue* queue = GetSubsystem<WorkQueue>();
     PODVector<Drawable*>& tempDrawables = tempDrawables_[0];
     PODVector<Drawable*>& tempDrawables = tempDrawables_[0];
@@ -852,7 +852,7 @@ void View::GetDrawables()
         UpdateOccluders(occluders_, cullCamera_);
         UpdateOccluders(occluders_, cullCamera_);
         if (occluders_.Size())
         if (occluders_.Size())
         {
         {
-            PROFILE(DrawOcclusion);
+            URHO3D_PROFILE(DrawOcclusion);
 
 
             occlusionBuffer_ = renderer_->GetOcclusionBuffer(cullCamera_);
             occlusionBuffer_ = renderer_->GetOcclusionBuffer(cullCamera_);
             DrawOccluders(occlusionBuffer_, occluders_);
             DrawOccluders(occlusionBuffer_, occluders_);
@@ -969,7 +969,7 @@ void View::GetBatches()
 void View::ProcessLights()
 void View::ProcessLights()
 {
 {
     // Process lit geometries and shadow casters for each light
     // Process lit geometries and shadow casters for each light
-    PROFILE(ProcessLights);
+    URHO3D_PROFILE(ProcessLights);
 
 
     WorkQueue* queue = GetSubsystem<WorkQueue>();
     WorkQueue* queue = GetSubsystem<WorkQueue>();
     lightQueryResults_.Resize(lights_.Size());
     lightQueryResults_.Resize(lights_.Size());
@@ -998,7 +998,7 @@ void View::GetLightBatches()
 
 
     // Build light queues and lit batches
     // Build light queues and lit batches
     {
     {
-        PROFILE(GetLightBatches);
+        URHO3D_PROFILE(GetLightBatches);
 
 
         // Preallocate light queues: per-pixel lights which have lit geometries
         // Preallocate light queues: per-pixel lights which have lit geometries
         unsigned numLightQueues = 0;
         unsigned numLightQueues = 0;
@@ -1151,7 +1151,7 @@ void View::GetLightBatches()
     // Process drawables with limited per-pixel light count
     // Process drawables with limited per-pixel light count
     if (maxLightsDrawables_.Size())
     if (maxLightsDrawables_.Size())
     {
     {
-        PROFILE(GetMaxLightsBatches);
+        URHO3D_PROFILE(GetMaxLightsBatches);
 
 
         for (HashSet<Drawable*>::Iterator i = maxLightsDrawables_.Begin(); i != maxLightsDrawables_.End(); ++i)
         for (HashSet<Drawable*>::Iterator i = maxLightsDrawables_.Begin(); i != maxLightsDrawables_.End(); ++i)
         {
         {
@@ -1173,7 +1173,7 @@ void View::GetLightBatches()
 
 
 void View::GetBaseBatches()
 void View::GetBaseBatches()
 {
 {
-    PROFILE(GetBaseBatches);
+    URHO3D_PROFILE(GetBaseBatches);
 
 
     for (PODVector<Drawable*>::ConstIterator i = geometries_.Begin(); i != geometries_.End(); ++i)
     for (PODVector<Drawable*>::ConstIterator i = geometries_.Begin(); i != geometries_.End(); ++i)
     {
     {
@@ -1268,7 +1268,7 @@ void View::UpdateGeometries()
         return;
         return;
     }
     }
 
 
-    PROFILE(SortAndUpdateGeometry);
+    URHO3D_PROFILE(SortAndUpdateGeometry);
 
 
     WorkQueue* queue = GetSubsystem<WorkQueue>();
     WorkQueue* queue = GetSubsystem<WorkQueue>();
 
 
@@ -1436,7 +1436,7 @@ void View::ExecuteRenderPathCommands()
     // If not reusing shadowmaps, render all of them first
     // If not reusing shadowmaps, render all of them first
     if (!renderer_->GetReuseShadowMaps() && renderer_->GetDrawShadows() && !actualView->lightQueues_.Empty())
     if (!renderer_->GetReuseShadowMaps() && renderer_->GetDrawShadows() && !actualView->lightQueues_.Empty())
     {
     {
-        PROFILE(RenderShadowMaps);
+        URHO3D_PROFILE(RenderShadowMaps);
 
 
         for (Vector<LightBatchQueue>::Iterator i = actualView->lightQueues_.Begin(); i != actualView->lightQueues_.End(); ++i)
         for (Vector<LightBatchQueue>::Iterator i = actualView->lightQueues_.Begin(); i != actualView->lightQueues_.End(); ++i)
         {
         {
@@ -1446,7 +1446,7 @@ void View::ExecuteRenderPathCommands()
     }
     }
 
 
     {
     {
-        PROFILE(ExecuteRenderPath);
+        URHO3D_PROFILE(ExecuteRenderPath);
 
 
         // Set for safety in case of empty renderpath
         // Set for safety in case of empty renderpath
         currentRenderTarget_ = substituteRenderTarget_ ? substituteRenderTarget_ : renderTarget_;
         currentRenderTarget_ = substituteRenderTarget_ ? substituteRenderTarget_ : renderTarget_;
@@ -1546,7 +1546,7 @@ void View::ExecuteRenderPathCommands()
             {
             {
             case CMD_CLEAR:
             case CMD_CLEAR:
                 {
                 {
-                    PROFILE(ClearRenderTarget);
+                    URHO3D_PROFILE(ClearRenderTarget);
 
 
                     Color clearColor = command.clearColor_;
                     Color clearColor = command.clearColor_;
                     if (command.useFogColor_)
                     if (command.useFogColor_)
@@ -1562,7 +1562,7 @@ void View::ExecuteRenderPathCommands()
                     BatchQueue& queue = actualView->batchQueues_[command.passIndex_];
                     BatchQueue& queue = actualView->batchQueues_[command.passIndex_];
                     if (!queue.IsEmpty())
                     if (!queue.IsEmpty())
                     {
                     {
-                        PROFILE(RenderScenePass);
+                        URHO3D_PROFILE(RenderScenePass);
 
 
                         SetRenderTargets(command);
                         SetRenderTargets(command);
                         bool allowDepthWrite = SetTextures(command);
                         bool allowDepthWrite = SetTextures(command);
@@ -1575,7 +1575,7 @@ void View::ExecuteRenderPathCommands()
 
 
             case CMD_QUAD:
             case CMD_QUAD:
                 {
                 {
-                    PROFILE(RenderQuad);
+                    URHO3D_PROFILE(RenderQuad);
 
 
                     SetRenderTargets(command);
                     SetRenderTargets(command);
                     SetTextures(command);
                     SetTextures(command);
@@ -1587,7 +1587,7 @@ void View::ExecuteRenderPathCommands()
                 // Render shadow maps + opaque objects' additive lighting
                 // Render shadow maps + opaque objects' additive lighting
                 if (!actualView->lightQueues_.Empty())
                 if (!actualView->lightQueues_.Empty())
                 {
                 {
-                    PROFILE(RenderLights);
+                    URHO3D_PROFILE(RenderLights);
 
 
                     SetRenderTargets(command);
                     SetRenderTargets(command);
 
 
@@ -1626,7 +1626,7 @@ void View::ExecuteRenderPathCommands()
                 // Render shadow maps + light volumes
                 // Render shadow maps + light volumes
                 if (!actualView->lightQueues_.Empty())
                 if (!actualView->lightQueues_.Empty())
                 {
                 {
-                    PROFILE(RenderLightVolumes);
+                    URHO3D_PROFILE(RenderLightVolumes);
 
 
                     SetRenderTargets(command);
                     SetRenderTargets(command);
                     for (Vector<LightBatchQueue>::Iterator i = actualView->lightQueues_.Begin(); i != actualView->lightQueues_.End(); ++i)
                     for (Vector<LightBatchQueue>::Iterator i = actualView->lightQueues_.Begin(); i != actualView->lightQueues_.End(); ++i)
@@ -2044,7 +2044,7 @@ void View::BlitFramebuffer(Texture* source, RenderSurface* destination, bool dep
     if (!source)
     if (!source)
         return;
         return;
 
 
-    PROFILE(BlitFramebuffer);
+    URHO3D_PROFILE(BlitFramebuffer);
 
 
     // If blitting to the destination rendertarget, use the actual viewport. Intermediate textures on the other hand
     // If blitting to the destination rendertarget, use the actual viewport. Intermediate textures on the other hand
     // are always viewport-sized
     // are always viewport-sized
@@ -2830,7 +2830,7 @@ void View::PrepareInstancingBuffer()
         return;
         return;
     }
     }
 
 
-    PROFILE(PrepareInstancingBuffer);
+    URHO3D_PROFILE(PrepareInstancingBuffer);
 
 
     unsigned totalInstances = 0;
     unsigned totalInstances = 0;
 
 
@@ -2918,7 +2918,7 @@ void View::SetupLightVolumeBatch(Batch& batch)
 
 
 void View::RenderShadowMap(const LightBatchQueue& queue)
 void View::RenderShadowMap(const LightBatchQueue& queue)
 {
 {
-    PROFILE(RenderShadowMap);
+    URHO3D_PROFILE(RenderShadowMap);
 
 
     Texture2D* shadowMap = queue.shadowMap_;
     Texture2D* shadowMap = queue.shadowMap_;
     graphics_->SetTexture(TU_SHADOWMAP, 0);
     graphics_->SetTexture(TU_SHADOWMAP, 0);

+ 1 - 1
Source/Urho3D/IO/File.cpp

@@ -466,7 +466,7 @@ unsigned File::GetChecksum()
 #endif
 #endif
         return 0;
         return 0;
 
 
-    PROFILE(CalculateFileChecksum);
+    URHO3D_PROFILE(CalculateFileChecksum);
 
 
     unsigned oldPos = position_;
     unsigned oldPos = position_;
     checksum_ = 0;
     checksum_ = 0;

+ 1 - 1
Source/Urho3D/Input/Input.cpp

@@ -250,7 +250,7 @@ void Input::Update()
 {
 {
     assert(initialized_);
     assert(initialized_);
 
 
-    PROFILE(UpdateInput);
+    URHO3D_PROFILE(UpdateInput);
 
 
     // Reset input accumulation for this frame
     // Reset input accumulation for this frame
     keyPress_.Clear();
     keyPress_.Clear();

+ 5 - 5
Source/Urho3D/LuaScript/LuaScript.cpp

@@ -220,7 +220,7 @@ void LuaScript::RemoveEventHandlersExcept(const Vector<String>& exceptionNames)
 
 
 bool LuaScript::ExecuteFile(const String& fileName)
 bool LuaScript::ExecuteFile(const String& fileName)
 {
 {
-    PROFILE(ExecuteFile);
+    URHO3D_PROFILE(ExecuteFile);
 
 
 #ifdef URHO3D_LUA_RAW_SCRIPT_LOADER
 #ifdef URHO3D_LUA_RAW_SCRIPT_LOADER
     if (ExecuteRawFile(fileName))
     if (ExecuteRawFile(fileName))
@@ -234,7 +234,7 @@ bool LuaScript::ExecuteFile(const String& fileName)
 
 
 bool LuaScript::ExecuteString(const String& string)
 bool LuaScript::ExecuteString(const String& string)
 {
 {
-    PROFILE(ExecuteString);
+    URHO3D_PROFILE(ExecuteString);
 
 
     if (luaL_dostring(luaState_, string.CString()))
     if (luaL_dostring(luaState_, string.CString()))
     {
     {
@@ -249,7 +249,7 @@ bool LuaScript::ExecuteString(const String& string)
 
 
 bool LuaScript::LoadRawFile(const String& fileName)
 bool LuaScript::LoadRawFile(const String& fileName)
 {
 {
-    PROFILE(LoadRawFile);
+    URHO3D_PROFILE(LoadRawFile);
 
 
     LOGINFO("Finding Lua file on file system: " + fileName);
     LOGINFO("Finding Lua file on file system: " + fileName);
 
 
@@ -281,7 +281,7 @@ bool LuaScript::LoadRawFile(const String& fileName)
 
 
 bool LuaScript::ExecuteRawFile(const String& fileName)
 bool LuaScript::ExecuteRawFile(const String& fileName)
 {
 {
-    PROFILE(ExecuteRawFile);
+    URHO3D_PROFILE(ExecuteRawFile);
 
 
     if (!LoadRawFile(fileName))
     if (!LoadRawFile(fileName))
         return false;
         return false;
@@ -459,7 +459,7 @@ void LuaScript::HandlePostUpdate(StringHash eventType, VariantMap& eventData)
 
 
     // Collect garbage
     // Collect garbage
     {
     {
-        PROFILE(LuaCollectGarbage);
+        URHO3D_PROFILE(LuaCollectGarbage);
         lua_gc(luaState_, LUA_GCCOLLECT, 0);
         lua_gc(luaState_, LUA_GCCOLLECT, 0);
     }
     }
 }
 }

+ 1 - 1
Source/Urho3D/Navigation/CrowdAgent.cpp

@@ -266,7 +266,7 @@ int CrowdAgent::AddAgentToCrowd(bool force)
 
 
     if (force || !IsInCrowd())
     if (force || !IsInCrowd())
     {
     {
-        PROFILE(AddAgentToCrowd);
+        URHO3D_PROFILE(AddAgentToCrowd);
 
 
         agentCrowdId_ = crowdManager_->AddAgent(this, node_->GetPosition());
         agentCrowdId_ = crowdManager_->AddAgent(this, node_->GetPosition());
         if (agentCrowdId_ == -1)
         if (agentCrowdId_ == -1)

+ 1 - 1
Source/Urho3D/Navigation/CrowdManager.cpp

@@ -641,7 +641,7 @@ void CrowdManager::OnSceneSet(Scene* scene)
 void CrowdManager::Update(float delta)
 void CrowdManager::Update(float delta)
 {
 {
     assert(crowd_ && navigationMesh_);
     assert(crowd_ && navigationMesh_);
-    PROFILE(UpdateCrowd);
+    URHO3D_PROFILE(UpdateCrowd);
     crowd_->update(delta, 0);
     crowd_->update(delta, 0);
 }
 }
 
 

+ 4 - 4
Source/Urho3D/Navigation/DynamicNavigationMesh.cpp

@@ -243,7 +243,7 @@ void DynamicNavigationMesh::RegisterObject(Context* context)
 
 
 bool DynamicNavigationMesh::Build()
 bool DynamicNavigationMesh::Build()
 {
 {
-    PROFILE(BuildNavigationMesh);
+    URHO3D_PROFILE(BuildNavigationMesh);
     // Release existing navigation data and zero the bounding box
     // Release existing navigation data and zero the bounding box
     ReleaseNavigationMesh();
     ReleaseNavigationMesh();
 
 
@@ -268,7 +268,7 @@ bool DynamicNavigationMesh::Build()
     boundingBox_.max_ += padding_;
     boundingBox_.max_ += padding_;
 
 
     {
     {
-        PROFILE(BuildNavigationMesh);
+        URHO3D_PROFILE(BuildNavigationMesh);
 
 
         // Calculate number of tiles
         // Calculate number of tiles
         int gridW = 0, gridH = 0;
         int gridW = 0, gridH = 0;
@@ -396,7 +396,7 @@ bool DynamicNavigationMesh::Build()
 
 
 bool DynamicNavigationMesh::Build(const BoundingBox& boundingBox)
 bool DynamicNavigationMesh::Build(const BoundingBox& boundingBox)
 {
 {
-    PROFILE(BuildPartialNavigationMesh);
+    URHO3D_PROFILE(BuildPartialNavigationMesh);
 
 
     if (!node_)
     if (!node_)
         return false;
         return false;
@@ -663,7 +663,7 @@ PODVector<unsigned char> DynamicNavigationMesh::GetNavigationDataAttr() const
 
 
 int DynamicNavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int x, int z, TileCacheData* tiles)
 int DynamicNavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int x, int z, TileCacheData* tiles)
 {
 {
-    PROFILE(BuildNavigationMeshTile);
+    URHO3D_PROFILE(BuildNavigationMeshTile);
 
 
     tileCache_->removeTile(navMesh_->getTileRefAt(x, z, 0), 0, 0);
     tileCache_->removeTile(navMesh_->getTileRefAt(x, z, 0), 0, 0);
 
 

+ 6 - 6
Source/Urho3D/Navigation/NavigationMesh.cpp

@@ -338,7 +338,7 @@ void NavigationMesh::SetPadding(const Vector3& padding)
 
 
 bool NavigationMesh::Build()
 bool NavigationMesh::Build()
 {
 {
-    PROFILE(BuildNavigationMesh);
+    URHO3D_PROFILE(BuildNavigationMesh);
 
 
     // Release existing navigation data and zero the bounding box
     // Release existing navigation data and zero the bounding box
     ReleaseNavigationMesh();
     ReleaseNavigationMesh();
@@ -364,7 +364,7 @@ bool NavigationMesh::Build()
     boundingBox_.max_ += padding_;
     boundingBox_.max_ += padding_;
 
 
     {
     {
-        PROFILE(BuildNavigationMesh);
+        URHO3D_PROFILE(BuildNavigationMesh);
 
 
         // Calculate number of tiles
         // Calculate number of tiles
         int gridW = 0, gridH = 0;
         int gridW = 0, gridH = 0;
@@ -435,7 +435,7 @@ bool NavigationMesh::Build()
 
 
 bool NavigationMesh::Build(const BoundingBox& boundingBox)
 bool NavigationMesh::Build(const BoundingBox& boundingBox)
 {
 {
-    PROFILE(BuildPartialNavigationMesh);
+    URHO3D_PROFILE(BuildPartialNavigationMesh);
 
 
     if (!node_)
     if (!node_)
         return false;
         return false;
@@ -525,7 +525,7 @@ Vector3 NavigationMesh::MoveAlongSurface(const Vector3& start, const Vector3& en
 void NavigationMesh::FindPath(PODVector<Vector3>& dest, const Vector3& start, const Vector3& end, const Vector3& extents,
 void NavigationMesh::FindPath(PODVector<Vector3>& dest, const Vector3& start, const Vector3& end, const Vector3& extents,
     const dtQueryFilter* filter)
     const dtQueryFilter* filter)
 {
 {
-    PROFILE(FindPath);
+    URHO3D_PROFILE(FindPath);
 
 
     dest.Clear();
     dest.Clear();
 
 
@@ -813,7 +813,7 @@ PODVector<unsigned char> NavigationMesh::GetNavigationDataAttr() const
 
 
 void NavigationMesh::CollectGeometries(Vector<NavigationGeometryInfo>& geometryList)
 void NavigationMesh::CollectGeometries(Vector<NavigationGeometryInfo>& geometryList)
 {
 {
-    PROFILE(CollectNavigationGeometry);
+    URHO3D_PROFILE(CollectNavigationGeometry);
 
 
     // Get Navigable components from child nodes, not from whole scene. This makes it possible to partition
     // Get Navigable components from child nodes, not from whole scene. This makes it possible to partition
     // the scene into several navigation meshes
     // the scene into several navigation meshes
@@ -1112,7 +1112,7 @@ void NavigationMesh::AddTriMeshGeometry(NavBuildData* build, Geometry* geometry,
 
 
 bool NavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int x, int z)
 bool NavigationMesh::BuildTile(Vector<NavigationGeometryInfo>& geometryList, int x, int z)
 {
 {
-    PROFILE(BuildNavigationMeshTile);
+    URHO3D_PROFILE(BuildNavigationMeshTile);
 
 
     // Remove previous tile (if any)
     // Remove previous tile (if any)
     navMesh_->removeTile(navMesh_->getTileRefAt(x, z, 0), 0, 0);
     navMesh_->removeTile(navMesh_->getTileRefAt(x, z, 0), 0, 0);

+ 1 - 1
Source/Urho3D/Network/Connection.cpp

@@ -300,7 +300,7 @@ void Connection::SendRemoteEvents()
     if (remoteEvents_.Empty())
     if (remoteEvents_.Empty())
         return;
         return;
 
 
-    PROFILE(SendRemoteEvents);
+    URHO3D_PROFILE(SendRemoteEvents);
 
 
     for (Vector<RemoteEvent>::ConstIterator i = remoteEvents_.Begin(); i != remoteEvents_.End(); ++i)
     for (Vector<RemoteEvent>::ConstIterator i = remoteEvents_.Begin(); i != remoteEvents_.End(); ++i)
     {
     {

+ 9 - 9
Source/Urho3D/Network/Network.cpp

@@ -205,7 +205,7 @@ void Network::ClientDisconnected(kNet::MessageConnection* connection)
 
 
 bool Network::Connect(const String& address, unsigned short port, Scene* scene, const VariantMap& identity)
 bool Network::Connect(const String& address, unsigned short port, Scene* scene, const VariantMap& identity)
 {
 {
-    PROFILE(Connect);
+    URHO3D_PROFILE(Connect);
 
 
     // If a previous connection already exists, disconnect it and wait for some time for the connection to terminate
     // If a previous connection already exists, disconnect it and wait for some time for the connection to terminate
     if (serverConnection_)
     if (serverConnection_)
@@ -239,7 +239,7 @@ void Network::Disconnect(int waitMSec)
     if (!serverConnection_)
     if (!serverConnection_)
         return;
         return;
 
 
-    PROFILE(Disconnect);
+    URHO3D_PROFILE(Disconnect);
     serverConnection_->Disconnect(waitMSec);
     serverConnection_->Disconnect(waitMSec);
 }
 }
 
 
@@ -248,7 +248,7 @@ bool Network::StartServer(unsigned short port)
     if (IsServerRunning())
     if (IsServerRunning())
         return true;
         return true;
 
 
-    PROFILE(StartServer);
+    URHO3D_PROFILE(StartServer);
 
 
     if (network_->StartServer(port, kNet::SocketOverUDP, this, true) != 0)
     if (network_->StartServer(port, kNet::SocketOverUDP, this, true) != 0)
     {
     {
@@ -267,7 +267,7 @@ void Network::StopServer()
     if (!IsServerRunning())
     if (!IsServerRunning())
         return;
         return;
 
 
-    PROFILE(StopServer);
+    URHO3D_PROFILE(StopServer);
 
 
     clientConnections_.Clear();
     clientConnections_.Clear();
     network_->StopServer();
     network_->StopServer();
@@ -404,7 +404,7 @@ void Network::SendPackageToClients(Scene* scene, PackageFile* package)
 SharedPtr<HttpRequest> Network::MakeHttpRequest(const String& url, const String& verb, const Vector<String>& headers,
 SharedPtr<HttpRequest> Network::MakeHttpRequest(const String& url, const String& verb, const Vector<String>& headers,
     const String& postData)
     const String& postData)
 {
 {
-    PROFILE(MakeHttpRequest);
+    URHO3D_PROFILE(MakeHttpRequest);
 
 
     // The initialization of the request will take time, can not know at this point if it has an error or not
     // The initialization of the request will take time, can not know at this point if it has an error or not
     SharedPtr<HttpRequest> request(new HttpRequest(url, verb, headers, postData));
     SharedPtr<HttpRequest> request(new HttpRequest(url, verb, headers, postData));
@@ -452,7 +452,7 @@ bool Network::CheckRemoteEvent(StringHash eventType) const
 
 
 void Network::Update(float timeStep)
 void Network::Update(float timeStep)
 {
 {
-    PROFILE(UpdateNetwork);
+    URHO3D_PROFILE(UpdateNetwork);
 
 
     // Process server connection if it exists
     // Process server connection if it exists
     if (serverConnection_)
     if (serverConnection_)
@@ -483,7 +483,7 @@ void Network::Update(float timeStep)
 
 
 void Network::PostUpdate(float timeStep)
 void Network::PostUpdate(float timeStep)
 {
 {
-    PROFILE(PostUpdateNetwork);
+    URHO3D_PROFILE(PostUpdateNetwork);
 
 
     // Check if periodic update should happen now
     // Check if periodic update should happen now
     updateAcc_ += timeStep;
     updateAcc_ += timeStep;
@@ -499,7 +499,7 @@ void Network::PostUpdate(float timeStep)
         {
         {
             // Collect and prepare all networked scenes
             // Collect and prepare all networked scenes
             {
             {
-                PROFILE(PrepareServerUpdate);
+                URHO3D_PROFILE(PrepareServerUpdate);
 
 
                 networkScenes_.Clear();
                 networkScenes_.Clear();
                 for (HashMap<kNet::MessageConnection*, SharedPtr<Connection> >::Iterator i = clientConnections_.Begin();
                 for (HashMap<kNet::MessageConnection*, SharedPtr<Connection> >::Iterator i = clientConnections_.Begin();
@@ -515,7 +515,7 @@ void Network::PostUpdate(float timeStep)
             }
             }
 
 
             {
             {
-                PROFILE(SendServerUpdate);
+                URHO3D_PROFILE(SendServerUpdate);
 
 
                 // Then send server updates for each client connection
                 // Then send server updates for each client connection
                 for (HashMap<kNet::MessageConnection*, SharedPtr<Connection> >::Iterator i = clientConnections_.Begin();
                 for (HashMap<kNet::MessageConnection*, SharedPtr<Connection> >::Iterator i = clientConnections_.Begin();

+ 1 - 1
Source/Urho3D/Physics/CollisionShape.cpp

@@ -1016,7 +1016,7 @@ btCompoundShape* CollisionShape::GetParentCompoundShape()
 
 
 void CollisionShape::UpdateShape()
 void CollisionShape::UpdateShape()
 {
 {
-    PROFILE(UpdateCollisionShape);
+    URHO3D_PROFILE(UpdateCollisionShape);
 
 
     ReleaseShape();
     ReleaseShape();
 
 

+ 1 - 1
Source/Urho3D/Physics/Constraint.cpp

@@ -484,7 +484,7 @@ void Constraint::OnMarkedDirty(Node* node)
 
 
 void Constraint::CreateConstraint()
 void Constraint::CreateConstraint()
 {
 {
-    PROFILE(CreateConstraint);
+    URHO3D_PROFILE(CreateConstraint);
 
 
     cachedWorldScale_ = node_->GetWorldScale();
     cachedWorldScale_ = node_->GetWorldScale();
 
 

+ 10 - 10
Source/Urho3D/Physics/PhysicsWorld.cpp

@@ -210,7 +210,7 @@ void PhysicsWorld::DrawDebugGeometry(DebugRenderer* debug, bool depthTest)
 {
 {
     if (debug)
     if (debug)
     {
     {
-        PROFILE(PhysicsDrawDebug);
+        URHO3D_PROFILE(PhysicsDrawDebug);
 
 
         debugRenderer_ = debug;
         debugRenderer_ = debug;
         debugDepthTest_ = depthTest;
         debugDepthTest_ = depthTest;
@@ -235,7 +235,7 @@ void PhysicsWorld::draw3dText(const btVector3& location, const char* textString)
 
 
 void PhysicsWorld::Update(float timeStep)
 void PhysicsWorld::Update(float timeStep)
 {
 {
-    PROFILE(UpdatePhysics);
+    URHO3D_PROFILE(UpdatePhysics);
 
 
     float internalTimeStep = 1.0f / fps_;
     float internalTimeStep = 1.0f / fps_;
     int maxSubSteps = (int)(timeStep * fps_) + 1;
     int maxSubSteps = (int)(timeStep * fps_) + 1;
@@ -341,7 +341,7 @@ void PhysicsWorld::SetMaxNetworkAngularVelocity(float velocity)
 
 
 void PhysicsWorld::Raycast(PODVector<PhysicsRaycastResult>& result, const Ray& ray, float maxDistance, unsigned collisionMask)
 void PhysicsWorld::Raycast(PODVector<PhysicsRaycastResult>& result, const Ray& ray, float maxDistance, unsigned collisionMask)
 {
 {
-    PROFILE(PhysicsRaycast);
+    URHO3D_PROFILE(PhysicsRaycast);
 
 
     if (maxDistance >= M_INFINITY)
     if (maxDistance >= M_INFINITY)
         LOGWARNING("Infinite maxDistance in physics raycast is not supported");
         LOGWARNING("Infinite maxDistance in physics raycast is not supported");
@@ -368,7 +368,7 @@ void PhysicsWorld::Raycast(PODVector<PhysicsRaycastResult>& result, const Ray& r
 
 
 void PhysicsWorld::RaycastSingle(PhysicsRaycastResult& result, const Ray& ray, float maxDistance, unsigned collisionMask)
 void PhysicsWorld::RaycastSingle(PhysicsRaycastResult& result, const Ray& ray, float maxDistance, unsigned collisionMask)
 {
 {
-    PROFILE(PhysicsRaycastSingle);
+    URHO3D_PROFILE(PhysicsRaycastSingle);
 
 
     if (maxDistance >= M_INFINITY)
     if (maxDistance >= M_INFINITY)
         LOGWARNING("Infinite maxDistance in physics raycast is not supported");
         LOGWARNING("Infinite maxDistance in physics raycast is not supported");
@@ -398,7 +398,7 @@ void PhysicsWorld::RaycastSingle(PhysicsRaycastResult& result, const Ray& ray, f
 
 
 void PhysicsWorld::SphereCast(PhysicsRaycastResult& result, const Ray& ray, float radius, float maxDistance, unsigned collisionMask)
 void PhysicsWorld::SphereCast(PhysicsRaycastResult& result, const Ray& ray, float radius, float maxDistance, unsigned collisionMask)
 {
 {
-    PROFILE(PhysicsSphereCast);
+    URHO3D_PROFILE(PhysicsSphereCast);
 
 
     if (maxDistance >= M_INFINITY)
     if (maxDistance >= M_INFINITY)
         LOGWARNING("Infinite maxDistance in physics sphere cast is not supported");
         LOGWARNING("Infinite maxDistance in physics sphere cast is not supported");
@@ -492,7 +492,7 @@ void PhysicsWorld::ConvexCast(PhysicsRaycastResult& result, btCollisionShape* sh
         return;
         return;
     }
     }
 
 
-    PROFILE(PhysicsConvexCast);
+    URHO3D_PROFILE(PhysicsConvexCast);
 
 
     btCollisionWorld::ClosestConvexResultCallback convexCallback(ToBtVector3(startPos), ToBtVector3(endPos));
     btCollisionWorld::ClosestConvexResultCallback convexCallback(ToBtVector3(startPos), ToBtVector3(endPos));
     convexCallback.m_collisionFilterGroup = (short)0xffff;
     convexCallback.m_collisionFilterGroup = (short)0xffff;
@@ -538,7 +538,7 @@ void PhysicsWorld::RemoveCachedGeometry(Model* model)
 
 
 void PhysicsWorld::GetRigidBodies(PODVector<RigidBody*>& result, const Sphere& sphere, unsigned collisionMask)
 void PhysicsWorld::GetRigidBodies(PODVector<RigidBody*>& result, const Sphere& sphere, unsigned collisionMask)
 {
 {
-    PROFILE(PhysicsSphereQuery);
+    URHO3D_PROFILE(PhysicsSphereQuery);
 
 
     result.Clear();
     result.Clear();
 
 
@@ -558,7 +558,7 @@ void PhysicsWorld::GetRigidBodies(PODVector<RigidBody*>& result, const Sphere& s
 
 
 void PhysicsWorld::GetRigidBodies(PODVector<RigidBody*>& result, const BoundingBox& box, unsigned collisionMask)
 void PhysicsWorld::GetRigidBodies(PODVector<RigidBody*>& result, const BoundingBox& box, unsigned collisionMask)
 {
 {
-    PROFILE(PhysicsBoxQuery);
+    URHO3D_PROFILE(PhysicsBoxQuery);
 
 
     result.Clear();
     result.Clear();
 
 
@@ -577,7 +577,7 @@ void PhysicsWorld::GetRigidBodies(PODVector<RigidBody*>& result, const BoundingB
 
 
 void PhysicsWorld::GetRigidBodies(PODVector<RigidBody*>& result, const RigidBody* body)
 void PhysicsWorld::GetRigidBodies(PODVector<RigidBody*>& result, const RigidBody* body)
 {
 {
-    PROFILE(GetCollidingBodies);
+    URHO3D_PROFILE(GetCollidingBodies);
 
 
     result.Clear();
     result.Clear();
 
 
@@ -742,7 +742,7 @@ void PhysicsWorld::PostStep(float timeStep)
 
 
 void PhysicsWorld::SendCollisionEvents()
 void PhysicsWorld::SendCollisionEvents()
 {
 {
-    PROFILE(SendCollisionEvents);
+    URHO3D_PROFILE(SendCollisionEvents);
 
 
     currentCollisions_.Clear();
     currentCollisions_.Clear();
     physicsCollisionData_.Clear();
     physicsCollisionData_.Clear();

+ 1 - 1
Source/Urho3D/Physics/RigidBody.cpp

@@ -939,7 +939,7 @@ void RigidBody::AddBodyToWorld()
     if (!physicsWorld_)
     if (!physicsWorld_)
         return;
         return;
 
 
-    PROFILE(AddBodyToWorld);
+    URHO3D_PROFILE(AddBodyToWorld);
 
 
     if (mass_ < 0.0f)
     if (mass_ < 0.0f)
         mass_ = 0.0f;
         mass_ = 0.0f;

+ 10 - 10
Source/Urho3D/Resource/Image.cpp

@@ -426,7 +426,7 @@ bool Image::BeginLoad(Deserializer& source)
         // If uncompressed DDS, convert the data to 8bit RGBA as the texture classes can not currently use eg. RGB565 format
         // If uncompressed DDS, convert the data to 8bit RGBA as the texture classes can not currently use eg. RGB565 format
         if (compressedFormat_ == CF_RGBA)
         if (compressedFormat_ == CF_RGBA)
         {
         {
-            PROFILE(ConvertDDSToRGBA);
+            URHO3D_PROFILE(ConvertDDSToRGBA);
 
 
             SharedPtr<Image> currentImage(this);
             SharedPtr<Image> currentImage(this);
             while (currentImage.NotNull())
             while (currentImage.NotNull())
@@ -752,7 +752,7 @@ bool Image::BeginLoad(Deserializer& source)
 
 
 bool Image::Save(Serializer& dest) const
 bool Image::Save(Serializer& dest) const
 {
 {
-    PROFILE(SaveImage);
+    URHO3D_PROFILE(SaveImage);
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
@@ -1041,7 +1041,7 @@ bool Image::FlipVertical()
 
 
 bool Image::Resize(int width, int height)
 bool Image::Resize(int width, int height)
 {
 {
-    PROFILE(ResizeImage);
+    URHO3D_PROFILE(ResizeImage);
 
 
     if (IsCompressed())
     if (IsCompressed())
     {
     {
@@ -1103,7 +1103,7 @@ void Image::Clear(const Color& color)
 
 
 void Image::ClearInt(unsigned uintColor)
 void Image::ClearInt(unsigned uintColor)
 {
 {
-    PROFILE(ClearImage);
+    URHO3D_PROFILE(ClearImage);
 
 
     if (!data_)
     if (!data_)
         return;
         return;
@@ -1121,7 +1121,7 @@ void Image::ClearInt(unsigned uintColor)
 
 
 bool Image::SaveBMP(const String& fileName) const
 bool Image::SaveBMP(const String& fileName) const
 {
 {
-    PROFILE(SaveImageBMP);
+    URHO3D_PROFILE(SaveImageBMP);
 
 
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
@@ -1144,7 +1144,7 @@ bool Image::SaveBMP(const String& fileName) const
 
 
 bool Image::SavePNG(const String& fileName) const
 bool Image::SavePNG(const String& fileName) const
 {
 {
-    PROFILE(SaveImagePNG);
+    URHO3D_PROFILE(SaveImagePNG);
 
 
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
@@ -1167,7 +1167,7 @@ bool Image::SavePNG(const String& fileName) const
 
 
 bool Image::SaveTGA(const String& fileName) const
 bool Image::SaveTGA(const String& fileName) const
 {
 {
-    PROFILE(SaveImageTGA);
+    URHO3D_PROFILE(SaveImageTGA);
 
 
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
@@ -1190,7 +1190,7 @@ bool Image::SaveTGA(const String& fileName) const
 
 
 bool Image::SaveJPG(const String& fileName, int quality) const
 bool Image::SaveJPG(const String& fileName, int quality) const
 {
 {
-    PROFILE(SaveImageJPG);
+    URHO3D_PROFILE(SaveImageJPG);
 
 
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     FileSystem* fileSystem = GetSubsystem<FileSystem>();
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
     if (fileSystem && !fileSystem->CheckAccess(GetPath(fileName)))
@@ -1343,7 +1343,7 @@ SharedPtr<Image> Image::GetNextLevel() const
     if (nextLevel_)
     if (nextLevel_)
         return nextLevel_;
         return nextLevel_;
 
 
-    PROFILE(CalculateImageMipLevel);
+    URHO3D_PROFILE(CalculateImageMipLevel);
 
 
     int widthOut = width_ / 2;
     int widthOut = width_ / 2;
     int heightOut = height_ / 2;
     int heightOut = height_ / 2;
@@ -2012,7 +2012,7 @@ void Image::PrecalculateLevels()
     if (!data_ || IsCompressed())
     if (!data_ || IsCompressed())
         return;
         return;
 
 
-    PROFILE(PrecalculateImageMipLevels);
+    URHO3D_PROFILE(PrecalculateImageMipLevels);
 
 
     nextLevel_.Reset();
     nextLevel_.Reset();
 
 

+ 1 - 1
Source/Urho3D/Resource/ResourceCache.cpp

@@ -1027,7 +1027,7 @@ void ResourceCache::HandleBeginFrame(StringHash eventType, VariantMap& eventData
     // Check for background loaded resources that can be finished
     // Check for background loaded resources that can be finished
 #ifdef URHO3D_THREADING
 #ifdef URHO3D_THREADING
     {
     {
-        PROFILE(FinishBackgroundResources);
+        URHO3D_PROFILE(FinishBackgroundResources);
         backgroundLoader_->FinishResources(finishBackgroundResourcesMs_);
         backgroundLoader_->FinishResources(finishBackgroundResourcesMs_);
     }
     }
 #endif
 #endif

+ 1 - 1
Source/Urho3D/Scene/Node.cpp

@@ -890,7 +890,7 @@ Node* Node::Clone(CreateMode mode)
         return 0;
         return 0;
     }
     }
 
 
-    PROFILE(CloneNode);
+    URHO3D_PROFILE(CloneNode);
 
 
     SceneResolver resolver;
     SceneResolver resolver;
     Node* clone = CloneRecursive(parent_, resolver, mode);
     Node* clone = CloneRecursive(parent_, resolver, mode);

+ 15 - 15
Source/Urho3D/Scene/Scene.cpp

@@ -112,7 +112,7 @@ void Scene::RegisterObject(Context* context)
 
 
 bool Scene::Load(Deserializer& source, bool setInstanceDefault)
 bool Scene::Load(Deserializer& source, bool setInstanceDefault)
 {
 {
-    PROFILE(LoadScene);
+    URHO3D_PROFILE(LoadScene);
 
 
     StopAsyncLoading();
     StopAsyncLoading();
 
 
@@ -139,7 +139,7 @@ bool Scene::Load(Deserializer& source, bool setInstanceDefault)
 
 
 bool Scene::Save(Serializer& dest) const
 bool Scene::Save(Serializer& dest) const
 {
 {
-    PROFILE(SaveScene);
+    URHO3D_PROFILE(SaveScene);
 
 
     // Write ID first
     // Write ID first
     if (!dest.WriteFileID("USCN"))
     if (!dest.WriteFileID("USCN"))
@@ -163,7 +163,7 @@ bool Scene::Save(Serializer& dest) const
 
 
 bool Scene::LoadXML(const XMLElement& source, bool setInstanceDefault)
 bool Scene::LoadXML(const XMLElement& source, bool setInstanceDefault)
 {
 {
-    PROFILE(LoadSceneXML);
+    URHO3D_PROFILE(LoadSceneXML);
 
 
     StopAsyncLoading();
     StopAsyncLoading();
 
 
@@ -198,7 +198,7 @@ void Scene::AddReplicationState(NodeReplicationState* state)
 
 
 bool Scene::LoadXML(Deserializer& source)
 bool Scene::LoadXML(Deserializer& source)
 {
 {
-    PROFILE(LoadSceneXML);
+    URHO3D_PROFILE(LoadSceneXML);
 
 
     StopAsyncLoading();
     StopAsyncLoading();
 
 
@@ -221,7 +221,7 @@ bool Scene::LoadXML(Deserializer& source)
 
 
 bool Scene::SaveXML(Serializer& dest, const String& indentation) const
 bool Scene::SaveXML(Serializer& dest, const String& indentation) const
 {
 {
-    PROFILE(SaveSceneXML);
+    URHO3D_PROFILE(SaveSceneXML);
 
 
     SharedPtr<XMLFile> xml(new XMLFile(context_));
     SharedPtr<XMLFile> xml(new XMLFile(context_));
     XMLElement rootElem = xml->CreateRoot("scene");
     XMLElement rootElem = xml->CreateRoot("scene");
@@ -282,7 +282,7 @@ bool Scene::LoadAsync(File* file, LoadMode mode)
         // Preload resources if appropriate, then return to the original position for loading the scene content
         // Preload resources if appropriate, then return to the original position for loading the scene content
         if (mode != LOAD_SCENE)
         if (mode != LOAD_SCENE)
         {
         {
-            PROFILE(FindResourcesToPreload);
+            URHO3D_PROFILE(FindResourcesToPreload);
 
 
             unsigned currentPos = file->GetPosition();
             unsigned currentPos = file->GetPosition();
             PreloadResources(file, isSceneFile);
             PreloadResources(file, isSceneFile);
@@ -305,7 +305,7 @@ bool Scene::LoadAsync(File* file, LoadMode mode)
     }
     }
     else
     else
     {
     {
-        PROFILE(FindResourcesToPreload);
+        URHO3D_PROFILE(FindResourcesToPreload);
 
 
         LOGINFO("Preloading resources from " + file->GetName());
         LOGINFO("Preloading resources from " + file->GetName());
         PreloadResources(file, isSceneFile);
         PreloadResources(file, isSceneFile);
@@ -348,7 +348,7 @@ bool Scene::LoadAsyncXML(File* file, LoadMode mode)
         // Preload resources if appropriate
         // Preload resources if appropriate
         if (mode != LOAD_SCENE)
         if (mode != LOAD_SCENE)
         {
         {
-            PROFILE(FindResourcesToPreload);
+            URHO3D_PROFILE(FindResourcesToPreload);
 
 
             PreloadResourcesXML(rootElement);
             PreloadResourcesXML(rootElement);
         }
         }
@@ -374,7 +374,7 @@ bool Scene::LoadAsyncXML(File* file, LoadMode mode)
     }
     }
     else
     else
     {
     {
-        PROFILE(FindResourcesToPreload);
+        URHO3D_PROFILE(FindResourcesToPreload);
 
 
         LOGINFO("Preloading resources from " + file->GetName());
         LOGINFO("Preloading resources from " + file->GetName());
         PreloadResourcesXML(xml->GetRoot());
         PreloadResourcesXML(xml->GetRoot());
@@ -395,7 +395,7 @@ void Scene::StopAsyncLoading()
 
 
 Node* Scene::Instantiate(Deserializer& source, const Vector3& position, const Quaternion& rotation, CreateMode mode)
 Node* Scene::Instantiate(Deserializer& source, const Vector3& position, const Quaternion& rotation, CreateMode mode)
 {
 {
-    PROFILE(Instantiate);
+    URHO3D_PROFILE(Instantiate);
 
 
     SceneResolver resolver;
     SceneResolver resolver;
     unsigned nodeID = source.ReadUInt();
     unsigned nodeID = source.ReadUInt();
@@ -418,7 +418,7 @@ Node* Scene::Instantiate(Deserializer& source, const Vector3& position, const Qu
 
 
 Node* Scene::InstantiateXML(const XMLElement& source, const Vector3& position, const Quaternion& rotation, CreateMode mode)
 Node* Scene::InstantiateXML(const XMLElement& source, const Vector3& position, const Quaternion& rotation, CreateMode mode)
 {
 {
-    PROFILE(InstantiateXML);
+    URHO3D_PROFILE(InstantiateXML);
 
 
     SceneResolver resolver;
     SceneResolver resolver;
     unsigned nodeID = source.GetUInt("id");
     unsigned nodeID = source.GetUInt("id");
@@ -590,7 +590,7 @@ void Scene::Update(float timeStep)
             return;
             return;
     }
     }
 
 
-    PROFILE(UpdateScene);
+    URHO3D_PROFILE(UpdateScene);
 
 
     timeStep *= timeScale_;
     timeStep *= timeScale_;
 
 
@@ -611,7 +611,7 @@ void Scene::Update(float timeStep)
 
 
     // Update transform smoothing
     // Update transform smoothing
     {
     {
-        PROFILE(UpdateSmoothing);
+        URHO3D_PROFILE(UpdateSmoothing);
 
 
         float constant = 1.0f - Clamp(powf(2.0f, -timeStep * smoothingConstant_), 0.0f, 1.0f);
         float constant = 1.0f - Clamp(powf(2.0f, -timeStep * smoothingConstant_), 0.0f, 1.0f);
         float squaredSnapThreshold = snapThreshold_ * snapThreshold_;
         float squaredSnapThreshold = snapThreshold_ * snapThreshold_;
@@ -648,7 +648,7 @@ void Scene::EndThreadedUpdate()
 
 
     if (!delayedDirtyComponents_.Empty())
     if (!delayedDirtyComponents_.Empty())
     {
     {
-        PROFILE(EndThreadedUpdate);
+        URHO3D_PROFILE(EndThreadedUpdate);
 
 
         for (PODVector<Component*>::ConstIterator i = delayedDirtyComponents_.Begin(); i != delayedDirtyComponents_.End(); ++i)
         for (PODVector<Component*>::ConstIterator i = delayedDirtyComponents_.Begin(); i != delayedDirtyComponents_.End(); ++i)
             (*i)->OnMarkedDirty((*i)->GetNode());
             (*i)->OnMarkedDirty((*i)->GetNode());
@@ -984,7 +984,7 @@ void Scene::HandleResourceBackgroundLoaded(StringHash eventType, VariantMap& eve
 
 
 void Scene::UpdateAsyncLoading()
 void Scene::UpdateAsyncLoading()
 {
 {
-    PROFILE(UpdateAsyncLoading);
+    URHO3D_PROFILE(UpdateAsyncLoading);
 
 
     // If resources left to load, do not load nodes yet
     // If resources left to load, do not load nodes yet
     if (asyncProgress_.loadedResources_ < asyncProgress_.totalResources_)
     if (asyncProgress_.loadedResources_ < asyncProgress_.totalResources_)

+ 2 - 2
Source/Urho3D/UI/Font.cpp

@@ -108,7 +108,7 @@ bool Font::SaveXML(Serializer& dest, int pointSize, bool usedGlyphs, const Strin
     if (!fontFace)
     if (!fontFace)
         return false;
         return false;
 
 
-    PROFILE(FontSaveXML);
+    URHO3D_PROFILE(FontSaveXML);
 
 
     SharedPtr<FontFaceBitmap> packedFontFace(new FontFaceBitmap(this));
     SharedPtr<FontFaceBitmap> packedFontFace(new FontFaceBitmap(this));
     if (!packedFontFace->Load(fontFace, usedGlyphs))
     if (!packedFontFace->Load(fontFace, usedGlyphs))
@@ -152,7 +152,7 @@ FontFace* Font::GetFace(int pointSize)
         }
         }
     }
     }
 
 
-    PROFILE(GetFontFace);
+    URHO3D_PROFILE(GetFontFace);
 
 
     switch (fontType_)
     switch (fontType_)
     {
     {

+ 6 - 6
Source/Urho3D/UI/UI.cpp

@@ -299,7 +299,7 @@ void UI::Update(float timeStep)
 {
 {
     assert(rootElement_ && rootModalElement_);
     assert(rootElement_ && rootModalElement_);
 
 
-    PROFILE(UpdateUI);
+    URHO3D_PROFILE(UpdateUI);
 
 
     // Expire hovers
     // Expire hovers
     for (HashMap<WeakPtr<UIElement>, bool>::Iterator i = hoveredElements_.Begin(); i != hoveredElements_.End(); ++i)
     for (HashMap<WeakPtr<UIElement>, bool>::Iterator i = hoveredElements_.Begin(); i != hoveredElements_.End(); ++i)
@@ -393,7 +393,7 @@ void UI::RenderUpdate()
 {
 {
     assert(rootElement_ && rootModalElement_ && graphics_);
     assert(rootElement_ && rootModalElement_ && graphics_);
 
 
-    PROFILE(GetUIBatches);
+    URHO3D_PROFILE(GetUIBatches);
 
 
     uiRendered_ = false;
     uiRendered_ = false;
 
 
@@ -429,7 +429,7 @@ void UI::Render(bool resetRenderTargets)
     if (resetRenderTargets && uiRendered_)
     if (resetRenderTargets && uiRendered_)
         return;
         return;
 
 
-    PROFILE(RenderUI);
+    URHO3D_PROFILE(RenderUI);
 
 
     // If the OS cursor is visible, apply its shape now if changed
     // If the OS cursor is visible, apply its shape now if changed
     bool osCursorVisible = GetSubsystem<Input>()->IsMouseVisible();
     bool osCursorVisible = GetSubsystem<Input>()->IsMouseVisible();
@@ -473,7 +473,7 @@ SharedPtr<UIElement> UI::LoadLayout(Deserializer& source, XMLFile* styleFile)
 
 
 SharedPtr<UIElement> UI::LoadLayout(XMLFile* file, XMLFile* styleFile)
 SharedPtr<UIElement> UI::LoadLayout(XMLFile* file, XMLFile* styleFile)
 {
 {
-    PROFILE(LoadUILayout);
+    URHO3D_PROFILE(LoadUILayout);
 
 
     SharedPtr<UIElement> root;
     SharedPtr<UIElement> root;
 
 
@@ -516,7 +516,7 @@ SharedPtr<UIElement> UI::LoadLayout(XMLFile* file, XMLFile* styleFile)
 
 
 bool UI::SaveLayout(Serializer& dest, UIElement* element)
 bool UI::SaveLayout(Serializer& dest, UIElement* element)
 {
 {
-    PROFILE(SaveUILayout);
+    URHO3D_PROFILE(SaveUILayout);
 
 
     return element && element->SaveXML(dest);
     return element && element->SaveXML(dest);
 }
 }
@@ -693,7 +693,7 @@ void UI::Initialize()
     if (!graphics || !graphics->IsInitialized())
     if (!graphics || !graphics->IsInitialized())
         return;
         return;
 
 
-    PROFILE(InitUI);
+    URHO3D_PROFILE(InitUI);
 
 
     graphics_ = graphics;
     graphics_ = graphics;
     UIBatch::posAdjust = Vector3(Graphics::GetPixelUVOffset(), 0.0f);
     UIBatch::posAdjust = Vector3(Graphics::GetPixelUVOffset(), 0.0f);

+ 2 - 2
Source/Urho3D/Urho2D/PhysicsWorld2D.cpp

@@ -104,7 +104,7 @@ void PhysicsWorld2D::DrawDebugGeometry(DebugRenderer* debug, bool depthTest)
 {
 {
     if (debug)
     if (debug)
     {
     {
-        PROFILE(Physics2DDrawDebug);
+        URHO3D_PROFILE(Physics2DDrawDebug);
 
 
         debugRenderer_ = debug;
         debugRenderer_ = debug;
         debugDepthTest_ = depthTest;
         debugDepthTest_ = depthTest;
@@ -226,7 +226,7 @@ void PhysicsWorld2D::DrawTransform(const b2Transform& xf)
 
 
 void PhysicsWorld2D::Update(float timeStep)
 void PhysicsWorld2D::Update(float timeStep)
 {
 {
-    PROFILE(UpdatePhysics2D);
+    URHO3D_PROFILE(UpdatePhysics2D);
 
 
     using namespace PhysicsPreStep2D;
     using namespace PhysicsPreStep2D;
 
 

+ 2 - 2
Source/Urho3D/Urho2D/Renderer2D.cpp

@@ -333,7 +333,7 @@ void Renderer2D::HandleBeginViewUpdate(StringHash eventType, VariantMap& eventDa
 
 
     frame_ = static_cast<View*>(eventData[P_VIEW].GetPtr())->GetFrameInfo();
     frame_ = static_cast<View*>(eventData[P_VIEW].GetPtr())->GetFrameInfo();
 
 
-    PROFILE(UpdateRenderer2D);
+    URHO3D_PROFILE(UpdateRenderer2D);
 
 
     Camera* camera = static_cast<Camera*>(eventData[P_CAMERA].GetPtr());
     Camera* camera = static_cast<Camera*>(eventData[P_CAMERA].GetPtr());
     frustum_ = &camera->GetFrustum();
     frustum_ = &camera->GetFrustum();
@@ -347,7 +347,7 @@ void Renderer2D::HandleBeginViewUpdate(StringHash eventType, VariantMap& eventDa
 
 
     // Check visibility
     // Check visibility
     {
     {
-        PROFILE(CheckDrawableVisibility);
+        URHO3D_PROFILE(CheckDrawableVisibility);
 
 
         WorkQueue* queue = GetSubsystem<WorkQueue>();
         WorkQueue* queue = GetSubsystem<WorkQueue>();
         int numWorkItems = queue->GetNumThreads() + 1; // Worker threads + main thread
         int numWorkItems = queue->GetNumThreads() + 1; // Worker threads + main thread