Browse Source

In preparation for supporting shared library for Windows platform, selectively marked Engine class as public API. Setup the visibility compiler flags for GCC and Clang to hide non-marked API from shared library.

Wei Tjong Yao 12 years ago
parent
commit
e952719302
100 changed files with 246 additions and 229 deletions
  1. 52 46
      CMakeLists.txt
  2. 2 2
      Docs/ScriptAPI.dox
  3. 1 1
      Engine/Audio/Audio.h
  4. 1 1
      Engine/Audio/Sound.h
  5. 1 1
      Engine/Audio/SoundListener.h
  6. 1 1
      Engine/Audio/SoundSource.h
  7. 1 1
      Engine/Audio/SoundSource3D.h
  8. 6 4
      Engine/Container/Allocator.h
  9. 2 1
      Engine/Container/HashBase.h
  10. 2 1
      Engine/Container/ListBase.h
  11. 3 1
      Engine/Container/RefCounted.h
  12. 2 2
      Engine/Container/Str.h
  13. 2 1
      Engine/Container/VectorBase.h
  14. 1 1
      Engine/Core/Attribute.h
  15. 3 1
      Engine/Core/Condition.h
  16. 1 1
      Engine/Core/Context.h
  17. 1 1
      Engine/Core/MiniDump.h
  18. 2 2
      Engine/Core/Mutex.h
  19. 3 3
      Engine/Core/Object.h
  20. 17 17
      Engine/Core/ProcessUtils.h
  21. 3 3
      Engine/Core/Profiler.h
  22. 37 37
      Engine/Core/StringUtils.h
  23. 3 1
      Engine/Core/Thread.h
  24. 3 3
      Engine/Core/Timer.h
  25. 1 1
      Engine/Core/Variant.h
  26. 1 1
      Engine/Core/WorkQueue.h
  27. 1 1
      Engine/Engine/Application.h
  28. 1 1
      Engine/Engine/Console.h
  29. 1 1
      Engine/Engine/DebugHud.h
  30. 1 1
      Engine/Engine/Engine.h
  31. 1 1
      Engine/Graphics/AnimatedModel.h
  32. 1 1
      Engine/Graphics/Animation.h
  33. 1 1
      Engine/Graphics/AnimationController.h
  34. 1 1
      Engine/Graphics/AnimationState.h
  35. 1 1
      Engine/Graphics/BillboardSet.h
  36. 1 1
      Engine/Graphics/Camera.h
  37. 1 1
      Engine/Graphics/CustomGeometry.h
  38. 1 1
      Engine/Graphics/DebugRenderer.h
  39. 1 1
      Engine/Graphics/DecalSet.h
  40. 1 1
      Engine/Graphics/Direct3D9/D3D9GPUObject.h
  41. 1 1
      Engine/Graphics/Direct3D9/D3D9Graphics.h
  42. 1 1
      Engine/Graphics/Direct3D9/D3D9GraphicsImpl.h
  43. 1 1
      Engine/Graphics/Direct3D9/D3D9IndexBuffer.h
  44. 1 1
      Engine/Graphics/Direct3D9/D3D9RenderSurface.h
  45. 1 1
      Engine/Graphics/Direct3D9/D3D9Shader.h
  46. 1 1
      Engine/Graphics/Direct3D9/D3D9ShaderVariation.h
  47. 1 1
      Engine/Graphics/Direct3D9/D3D9Texture.h
  48. 1 1
      Engine/Graphics/Direct3D9/D3D9Texture2D.h
  49. 1 1
      Engine/Graphics/Direct3D9/D3D9TextureCube.h
  50. 1 1
      Engine/Graphics/Direct3D9/D3D9VertexBuffer.h
  51. 1 1
      Engine/Graphics/Direct3D9/D3D9VertexDeclaration.h
  52. 1 1
      Engine/Graphics/Drawable.h
  53. 1 1
      Engine/Graphics/Geometry.h
  54. 1 1
      Engine/Graphics/Light.h
  55. 1 1
      Engine/Graphics/Material.h
  56. 1 1
      Engine/Graphics/Model.h
  57. 1 1
      Engine/Graphics/OcclusionBuffer.h
  58. 2 2
      Engine/Graphics/Octree.h
  59. 6 6
      Engine/Graphics/OctreeQuery.h
  60. 1 1
      Engine/Graphics/OpenGL/OGLGPUObject.h
  61. 1 1
      Engine/Graphics/OpenGL/OGLGraphics.h
  62. 1 1
      Engine/Graphics/OpenGL/OGLGraphicsImpl.h
  63. 1 1
      Engine/Graphics/OpenGL/OGLIndexBuffer.h
  64. 1 1
      Engine/Graphics/OpenGL/OGLRenderSurface.h
  65. 1 1
      Engine/Graphics/OpenGL/OGLShader.h
  66. 1 1
      Engine/Graphics/OpenGL/OGLShaderProgram.h
  67. 1 1
      Engine/Graphics/OpenGL/OGLShaderVariation.h
  68. 1 1
      Engine/Graphics/OpenGL/OGLTexture.h
  69. 1 1
      Engine/Graphics/OpenGL/OGLTexture2D.h
  70. 1 1
      Engine/Graphics/OpenGL/OGLTextureCube.h
  71. 1 1
      Engine/Graphics/OpenGL/OGLVertexBuffer.h
  72. 1 1
      Engine/Graphics/ParticleEmitter.h
  73. 2 2
      Engine/Graphics/RenderPath.h
  74. 1 1
      Engine/Graphics/Renderer.h
  75. 1 1
      Engine/Graphics/ShaderParser.h
  76. 1 1
      Engine/Graphics/Skeleton.h
  77. 1 1
      Engine/Graphics/Skybox.h
  78. 1 1
      Engine/Graphics/StaticModel.h
  79. 1 1
      Engine/Graphics/Tangent.h
  80. 2 2
      Engine/Graphics/Technique.h
  81. 1 1
      Engine/Graphics/Terrain.h
  82. 1 1
      Engine/Graphics/TerrainPatch.h
  83. 1 1
      Engine/Graphics/View.h
  84. 1 1
      Engine/Graphics/Viewport.h
  85. 1 1
      Engine/Graphics/Zone.h
  86. 1 1
      Engine/IO/Deserializer.h
  87. 1 1
      Engine/IO/File.h
  88. 13 13
      Engine/IO/FileSystem.h
  89. 1 1
      Engine/IO/FileWatcher.h
  90. 1 1
      Engine/IO/Log.h
  91. 1 1
      Engine/IO/MemoryBuffer.h
  92. 1 1
      Engine/IO/PackageFile.h
  93. 1 1
      Engine/IO/Serializer.h
  94. 1 1
      Engine/IO/VectorBuffer.h
  95. 1 1
      Engine/Input/Input.h
  96. 1 1
      Engine/Math/AreaAllocator.h
  97. 1 1
      Engine/Math/BoundingBox.h
  98. 1 1
      Engine/Math/Color.h
  99. 1 1
      Engine/Math/Frustum.h
  100. 1 1
      Engine/Math/Matrix3.h

+ 52 - 46
CMakeLists.txt

@@ -24,7 +24,7 @@
 project (Urho3D)
 
 # Set minimum version
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 2.8.6)
 
 if (COMMAND cmake_policy)
     cmake_policy (SET CMP0003 NEW)
@@ -40,17 +40,17 @@ include (Urho3D-CMake-magic)
 include (CheckIncludeFiles)
 CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H)
 if (HAVE_STDINT_H)
-    add_definitions(-DHAVE_STDINT_H)
+    add_definitions (-DHAVE_STDINT_H)
 endif ()
 
 # Add definitions for GLEW
 if (NOT IOS AND NOT ANDROID AND NOT RASPI AND USE_OPENGL)
-    add_definitions(-DGLEW_STATIC)
-    add_definitions(-DGLEW_NO_GLU)
+    add_definitions (-DGLEW_STATIC)
+    add_definitions (-DGLEW_NO_GLU)
 endif ()
 
-# Add SDL as a global include directory
-include_directories (ThirdParty/SDL/include)
+# Add global include directories for export header and SDL header
+include_directories (${CMAKE_BINARY_DIR} ThirdParty/SDL/include)
 
 # Add targets
 add_subdirectory (Engine/Audio)
@@ -80,7 +80,7 @@ add_subdirectory (ThirdParty/StanHull)
 add_subdirectory (ThirdParty/STB)
 add_subdirectory (ThirdParty/JO)
 
-# Alternative Lua bindings
+# Alternative Lua bindings target
 if (ENABLE_LUA)
     add_definitions (-DENABLE_LUA)
     add_subdirectory (ThirdParty/Lua)
@@ -88,15 +88,6 @@ if (ENABLE_LUA)
     add_subdirectory (Extras/LuaScript)
 endif ()
 
-# Do not build tools for embedded system unless it is explicitly enabled
-if (NOT ENABLE_TOOLS)
-    if (RASPI)
-        set (ENABLE_TOOLS 0)
-    else ()
-        set (ENABLE_TOOLS 1)
-    endif ()
-endif ()
-
 if (NOT IOS AND NOT ANDROID)
     if (ENABLE_LUA)
         add_subdirectory (ThirdParty/tolua++/src/bin)
@@ -107,41 +98,56 @@ if (NOT IOS AND NOT ANDROID)
         endif ()
         add_subdirectory (ThirdParty/LibCpuId)
     endif ()
-    
-    # Urho3D tools
-    if (ENABLE_TOOLS)
-        add_subdirectory (ThirdParty/Assimp)
-        add_subdirectory (Tools/AssetImporter)
-        add_subdirectory (Tools/OgreImporter)
-        add_subdirectory (Tools/PackageTool)
-        add_subdirectory (Tools/RampGenerator)
-        add_subdirectory (Tools/ScriptCompiler)
-        add_subdirectory (Tools/DocConverter)
-    endif ()
+endif ()    
 
+# Urho3D build type is mutually exclusive due to potential different visibility (export) attribute
+if (URHO3D_BUILD_TYPE MATCHES "STATIC|SHARED" AND NOT IOS AND NOT ANDROID)
     # Urho3D library
-    if (ENABLE_LIBRARY)
-        add_subdirectory (Urho3D/lib)
+    add_subdirectory (Urho3D/lib)
+else ()
+    # Urho3D main app
+    add_subdirectory (Urho3D/bin)
+    
+    # Create a dummy export header file as it is being included by all the Engine's header files
+    configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Urho3D.h.in ${CMAKE_CURRENT_BINARY_DIR}/Urho3D.h COPYONLY) 
+
+    # Do not build tools for embedded system unless it is explicitly enabled
+    if (NOT ENABLE_TOOLS)
+        if (RASPI)
+            set (ENABLE_TOOLS 0)
+        else ()
+            set (ENABLE_TOOLS 1)
+        endif ()
     endif ()
     
-    # Urho3D samples
-    if (ENABLE_SAMPLES)
-        add_subdirectory (Samples)
+    if (NOT IOS AND NOT ANDROID)
+        # Urho3D tools
+        if (ENABLE_TOOLS)
+            add_subdirectory (ThirdParty/Assimp)
+            add_subdirectory (Tools/AssetImporter)
+            add_subdirectory (Tools/OgreImporter)
+            add_subdirectory (Tools/PackageTool)
+            add_subdirectory (Tools/RampGenerator)
+            add_subdirectory (Tools/ScriptCompiler)
+            add_subdirectory (Tools/DocConverter)
+        endif ()
+    
+        # Urho3D samples
+        if (ENABLE_SAMPLES)
+            add_subdirectory (Samples)
+        endif ()
+        
+        # Urho3D extras
+        # Todo: CharacterDemo will be moved to Samples
+        if (ENABLE_EXTRAS)
+            add_subdirectory (Extras/OgreBatchConverter)
+            add_subdirectory (Extras/CharacterDemo)
+        endif ()
     endif ()
     
-    # Urho3D extras
-    # Todo: CharacterDemo will be moved to Samples
-    if (ENABLE_EXTRAS)
-        add_subdirectory (Extras/OgreBatchConverter)
-        add_subdirectory (Extras/CharacterDemo)
+    # Urho3D non-GL tools
+    if (NOT USE_OPENGL AND ENABLE_TOOLS)
+        add_subdirectory (ThirdParty/MojoShader)
+        add_subdirectory (Tools/ShaderCompiler)
     endif ()
 endif ()
-
-# Urho3D non-GL tools
-if (NOT USE_OPENGL AND ENABLE_TOOLS)
-    add_subdirectory (ThirdParty/MojoShader)
-    add_subdirectory (Tools/ShaderCompiler)
-endif ()
-
-# Urho3D main app
-add_subdirectory (Urho3D/bin)

+ 2 - 2
Docs/ScriptAPI.dox

@@ -2465,10 +2465,10 @@ Methods:<br>
 - void Apply()
 - void SetBoneWeight(uint, float)
 - void SetBoneWeight(StringHash, float)
-- uint GetTrackIndex(const String&) const
-- uint GetTrackIndex(StringHash) const
 - float GetBoneWeight(uint) const
 - float GetBoneWeight(StringHash) const
+- uint GetTrackIndex(const String&) const
+- uint GetTrackIndex(StringHash) const
 
 Properties:<br>
 - int refs (readonly)

+ 1 - 1
Engine/Audio/Audio.h

@@ -36,7 +36,7 @@ class SoundListener;
 class SoundSource;
 
 /// %Audio subsystem.
-class Audio : public Object
+class URHO3D_API Audio : public Object
 {
     OBJECT(Audio);
 

+ 1 - 1
Engine/Audio/Sound.h

@@ -29,7 +29,7 @@ namespace Urho3D
 {
 
 /// %Sound resource.
-class Sound : public Resource
+class URHO3D_API Sound : public Resource
 {
     OBJECT(Sound);
     

+ 1 - 1
Engine/Audio/SoundListener.h

@@ -28,7 +28,7 @@ namespace Urho3D
 {
 
 /// %Sound listener component
-class SoundListener : public Component
+class URHO3D_API SoundListener : public Component
 {
     OBJECT(SoundListener);
     

+ 1 - 1
Engine/Audio/SoundSource.h

@@ -35,7 +35,7 @@ class Sound;
 static const int DECODE_BUFFER_LENGTH = 100;
 
 /// %Sound source component with stereo position.
-class SoundSource : public Component
+class URHO3D_API SoundSource : public Component
 {
     OBJECT(SoundSource);
     

+ 1 - 1
Engine/Audio/SoundSource3D.h

@@ -30,7 +30,7 @@ namespace Urho3D
 class Audio;
 
 /// %Sound source component with three-dimensional position.
-class SoundSource3D : public SoundSource
+class URHO3D_API SoundSource3D : public SoundSource
 {
     OBJECT(SoundSource3D);
     

+ 6 - 4
Engine/Container/Allocator.h

@@ -22,6 +22,8 @@
 
 #pragma once
 
+#include "Urho3D.h"
+
 #include <new>
 
 namespace Urho3D
@@ -53,13 +55,13 @@ struct AllocatorNode
 };
 
 /// Initialize a fixed-size allocator with the node size and initial capacity.
-AllocatorBlock* AllocatorInitialize(unsigned nodeSize, unsigned initialCapacity = 1);
+URHO3D_API AllocatorBlock* AllocatorInitialize(unsigned nodeSize, unsigned initialCapacity = 1);
 /// Uninitialize a fixed-size allocator. Frees all blocks in the chain.
-void AllocatorUninitialize(AllocatorBlock* allocator);
+URHO3D_API void AllocatorUninitialize(AllocatorBlock* allocator);
 /// Reserve a node. Creates a new block if necessary.
-void* AllocatorReserve(AllocatorBlock* allocator);
+URHO3D_API void* AllocatorReserve(AllocatorBlock* allocator);
 /// Free a node. Does not free any blocks.
-void AllocatorFree(AllocatorBlock* allocator, void* ptr);
+URHO3D_API void AllocatorFree(AllocatorBlock* allocator, void* ptr);
 
 /// %Allocator template class. Allocates objects of a specific class.
 template <class T> class Allocator

+ 2 - 1
Engine/Container/HashBase.h

@@ -22,6 +22,7 @@
 
 #pragma once
 
+#include "Urho3D.h"
 #include "Allocator.h"
 #include "Hash.h"
 #include "Swap.h"
@@ -87,7 +88,7 @@ struct HashIteratorBase
 };
 
 /// Hash set/map base class.
-class HashBase
+class URHO3D_API HashBase
 {
 public:
     /// Initial amount of buckets.

+ 2 - 1
Engine/Container/ListBase.h

@@ -22,6 +22,7 @@
 
 #pragma once
 
+#include "Urho3D.h"
 #include "Allocator.h"
 #include "Swap.h"
 
@@ -83,7 +84,7 @@ struct ListIteratorBase
 };
 
 /// Doubly-linked list base class.
-class ListBase
+class URHO3D_API ListBase
 {
 public:
     /// Construct.

+ 3 - 1
Engine/Container/RefCounted.h

@@ -22,6 +22,8 @@
 
 #pragma once
 
+#include "Urho3D.h"
+
 namespace Urho3D
 {
 
@@ -50,7 +52,7 @@ struct RefCount
 };
 
 /// Base class for intrusively reference-counted objects. These are noncopyable and non-assignable.
-class RefCounted
+class URHO3D_API RefCounted
 {
 public:
     /// Construct. Allocate the reference count structure and set an initial self weak reference.

+ 2 - 2
Engine/Container/Str.h

@@ -36,7 +36,7 @@ static const int CONVERSION_BUFFER_LENGTH = 128;
 class WString;
 
 /// %String class.
-class String
+class URHO3D_API String
 {
 public:
     typedef RandomAccessIterator<char> Iterator;
@@ -503,7 +503,7 @@ inline String operator + (const char* lhs, const String& rhs)
 }
 
 /// Wide character string. Only meant for converting from String and passing to the operating system where necessary.
-class WString
+class URHO3D_API WString
 {
 public:
     /// Construct empty.

+ 2 - 1
Engine/Container/VectorBase.h

@@ -22,6 +22,7 @@
 
 #pragma once
 
+#include "Urho3D.h"
 #include "Swap.h"
 
 namespace Urho3D
@@ -144,7 +145,7 @@ template <class T> struct RandomAccessConstIterator
 };
 
 /// %Vector base class.
-class VectorBase
+class URHO3D_API VectorBase
 {
 public:
     /// Construct.

+ 1 - 1
Engine/Core/Attribute.h

@@ -48,7 +48,7 @@ static const unsigned AM_COMPONENTID = 0x20;
 class Serializable;
 
 /// Internal helper class for invoking attribute accessors.
-class AttributeAccessor : public RefCounted
+class URHO3D_API AttributeAccessor : public RefCounted
 {
 public:
     /// Get the attribute.

+ 3 - 1
Engine/Core/Condition.h

@@ -22,11 +22,13 @@
 
 #pragma once
 
+#include "Urho3D.h"
+
 namespace Urho3D
 {
 
 /// %Condition on which a thread can wait.
-class Condition
+class URHO3D_API Condition
 {
 public:
     /// Construct.

+ 1 - 1
Engine/Core/Context.h

@@ -30,7 +30,7 @@ namespace Urho3D
 {
 
 /// Urho3D execution context. Provides access to subsystems, object factories and attributes, and event receivers.
-class Context : public RefCounted
+class URHO3D_API Context : public RefCounted
 {
     friend class Object;
 

+ 1 - 1
Engine/Core/MiniDump.h

@@ -27,7 +27,7 @@ namespace Urho3D
 
 #if defined(_MSC_VER) && defined(ENABLE_MINIDUMPS)
 /// Write a minidump. Needs to be called from within a structured exception handler.
-int WriteMiniDump(const char* applicationName, void* exceptionPointers);
+URHO3D_API int WriteMiniDump(const char* applicationName, void* exceptionPointers);
 #endif
 
 }

+ 2 - 2
Engine/Core/Mutex.h

@@ -26,7 +26,7 @@ namespace Urho3D
 {
 
 /// Operating system mutual exclusion primitive.
-class Mutex
+class URHO3D_API Mutex
 {
 public:
     /// Construct.
@@ -45,7 +45,7 @@ private:
 };
 
 /// Lock that automatically acquires and releases a mutex.
-class MutexLock
+class URHO3D_API MutexLock
 {
 public:
     /// Construct and acquire the mutex.

+ 3 - 3
Engine/Core/Object.h

@@ -33,7 +33,7 @@ class Context;
 class EventHandler;
 
 /// Base class for objects with type identification, subsystem access and event sending/receiving capability.
-class Object : public RefCounted
+class URHO3D_API Object : public RefCounted
 {
     friend class Context;
     
@@ -107,7 +107,7 @@ private:
 template <class T> T* Object::GetSubsystem() const { return static_cast<T*>(GetSubsystem(T::GetTypeStatic())); }
 
 /// Base class for object factories.
-class ObjectFactory : public RefCounted
+class URHO3D_API ObjectFactory : public RefCounted
 {
 public:
     /// Construct.
@@ -153,7 +153,7 @@ public:
 };
 
 /// Internal helper class for invoking event handler functions.
-class EventHandler : public LinkedListNode
+class URHO3D_API EventHandler : public LinkedListNode
 {
 public:
     /// Construct with specified receiver.

+ 17 - 17
Engine/Core/ProcessUtils.h

@@ -32,38 +32,38 @@ namespace Urho3D
 class Mutex;
 
 /// Initialize the FPU to round-to-nearest, single precision mode.
-void InitFPU();
+URHO3D_API void InitFPU();
 /// Display an error dialog with the specified title and message.
-void ErrorDialog(const String& title, const String& message);
+URHO3D_API void ErrorDialog(const String& title, const String& message);
 /// Exit the application with an error message to the console.
-void ErrorExit(const String& message = String::EMPTY, int exitCode = EXIT_FAILURE);
+URHO3D_API void ErrorExit(const String& message = String::EMPTY, int exitCode = EXIT_FAILURE);
 /// Open a console window.
-void OpenConsoleWindow();
+URHO3D_API void OpenConsoleWindow();
 /// Print Unicode text to the console. Will not be printed to the MSVC output window.
-void PrintUnicode(const String& str, bool error = false);
+URHO3D_API void PrintUnicode(const String& str, bool error = false);
 /// Print Unicode text to the console with a newline appended. Will not be printed to the MSVC output window.
-void PrintUnicodeLine(const String& str, bool error = false);
+URHO3D_API void PrintUnicodeLine(const String& str, bool error = false);
 /// Print ASCII text to the console with a newline appended. Uses printf() to allow printing into the MSVC output window.
-void PrintLine(const String& str, bool error = false);
+URHO3D_API void PrintLine(const String& str, bool error = false);
 /// Parse arguments from the command line. First argument is by default assumed to be the executable name and is skipped.
-const Vector<String>& ParseArguments(const String& cmdLine, bool skipFirstArgument = true);
+URHO3D_API const Vector<String>& ParseArguments(const String& cmdLine, bool skipFirstArgument = true);
 /// Parse arguments from the command line.
-const Vector<String>& ParseArguments(const char* cmdLine);
+URHO3D_API const Vector<String>& ParseArguments(const char* cmdLine);
 /// Parse arguments from a wide char command line.
-const Vector<String>& ParseArguments(const WString& cmdLine);
+URHO3D_API const Vector<String>& ParseArguments(const WString& cmdLine);
 /// Parse arguments from a wide char command line.
-const Vector<String>& ParseArguments(const wchar_t* cmdLine);
+URHO3D_API const Vector<String>& ParseArguments(const wchar_t* cmdLine);
 /// Parse arguments from argc & argv.
-const Vector<String>& ParseArguments(int argc, char** argv);
+URHO3D_API const Vector<String>& ParseArguments(int argc, char** argv);
 /// Return previously parsed arguments.
-const Vector<String>& GetArguments();
+URHO3D_API const Vector<String>& GetArguments();
 /// Read input from the console window. Return empty if no input.
-String GetConsoleInput();
+URHO3D_API String GetConsoleInput();
 /// Return the runtime platform identifier. Currently either "Windows", "Linux", "Mac OS X" or "Android".
-String GetPlatform();
+URHO3D_API String GetPlatform();
 /// Return the number of physical CPU cores.
-unsigned GetNumPhysicalCPUs();
+URHO3D_API unsigned GetNumPhysicalCPUs();
 /// Return the number of logical CPUs (different from physical if hyperthreading is used.)
-unsigned GetNumLogicalCPUs();
+URHO3D_API unsigned GetNumLogicalCPUs();
 
 }

+ 3 - 3
Engine/Core/Profiler.h

@@ -29,7 +29,7 @@ namespace Urho3D
 {
 
 /// Profiling data for one block in the profiling tree.
-class ProfilerBlock
+class URHO3D_API ProfilerBlock
 {
 public:
     /// Construct with the specified parent block and name.
@@ -167,7 +167,7 @@ public:
 };
 
 /// Hierarchical performance profiler subsystem.
-class Profiler : public Object
+class URHO3D_API Profiler : public Object
 {
     OBJECT(Profiler);
     
@@ -223,7 +223,7 @@ private:
 };
 
 /// Helper class for automatically beginning and ending a profiling block
-class AutoProfileBlock
+class URHO3D_API AutoProfileBlock
 {
 public:
     /// Construct. Begin a profiling block with the specified name and optional call count.

+ 37 - 37
Engine/Core/StringUtils.h

@@ -28,78 +28,78 @@ namespace Urho3D
 {
 
 /// Parse a bool from a string. Check for the first non-empty character (converted to lowercase) being either 't', 'y' or '1'.
-bool ToBool(const String& source);
+URHO3D_API bool ToBool(const String& source);
 /// Parse a bool from a C string. Check for the first non-empty character (converted to lowercase) being either 't', 'y' or '1'.
-bool ToBool(const char* source);
+URHO3D_API bool ToBool(const char* source);
 /// Parse a float from a string.
-float ToFloat(const String& source);
+URHO3D_API float ToFloat(const String& source);
 /// Parse a float from a C string.
-float ToFloat(const char* source);
+URHO3D_API float ToFloat(const char* source);
 /// Parse an integer from a string.
-int ToInt(const String& source);
+URHO3D_API int ToInt(const String& source);
 /// Parse an integer from a C string.
-int ToInt(const char* source);
+URHO3D_API int ToInt(const char* source);
 /// Parse an unsigned integer from a string.
-unsigned ToUInt(const String& source);
+URHO3D_API unsigned ToUInt(const String& source);
 /// Parse an unsigned integer from a C string.
-unsigned ToUInt(const char* source);
+URHO3D_API unsigned ToUInt(const char* source);
 /// Parse a Color from a string.
-Color ToColor(const String& source);
+URHO3D_API Color ToColor(const String& source);
 /// Parse a Color from a C string.
-Color ToColor(const char* source);
+URHO3D_API Color ToColor(const char* source);
 /// Parse an IntRect from a string.
-IntRect ToIntRect(const String& source);
+URHO3D_API IntRect ToIntRect(const String& source);
 /// Parse an IntRect from a C string.
-IntRect ToIntRect(const char* source);
+URHO3D_API IntRect ToIntRect(const char* source);
 /// Parse an IntVector2 from a string.
-IntVector2 ToIntVector2(const String& source);
+URHO3D_API IntVector2 ToIntVector2(const String& source);
 /// Parse an IntVector2 from a C string.
-IntVector2 ToIntVector2(const char* source);
+URHO3D_API IntVector2 ToIntVector2(const char* source);
 /// Parse a Quaternion from a string. If only 3 components specified, convert Euler angles (degrees) to quaternion.
-Quaternion ToQuaternion(const String& source);
+URHO3D_API Quaternion ToQuaternion(const String& source);
 /// Parse a Quaternion from a C string. If only 3 components specified, convert Euler angles (degrees) to quaternion.
-Quaternion ToQuaternion(const char* source);
+URHO3D_API Quaternion ToQuaternion(const char* source);
 /// Parse a Rect from a string.
-Rect ToRect(const String& source);
+URHO3D_API Rect ToRect(const String& source);
 /// Parse a Rect from a C string.
-Rect ToRect(const char* source);
+URHO3D_API Rect ToRect(const char* source);
 /// Parse a Vector2 from a string.
-Vector2 ToVector2(const String& source);
+URHO3D_API Vector2 ToVector2(const String& source);
 /// Parse a Vector2 from a C string.
-Vector2 ToVector2(const char* source);
+URHO3D_API Vector2 ToVector2(const char* source);
 /// Parse a Vector3 from a string.
-Vector3 ToVector3(const String& source);
+URHO3D_API Vector3 ToVector3(const String& source);
 /// Parse a Vector3 from a C string.
-Vector3 ToVector3(const char* source);
+URHO3D_API Vector3 ToVector3(const char* source);
 /// Parse a Vector4 from a string.
-Vector4 ToVector4(const String& source, bool allowMissingCoords = false);
+URHO3D_API Vector4 ToVector4(const String& source, bool allowMissingCoords = false);
 /// Parse a Vector4 from a C string.
-Vector4 ToVector4(const char* source, bool allowMissingCoords = false);
+URHO3D_API Vector4 ToVector4(const char* source, bool allowMissingCoords = false);
 /// Parse a float or Vector variant from a string.
-Variant ToVectorVariant(const String& source);
+URHO3D_API Variant ToVectorVariant(const String& source);
 /// Parse a float or Vector variant from a string.
-Variant ToVectorVariant(const char* source);
+URHO3D_API Variant ToVectorVariant(const char* source);
 /// Convert a pointer to string (returns hexadecimal.)
-String ToString(void* value);
+URHO3D_API String ToString(void* value);
 /// Convert an unsigned integer to string as hexadecimal.
-String ToStringHex(unsigned value);
+URHO3D_API String ToStringHex(unsigned value);
 /// Convert a byte buffer to a string.
-void BufferToString(String& dest, const void* data, unsigned size);
+URHO3D_API void BufferToString(String& dest, const void* data, unsigned size);
 /// Convert a string to a byte buffer.
-void StringToBuffer(PODVector<unsigned char>& dest, const String& source);
+URHO3D_API void StringToBuffer(PODVector<unsigned char>& dest, const String& source);
 /// Convert a C string to a byte buffer.
-void StringToBuffer(PODVector<unsigned char>& dest, const char* source);
+URHO3D_API void StringToBuffer(PODVector<unsigned char>& dest, const char* source);
 /// Return an index to a string list corresponding to the given string, or a default value if not found. The string list must be empty-terminated.
-unsigned GetStringListIndex(const String& value, const String* strings, unsigned defaultIndex, bool caseSensitive = false);
+URHO3D_API unsigned GetStringListIndex(const String& value, const String* strings, unsigned defaultIndex, bool caseSensitive = false);
 /// Return an index to a string list corresponding to the given C string, or a default value if not found. The string list must be empty-terminated.
-unsigned GetStringListIndex(const char* value, const String* strings, unsigned defaultIndex, bool caseSensitive = false);
+URHO3D_API unsigned GetStringListIndex(const char* value, const String* strings, unsigned defaultIndex, bool caseSensitive = false);
 /// Return an index to a C string list corresponding to the given C string, or a default value if not found. The string list must be empty-terminated.
-unsigned GetStringListIndex(const char* value, const char** strings, unsigned defaultIndex, bool caseSensitive = false);
+URHO3D_API unsigned GetStringListIndex(const char* value, const char** strings, unsigned defaultIndex, bool caseSensitive = false);
 /// Return a formatted string.
-String ToString(const char* formatString, ...);
+URHO3D_API String ToString(const char* formatString, ...);
 /// Return whether a char is an alphabet letter.
-bool IsAlpha(unsigned ch);
+URHO3D_API bool IsAlpha(unsigned ch);
 /// Return whether a char is a digit.
-bool IsDigit(unsigned ch);
+URHO3D_API bool IsDigit(unsigned ch);
 
 }

+ 3 - 1
Engine/Core/Thread.h

@@ -22,11 +22,13 @@
 
 #pragma once
 
+#include "Urho3D.h"
+
 namespace Urho3D
 {
 
 /// Operating system thread.
-class Thread
+class URHO3D_API Thread
 {
 public:
     /// Construct. Does not start the thread yet.

+ 3 - 3
Engine/Core/Timer.h

@@ -28,7 +28,7 @@ namespace Urho3D
 {
 
 /// Low-resolution operating system timer.
-class Timer
+class URHO3D_API Timer
 {
 public:
     /// Construct. Get the starting clock value.
@@ -45,7 +45,7 @@ private:
 };
 
 /// High-resolution operating system timer used in profiling.
-class HiresTimer
+class URHO3D_API HiresTimer
 {
     friend class Time;
     
@@ -74,7 +74,7 @@ private:
 };
 
 /// %Time and frame counter subsystem.
-class Time : public Object
+class URHO3D_API Time : public Object
 {
     OBJECT(Time);
     

+ 1 - 1
Engine/Core/Variant.h

@@ -168,7 +168,7 @@ typedef Vector<Variant> VariantVector;
 typedef HashMap<ShortStringHash, Variant> VariantMap;
 
 /// Variable that supports a fixed set of types.
-class Variant
+class URHO3D_API Variant
 {
 public:
     /// Construct empty.

+ 1 - 1
Engine/Core/WorkQueue.h

@@ -65,7 +65,7 @@ struct WorkItem
 };
 
 /// Work queue subsystem for multithreading.
-class WorkQueue : public Object
+class URHO3D_API WorkQueue : public Object
 {
     OBJECT(WorkQueue);
     

+ 1 - 1
Engine/Engine/Application.h

@@ -32,7 +32,7 @@ namespace Urho3D
 class Engine;
 
 /// Base class for creating applications which initialize the Urho3D engine and run a main loop until exited.
-class Application : public Object
+class URHO3D_API Application : public Object
 {
     OBJECT(Application);
     

+ 1 - 1
Engine/Engine/Console.h

@@ -36,7 +36,7 @@ class UIElement;
 class XMLFile;
 
 /// %Console window with log history and AngelScript prompt.
-class Console : public Object
+class URHO3D_API Console : public Object
 {
     OBJECT(Console);
 

+ 1 - 1
Engine/Engine/DebugHud.h

@@ -40,7 +40,7 @@ static const unsigned DEBUGHUD_SHOW_PROFILER = 0x4;
 static const unsigned DEBUGHUD_SHOW_ALL = 0x7;
 
 /// Displays rendering stats and profiling information.
-class DebugHud : public Object
+class URHO3D_API DebugHud : public Object
 {
     OBJECT(DebugHud);
 

+ 1 - 1
Engine/Engine/Engine.h

@@ -32,7 +32,7 @@ class Console;
 class DebugHud;
 
 /// Urho3D engine. Creates the other subsystems.
-class Engine : public Object
+class URHO3D_API Engine : public Object
 {
     OBJECT(Engine);
     

+ 1 - 1
Engine/Graphics/AnimatedModel.h

@@ -33,7 +33,7 @@ class Animation;
 class AnimationState;
 
 /// Animated model component.
-class AnimatedModel : public StaticModel
+class URHO3D_API AnimatedModel : public StaticModel
 {
     OBJECT(AnimatedModel);
 

+ 1 - 1
Engine/Graphics/Animation.h

@@ -79,7 +79,7 @@ static const unsigned char CHANNEL_ROTATION = 0x2;
 static const unsigned char CHANNEL_SCALE = 0x4;
 
 /// Skeletal animation resource.
-class Animation : public Resource
+class URHO3D_API Animation : public Resource
 {
     OBJECT(Animation);
     

+ 1 - 1
Engine/Graphics/AnimationController.h

@@ -76,7 +76,7 @@ struct AnimationControl
 };
 
 /// %Component that drives an AnimatedModel's animations.
-class AnimationController : public Component
+class URHO3D_API AnimationController : public Component
 {
     OBJECT(AnimationController);
 

+ 1 - 1
Engine/Graphics/AnimationState.h

@@ -57,7 +57,7 @@ struct AnimationStateTrack
 };
 
 /// %Animation instance.
-class AnimationState : public RefCounted
+class URHO3D_API AnimationState : public RefCounted
 {
 public:
     /// Construct with animated model and animation pointers.

+ 1 - 1
Engine/Graphics/BillboardSet.h

@@ -55,7 +55,7 @@ struct Billboard
 static const unsigned MAX_BILLBOARDS = 65536 / 4;
 
 /// %Billboard component.
-class BillboardSet : public Drawable
+class URHO3D_API BillboardSet : public Drawable
 {
     OBJECT(BillboardSet);
     

+ 1 - 1
Engine/Graphics/Camera.h

@@ -36,7 +36,7 @@ static const unsigned VO_DISABLE_SHADOWS = 0x2;
 static const unsigned VO_DISABLE_OCCLUSION = 0x4;
 
 /// %Camera component.
-class Camera : public Component
+class URHO3D_API Camera : public Component
 {
     OBJECT(Camera);
     

+ 1 - 1
Engine/Graphics/CustomGeometry.h

@@ -45,7 +45,7 @@ struct CustomGeometryVertex
 class VertexBuffer;
 
 /// Custom geometry component.
-class CustomGeometry : public Drawable
+class URHO3D_API CustomGeometry : public Drawable
 {
     OBJECT(CustomGeometry);
     

+ 1 - 1
Engine/Graphics/DebugRenderer.h

@@ -66,7 +66,7 @@ struct DebugLine
 };
 
 /// Debug geometry rendering component. Should be added only to the root scene node.
-class DebugRenderer : public Component
+class URHO3D_API DebugRenderer : public Component
 {
     OBJECT(DebugRenderer);
     

+ 1 - 1
Engine/Graphics/DecalSet.h

@@ -99,7 +99,7 @@ struct Decal
 };
 
 /// %Decal renderer component.
-class DecalSet : public Drawable
+class URHO3D_API DecalSet : public Drawable
 {
     OBJECT(DecalSet);
     

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9GPUObject.h

@@ -30,7 +30,7 @@ namespace Urho3D
 class Graphics;
 
 /// Base class for GPU resources.
-class GPUObject
+class URHO3D_API GPUObject
 {
 public:
     /// Construct with graphics subsystem pointer.

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9Graphics.h

@@ -69,7 +69,7 @@ struct ScratchBuffer
 };
 
 /// %Graphics subsystem. Manages the application window, rendering state and GPU resources.
-class Graphics : public Object
+class URHO3D_API Graphics : public Object
 {
     OBJECT(Graphics);
     

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9GraphicsImpl.h

@@ -31,7 +31,7 @@ namespace Urho3D
 {
 
 /// %Graphics implementation. Holds API-specific objects.
-class GraphicsImpl
+class URHO3D_API GraphicsImpl
 {
     friend class Graphics;
     

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9IndexBuffer.h

@@ -31,7 +31,7 @@ namespace Urho3D
 {
 
 /// Hardware index buffer.
-class IndexBuffer : public Object, public GPUObject
+class URHO3D_API IndexBuffer : public Object, public GPUObject
 {
     OBJECT(IndexBuffer);
     

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9RenderSurface.h

@@ -31,7 +31,7 @@ namespace Urho3D
 class Texture;
 
 /// %Color or depth-stencil surface that can be rendered into.
-class RenderSurface : public RefCounted
+class URHO3D_API RenderSurface : public RefCounted
 {
     friend class Texture2D;
     friend class TextureCube;

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9Shader.h

@@ -32,7 +32,7 @@ namespace Urho3D
 class ShaderVariation;
 
 /// %Shader resource consisting of several shader variations.
-class Shader : public Resource
+class URHO3D_API Shader : public Resource
 {
     OBJECT(Shader);
     

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9ShaderVariation.h

@@ -61,7 +61,7 @@ struct ShaderParameter
 };
 
 /// Vertex or pixel shader on the GPU.
-class ShaderVariation : public RefCounted, public GPUObject
+class URHO3D_API ShaderVariation : public RefCounted, public GPUObject
 {
 public:
     /// Construct.

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9Texture.h

@@ -37,7 +37,7 @@ class XMLElement;
 class XMLFile;
 
 /// Base class for texture resources.
-class Texture : public Resource, public GPUObject
+class URHO3D_API Texture : public Resource, public GPUObject
 {
 public:
     /// Construct.

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9Texture2D.h

@@ -32,7 +32,7 @@ namespace Urho3D
 class Image;
 
 /// 2D texture resource.
-class Texture2D : public Texture
+class URHO3D_API Texture2D : public Texture
 {
     OBJECT(Texture2D);
     

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9TextureCube.h

@@ -33,7 +33,7 @@ class Deserializer;
 class Image;
 
 /// Cube texture resource.
-class TextureCube : public Texture
+class URHO3D_API TextureCube : public Texture
 {
     OBJECT(TextureCube);
     

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9VertexBuffer.h

@@ -30,7 +30,7 @@ namespace Urho3D
 {
 
 /// Hardware vertex buffer.
-class VertexBuffer : public Object, public GPUObject
+class URHO3D_API VertexBuffer : public Object, public GPUObject
 {
     OBJECT(VertexBuffer);
     

+ 1 - 1
Engine/Graphics/Direct3D9/D3D9VertexDeclaration.h

@@ -46,7 +46,7 @@ struct VertexDeclarationElement
 };
 
 /// Vertex declaration.
-class VertexDeclaration : public RefCounted
+class URHO3D_API VertexDeclaration : public RefCounted
 {
 public:
     /// Construct with vertex element mask.

+ 1 - 1
Engine/Graphics/Drawable.h

@@ -100,7 +100,7 @@ struct SourceBatch
 };
 
 /// Base class for visible components.
-class Drawable : public Component
+class URHO3D_API Drawable : public Component
 {
     OBJECT(Drawable);
     

+ 1 - 1
Engine/Graphics/Geometry.h

@@ -35,7 +35,7 @@ class Graphics;
 class VertexBuffer;
 
 /// Defines one or more vertex buffers, an index buffer and a draw range.
-class Geometry : public Object
+class URHO3D_API Geometry : public Object
 {
     OBJECT(Geometry);
     

+ 1 - 1
Engine/Graphics/Light.h

@@ -150,7 +150,7 @@ struct FocusParameters
 };
 
 /// %Light component.
-class Light : public Drawable
+class URHO3D_API Light : public Drawable
 {
     OBJECT(Light);
     

+ 1 - 1
Engine/Graphics/Material.h

@@ -64,7 +64,7 @@ struct TechniqueEntry
 };
 
 /// Describes how to render 3D geometries.
-class Material : public Resource
+class URHO3D_API Material : public Resource
 {
     OBJECT(Material);
     

+ 1 - 1
Engine/Graphics/Model.h

@@ -61,7 +61,7 @@ struct ModelMorph
 };
 
 /// 3D model resource.
-class Model : public Resource
+class URHO3D_API Model : public Resource
 {
     OBJECT(Model);
     

+ 1 - 1
Engine/Graphics/OcclusionBuffer.h

@@ -56,7 +56,7 @@ static const float OCCLUSION_X_SCALE = 65536.0f;
 static const float OCCLUSION_Z_SCALE = 16777216.0f;
 
 /// Software renderer for occlusion.
-class OcclusionBuffer : public Object
+class URHO3D_API OcclusionBuffer : public Object
 {
     OBJECT(OcclusionBuffer);
     

+ 2 - 2
Engine/Graphics/Octree.h

@@ -36,7 +36,7 @@ static const int NUM_OCTANTS = 8;
 static const unsigned ROOT_INDEX = M_MAX_UNSIGNED;
 
 /// %Octree octant
-class Octant
+class URHO3D_API Octant
 {
 public:
     /// Construct.
@@ -151,7 +151,7 @@ protected:
 };
 
 /// %Octree component. Should be added only to the root scene node
-class Octree : public Component, public Octant
+class URHO3D_API Octree : public Component, public Octant
 {
     friend void RaycastDrawablesWork(const WorkItem* item, unsigned threadIndex);
     

+ 6 - 6
Engine/Graphics/OctreeQuery.h

@@ -35,7 +35,7 @@ class Drawable;
 class Node;
 
 /// Base class for octree queries.
-class OctreeQuery
+class URHO3D_API OctreeQuery
 {
 public:
     /// Construct with query parameters.
@@ -65,7 +65,7 @@ public:
 };
 
 /// Point octree query.
-class PointOctreeQuery : public OctreeQuery
+class URHO3D_API PointOctreeQuery : public OctreeQuery
 {
 public:
     /// Construct with point and query parameters.
@@ -86,7 +86,7 @@ public:
 };
 
 /// %Sphere octree query.
-class SphereOctreeQuery : public OctreeQuery
+class URHO3D_API SphereOctreeQuery : public OctreeQuery
 {
 public:
     /// Construct with sphere and query parameters.
@@ -107,7 +107,7 @@ public:
 };
 
 /// Bounding box octree query.
-class BoxOctreeQuery : public OctreeQuery
+class URHO3D_API BoxOctreeQuery : public OctreeQuery
 {
 public:
     /// Construct with bounding box and query parameters.
@@ -128,7 +128,7 @@ public:
 };
 
 /// %Frustum octree query.
-class FrustumOctreeQuery : public OctreeQuery
+class URHO3D_API FrustumOctreeQuery : public OctreeQuery
 {
 public:
     /// Construct with frustum and query parameters.
@@ -171,7 +171,7 @@ struct RayQueryResult
 };
 
 /// Raycast octree query.
-class RayOctreeQuery
+class URHO3D_API RayOctreeQuery
 {
 public:
     /// Construct with ray and query parameters.

+ 1 - 1
Engine/Graphics/OpenGL/OGLGPUObject.h

@@ -30,7 +30,7 @@ namespace Urho3D
 class Graphics;
 
 /// Base class for GPU resources.
-class GPUObject
+class URHO3D_API GPUObject
 {
 public:
     /// Construct with graphics subsystem pointer.

+ 1 - 1
Engine/Graphics/OpenGL/OGLGraphics.h

@@ -74,7 +74,7 @@ struct ScratchBuffer
 };
 
 /// %Graphics subsystem. Manages the application window, rendering state and GPU resources.
-class Graphics : public Object
+class URHO3D_API Graphics : public Object
 {
     OBJECT(Graphics);
     

+ 1 - 1
Engine/Graphics/OpenGL/OGLGraphicsImpl.h

@@ -90,7 +90,7 @@ struct FrameBufferObject
 };
 
 /// %Graphics subsystem implementation. Holds API-specific objects.
-class GraphicsImpl
+class URHO3D_API GraphicsImpl
 {
     friend class Graphics;
 

+ 1 - 1
Engine/Graphics/OpenGL/OGLIndexBuffer.h

@@ -31,7 +31,7 @@ namespace Urho3D
 {
 
 /// Hardware index buffer.
-class IndexBuffer : public Object, public GPUObject
+class URHO3D_API IndexBuffer : public Object, public GPUObject
 {
     OBJECT(IndexBuffer);
     

+ 1 - 1
Engine/Graphics/OpenGL/OGLRenderSurface.h

@@ -33,7 +33,7 @@ class Scene;
 class Texture;
 
 /// %Color or depth-stencil surface that can be rendered into.
-class RenderSurface : public RefCounted
+class URHO3D_API RenderSurface : public RefCounted
 {
     friend class Texture2D;
     friend class TextureCube;

+ 1 - 1
Engine/Graphics/OpenGL/OGLShader.h

@@ -32,7 +32,7 @@ namespace Urho3D
 class ShaderVariation;
 
 /// %Shader resource consisting of several shader variations.
-class Shader : public Resource
+class URHO3D_API Shader : public Resource
 {
     OBJECT(Shader);
     

+ 1 - 1
Engine/Graphics/OpenGL/OGLShaderProgram.h

@@ -43,7 +43,7 @@ struct ShaderParameter
 };
 
 /// Linked shader program on the GPU.
-class ShaderProgram : public RefCounted, public GPUObject
+class URHO3D_API ShaderProgram : public RefCounted, public GPUObject
 {
 public:
     /// Construct.

+ 1 - 1
Engine/Graphics/OpenGL/OGLShaderVariation.h

@@ -34,7 +34,7 @@ class Shader;
 class ShaderProgram;
 
 /// Vertex or pixel shader on the GPU.
-class ShaderVariation : public RefCounted, public GPUObject
+class URHO3D_API ShaderVariation : public RefCounted, public GPUObject
 {
 public:
     /// Construct.

+ 1 - 1
Engine/Graphics/OpenGL/OGLTexture.h

@@ -37,7 +37,7 @@ class XMLElement;
 class XMLFile;
 
 /// Base class for texture resources.
-class Texture : public Resource, public GPUObject
+class URHO3D_API Texture : public Resource, public GPUObject
 {
 public:
     /// Construct.

+ 1 - 1
Engine/Graphics/OpenGL/OGLTexture2D.h

@@ -31,7 +31,7 @@ namespace Urho3D
 {
 
 /// 2D texture resource.
-class Texture2D : public Texture
+class URHO3D_API Texture2D : public Texture
 {
     OBJECT(Texture2D);
     

+ 1 - 1
Engine/Graphics/OpenGL/OGLTextureCube.h

@@ -33,7 +33,7 @@ class Deserializer;
 class Image;
 
 /// Cube texture resource.
-class TextureCube : public Texture
+class URHO3D_API TextureCube : public Texture
 {
     OBJECT(TextureCube);
     

+ 1 - 1
Engine/Graphics/OpenGL/OGLVertexBuffer.h

@@ -30,7 +30,7 @@ namespace Urho3D
 {
 
 /// Hardware vertex buffer.
-class VertexBuffer : public Object, public GPUObject
+class URHO3D_API VertexBuffer : public Object, public GPUObject
 {
     OBJECT(VertexBuffer);
     

+ 1 - 1
Engine/Graphics/ParticleEmitter.h

@@ -117,7 +117,7 @@ class XMLFile;
 class XMLElement;
 
 /// %Particle emitter component.
-class ParticleEmitter : public BillboardSet
+class URHO3D_API ParticleEmitter : public BillboardSet
 {
     OBJECT(ParticleEmitter);
     

+ 2 - 2
Engine/Graphics/RenderPath.h

@@ -174,7 +174,7 @@ struct RenderPathCommand
 };
 
 /// Rendering path definition.
-class RenderPath : public RefCounted
+class URHO3D_API RenderPath : public RefCounted
 {
 public:
     /// Construct.
@@ -228,4 +228,4 @@ public:
     Vector<RenderPathCommand> commands_;
 };
 
-}
+}

+ 1 - 1
Engine/Graphics/Renderer.h

@@ -153,7 +153,7 @@ enum DeferredLightPSVariation
 };
 
 /// High-level rendering subsystem. Manages drawing of 3D views.
-class Renderer : public Object
+class URHO3D_API Renderer : public Object
 {
     OBJECT(Object);
     

+ 1 - 1
Engine/Graphics/ShaderParser.h

@@ -67,7 +67,7 @@ struct ShaderCombination
 };
 
 /// %Shader definition parser. Constructs a list of shader variations from the definition.
-class ShaderParser
+class URHO3D_API ShaderParser
 {
 public:
     /// Parse from an XML element. Return true if successful.

+ 1 - 1
Engine/Graphics/Skeleton.h

@@ -78,7 +78,7 @@ struct Bone
 };
 
 /// Hierarchical collection of bones.
-class Skeleton
+class URHO3D_API Skeleton
 {
 public:
     /// Construct an empty skeleton.

+ 1 - 1
Engine/Graphics/Skybox.h

@@ -28,7 +28,7 @@ namespace Urho3D
 {
 
 /// Static model component with fixed position in relation to the camera.
-class Skybox : public StaticModel
+class URHO3D_API Skybox : public StaticModel
 {
     OBJECT(Skybox);
     

+ 1 - 1
Engine/Graphics/StaticModel.h

@@ -39,7 +39,7 @@ struct StaticModelGeometryData
 };
 
 /// Static model component.
-class StaticModel : public Drawable
+class URHO3D_API StaticModel : public Drawable
 {
     OBJECT(StaticModel);
     

+ 1 - 1
Engine/Graphics/Tangent.h

@@ -26,6 +26,6 @@ namespace Urho3D
 {
 
 /// Generate tangents to indexed geometry.
-void GenerateTangents(void* vertexData, unsigned vertexSize, const void* indexData, unsigned indexSize, unsigned indexStart, unsigned indexCount, unsigned normalOffset, unsigned texCoordOffset, unsigned tangentOffset);
+URHO3D_API void GenerateTangents(void* vertexData, unsigned vertexSize, const void* indexData, unsigned indexSize, unsigned indexStart, unsigned indexCount, unsigned normalOffset, unsigned texCoordOffset, unsigned tangentOffset);
 
 }

+ 2 - 2
Engine/Graphics/Technique.h

@@ -39,7 +39,7 @@ enum PassLightingMode
 };
 
 /// %Material rendering pass, which defines shaders and render state.
-class Pass : public RefCounted
+class URHO3D_API Pass : public RefCounted
 {
 public:
     /// Construct.
@@ -115,7 +115,7 @@ private:
 };
 
 /// %Material technique. Consists of several passes.
-class Technique : public Resource
+class URHO3D_API Technique : public Resource
 {
     OBJECT(Technique);
     

+ 1 - 1
Engine/Graphics/Terrain.h

@@ -33,7 +33,7 @@ class Node;
 class TerrainPatch;
 
 /// Heightmap terrain component.
-class Terrain : public Component
+class URHO3D_API Terrain : public Component
 {
     OBJECT(Terrain);
 

+ 1 - 1
Engine/Graphics/TerrainPatch.h

@@ -32,7 +32,7 @@ class Terrain;
 class VertexBuffer;
 
 /// Individually rendered part of a heightmap terrain.
-class TerrainPatch : public Drawable
+class URHO3D_API TerrainPatch : public Drawable
 {
     OBJECT(TerrainPatch);
     

+ 1 - 1
Engine/Graphics/View.h

@@ -89,7 +89,7 @@ struct ScenePassInfo
 };
 
 /// 3D rendering view. Includes the main view(s) and any auxiliary views, but not shadow cameras.
-class View : public Object
+class URHO3D_API View : public Object
 {
     friend void CheckVisibilityWork(const WorkItem* item, unsigned threadIndex);
     friend void ProcessLightWork(const WorkItem* item, unsigned threadIndex);

+ 1 - 1
Engine/Graphics/Viewport.h

@@ -34,7 +34,7 @@ class Scene;
 class XMLFile;
 
 /// %Viewport definition either for a render surface or the backbuffer.
-class Viewport : public Object
+class URHO3D_API Viewport : public Object
 {
     OBJECT(Viewport);
     

+ 1 - 1
Engine/Graphics/Zone.h

@@ -29,7 +29,7 @@ namespace Urho3D
 {
 
 /// %Component that describes global rendering properties
-class Zone : public Drawable
+class URHO3D_API Zone : public Drawable
 {
     OBJECT(Zone);
     

+ 1 - 1
Engine/IO/Deserializer.h

@@ -30,7 +30,7 @@ namespace Urho3D
 {
 
 /// Abstract stream for reading.
-class Deserializer
+class URHO3D_API Deserializer
 {
 public:
     /// Construct with zero size.

+ 1 - 1
Engine/IO/File.h

@@ -46,7 +46,7 @@ enum FileMode
 class PackageFile;
 
 /// %File opened either through the filesystem or from within a package file.
-class File : public Object, public Deserializer, public Serializer
+class URHO3D_API File : public Object, public Deserializer, public Serializer
 {
     OBJECT(File);
     

+ 13 - 13
Engine/IO/FileSystem.h

@@ -36,7 +36,7 @@ static const unsigned SCAN_DIRS = 0x2;
 static const unsigned SCAN_HIDDEN = 0x4;
 
 /// Subsystem for file and directory operations and access control.
-class FileSystem : public Object
+class URHO3D_API FileSystem : public Object
 {
     OBJECT(FileSystem);
     
@@ -93,28 +93,28 @@ private:
 };
 
 /// Split a full path to path, filename and extension. The extension will be converted to lowercase.
-void SplitPath(const String& fullPath, String& pathName, String& fileName, String& extension);
+URHO3D_API void SplitPath(const String& fullPath, String& pathName, String& fileName, String& extension);
 /// Return the path from a full path.
-String GetPath(const String& fullPath);
+URHO3D_API String GetPath(const String& fullPath);
 /// Return the filename from a full path.
-String GetFileName(const String& fullPath);
+URHO3D_API String GetFileName(const String& fullPath);
 /// Return the extension from a full path, converted to lowercase.
-String GetExtension(const String& fullPath);
+URHO3D_API String GetExtension(const String& fullPath);
 /// Return the filename and extension from a full path. The extension will be converted to lowercase.
-String GetFileNameAndExtension(const String& fullPath);
+URHO3D_API String GetFileNameAndExtension(const String& fullPath);
 /// Replace the extension of a file name with another.
-String ReplaceExtension(const String& fullPath, const String& newExtension);
+URHO3D_API String ReplaceExtension(const String& fullPath, const String& newExtension);
 /// Add a slash at the end of the path if missing and convert to internal format (use slashes.)
-String AddTrailingSlash(const String& pathName);
+URHO3D_API String AddTrailingSlash(const String& pathName);
 /// Remove the slash from the end of a path if exists and convert to internal format (use slashes.)
-String RemoveTrailingSlash(const String& pathName);
+URHO3D_API String RemoveTrailingSlash(const String& pathName);
 /// Return the parent path, or the path itself if not available.
-String GetParentPath(const String& pathName);
+URHO3D_API String GetParentPath(const String& pathName);
 /// Convert a path to internal format (use slashes.)
-String GetInternalPath(const String& pathName);
+URHO3D_API String GetInternalPath(const String& pathName);
 /// Convert a path to the format required by the operating system.
-String GetNativePath(const String& pathName);
+URHO3D_API String GetNativePath(const String& pathName);
 /// Convert a path to the format required by the operating system in wide characters.
-WString GetWideNativePath(const String& pathName);
+URHO3D_API WString GetWideNativePath(const String& pathName);
 
 }

+ 1 - 1
Engine/IO/FileWatcher.h

@@ -33,7 +33,7 @@ namespace Urho3D
 class FileSystem;
 
 /// Watches a directory and its subdirectories for files being modified.
-class FileWatcher : public Object, public Thread
+class URHO3D_API FileWatcher : public Object, public Thread
 {
     OBJECT(FileWatcher);
     

+ 1 - 1
Engine/IO/Log.h

@@ -41,7 +41,7 @@ static const int LOG_NONE = 4;
 class File;
 
 /// Logging subsystem.
-class Log : public Object
+class URHO3D_API Log : public Object
 {
     OBJECT(Log);
     

+ 1 - 1
Engine/IO/MemoryBuffer.h

@@ -29,7 +29,7 @@ namespace Urho3D
 {
 
 /// Memory area that can be read and written to as a stream.
-class MemoryBuffer : public Deserializer, public Serializer
+class URHO3D_API MemoryBuffer : public Deserializer, public Serializer
 {
 public:
     /// Construct with a pointer and size.

+ 1 - 1
Engine/IO/PackageFile.h

@@ -39,7 +39,7 @@ struct PackageEntry
 };
 
 /// Stores files of a directory tree sequentially for convenient access.
-class PackageFile : public Object
+class URHO3D_API PackageFile : public Object
 {
     OBJECT(PackageFile);
     

+ 1 - 1
Engine/IO/Serializer.h

@@ -39,7 +39,7 @@ class Vector3;
 class Vector4;
 
 /// Abstract stream for writing.
-class Serializer
+class URHO3D_API Serializer
 {
 public:
     /// Destruct.

+ 1 - 1
Engine/IO/VectorBuffer.h

@@ -29,7 +29,7 @@ namespace Urho3D
 {
 
 /// Dynamically sized buffer that can be read and written to as a stream.
-class VectorBuffer : public Deserializer, public Serializer
+class URHO3D_API VectorBuffer : public Deserializer, public Serializer
 {
 public:
     /// Construct an empty buffer.

+ 1 - 1
Engine/Input/Input.h

@@ -114,7 +114,7 @@ struct JoystickState
 };
 
 /// %Input subsystem. Converts operating system window messages to input state and events.
-class Input : public Object
+class URHO3D_API Input : public Object
 {
     OBJECT(Input);
     

+ 1 - 1
Engine/Math/AreaAllocator.h

@@ -28,7 +28,7 @@ namespace Urho3D
 {
 
 /// Rectangular area allocator.
-class AreaAllocator
+class URHO3D_API AreaAllocator
 {
 public:
     /// Construct with given width and height.

+ 1 - 1
Engine/Math/BoundingBox.h

@@ -36,7 +36,7 @@ class Matrix3x4;
 class Sphere;
 
 /// Three-dimensional axis-aligned bounding box.
-class BoundingBox
+class URHO3D_API BoundingBox
 {
 public:
     /// Construct with zero size.

+ 1 - 1
Engine/Math/Color.h

@@ -33,7 +33,7 @@ namespace Urho3D
 class String;
 
 /// RGBA color.
-class Color
+class URHO3D_API Color
 {
 public:
     /// Construct with default values (opaque white.)

+ 1 - 1
Engine/Math/Frustum.h

@@ -46,7 +46,7 @@ static const unsigned NUM_FRUSTUM_PLANES = 6;
 static const unsigned NUM_FRUSTUM_VERTICES = 8;
 
 /// Convex constructed of 6 planes.
-class Frustum
+class URHO3D_API Frustum
 {
 public:
     /// Construct undefined.

+ 1 - 1
Engine/Math/Matrix3.h

@@ -28,7 +28,7 @@ namespace Urho3D
 {
 
 /// 3x3 matrix for rotation and scaling.
-class Matrix3
+class URHO3D_API Matrix3
 {
 public:
     /// Construct undefined.

Some files were not shown because too many files changed in this diff