Просмотр исходного кода

WIP: Linux port
- Improvements to the build system so it handles dependencies on Linux
- Various GCC/Clang compiler error/warning fixes

BearishSun 8 лет назад
Родитель
Сommit
266484ff97
100 измененных файлов с 415 добавлено и 454 удалено
  1. 58 54
      Documentation/GitHub/compiling.md
  2. 66 150
      Documentation/GitHub/dependencies.md
  3. 9 12
      Source/BansheeCore/Animation/BsAnimation.cpp
  4. 3 3
      Source/BansheeCore/Animation/BsAnimationCurve.cpp
  5. 1 1
      Source/BansheeCore/Animation/BsAnimationManager.cpp
  6. 3 3
      Source/BansheeCore/Animation/BsSkeleton.cpp
  7. 2 2
      Source/BansheeCore/Audio/BsAudioClip.cpp
  8. 1 1
      Source/BansheeCore/CMakeLists.txt
  9. 1 1
      Source/BansheeCore/Components/BsCRigidbody.h
  10. 4 3
      Source/BansheeCore/CoreThread/BsCommandQueue.h
  11. 1 0
      Source/BansheeCore/CoreThread/BsCoreObjectCore.h
  12. 1 2
      Source/BansheeCore/Image/BsPixelUtil.cpp
  13. 0 5
      Source/BansheeCore/Image/BsTexture.cpp
  14. 1 1
      Source/BansheeCore/Input/BsInput.cpp
  15. 2 10
      Source/BansheeCore/Material/BsGpuParamsSet.cpp
  16. 6 6
      Source/BansheeCore/Material/BsMaterialParam.h
  17. 4 1
      Source/BansheeCore/Material/BsMaterialParams.cpp
  18. 0 0
      Source/BansheeCore/Mesh/BsMesh.h
  19. 1 1
      Source/BansheeCore/Mesh/BsMeshHeap.cpp
  20. 21 21
      Source/BansheeCore/Physics/BsCollider.h
  21. 11 11
      Source/BansheeCore/Physics/BsJoint.h
  22. 3 2
      Source/BansheeCore/Profiling/BsProfilerCPU.cpp
  23. 1 1
      Source/BansheeCore/RTTI/BsCSkyboxRTTI.h
  24. 6 6
      Source/BansheeCore/RenderAPI/BsGpuParam.h
  25. 1 1
      Source/BansheeCore/RenderAPI/BsGpuPipelineParamInfo.cpp
  26. 4 3
      Source/BansheeCore/RenderAPI/BsRenderAPI.h
  27. 1 1
      Source/BansheeCore/RenderAPI/BsRenderAPICapabilities.cpp
  28. 9 9
      Source/BansheeCore/RenderAPI/BsRenderTexture.cpp
  29. 3 1
      Source/BansheeCore/RenderAPI/BsRenderWindow.h
  30. 4 0
      Source/BansheeCore/RenderAPI/BsVertexDeclaration.cpp
  31. 2 0
      Source/BansheeCore/Renderer/BsLight.cpp
  32. 2 2
      Source/BansheeCore/Renderer/BsLightProbeVolume.cpp
  33. 1 1
      Source/BansheeCore/Renderer/BsRenderSettings.cpp
  34. 1 1
      Source/BansheeCore/Scene/BsComponent.cpp
  35. 4 4
      Source/BansheeCore/Scene/BsPrefabDiff.cpp
  36. 4 4
      Source/BansheeCore/Scene/BsPrefabUtility.cpp
  37. 2 2
      Source/BansheeEditor/BsEditorPrerequisites.h
  38. 1 1
      Source/BansheeEditor/EditorWindow/BsDockManager.h
  39. 2 0
      Source/BansheeEditor/EditorWindow/BsEditorWidget.h
  40. 1 1
      Source/BansheeEditor/EditorWindow/BsEditorWidgetContainer.cpp
  41. 1 1
      Source/BansheeEditor/GUI/BsGUIFloatField.cpp
  42. 2 2
      Source/BansheeEditor/GUI/BsGUIIntField.cpp
  43. 0 3
      Source/BansheeEditor/GUI/BsGUIMenuBar.cpp
  44. 3 3
      Source/BansheeEditor/GUI/BsGUISceneTreeView.cpp
  45. 1 1
      Source/BansheeEditor/GUI/BsGUIStatusBar.cpp
  46. 1 1
      Source/BansheeEditor/Handles/BsHandleDrawManager.h
  47. 2 2
      Source/BansheeEditor/Scene/BsGizmoManager.h
  48. 1 1
      Source/BansheeEditor/Scene/BsSceneGrid.h
  49. 1 1
      Source/BansheeEditor/Scene/BsSelectionRenderer.h
  50. 0 3
      Source/BansheeEditor/SceneView/BsGizmoManager.cpp
  51. 0 1
      Source/BansheeEditor/SceneView/BsSelectionRenderer.cpp
  52. 1 1
      Source/BansheeEditor/Testing/BsEditorTestSuite.cpp
  53. 2 2
      Source/BansheeEngine/2D/BsSpriteMaterial.cpp
  54. 1 1
      Source/BansheeEngine/Debug/BsDebugDraw.h
  55. 1 1
      Source/BansheeEngine/GUI/BsGUIDropDownContent.cpp
  56. 1 1
      Source/BansheeEngine/GUI/BsGUILabel.cpp
  57. 0 5
      Source/BansheeEngine/GUI/BsGUIManager.cpp
  58. 1 1
      Source/BansheeEngine/GUI/BsGUIManager.h
  59. 2 2
      Source/BansheeEngine/GUI/BsShortcutKey.h
  60. 5 5
      Source/BansheeEngine/Platform/BsCursor.cpp
  61. 1 1
      Source/BansheeEngine/Renderer/BsRendererMaterial.h
  62. 2 0
      Source/BansheeEngine/Resources/BsBuiltinResources.cpp
  63. 7 6
      Source/BansheeEngine/Utility/BsPaths.h
  64. 0 1
      Source/BansheeFBXImporter/BsFBXImporter.cpp
  65. 6 4
      Source/BansheeFBXImporter/CMakeLists.txt
  66. 5 8
      Source/BansheeFMOD/CMakeLists.txt
  67. 1 1
      Source/BansheeFontImporter/BsFontImporter.cpp
  68. 6 4
      Source/BansheeFontImporter/CMakeLists.txt
  69. 2 2
      Source/BansheeFreeImgImporter/BsFreeImgImporter.cpp
  70. 6 4
      Source/BansheeFreeImgImporter/CMakeLists.txt
  71. 1 1
      Source/BansheeGLRenderAPI/BsGLBuffer.h
  72. 1 1
      Source/BansheeGLRenderAPI/BsGLCommandBuffer.h
  73. 1 1
      Source/BansheeGLRenderAPI/BsGLEventQuery.h
  74. 1 1
      Source/BansheeGLRenderAPI/BsGLGpuBuffer.h
  75. 1 1
      Source/BansheeGLRenderAPI/BsGLGpuParamBlockBuffer.h
  76. 3 3
      Source/BansheeGLRenderAPI/BsGLHardwareBufferManager.cpp
  77. 1 1
      Source/BansheeGLRenderAPI/BsGLIndexBuffer.h
  78. 1 1
      Source/BansheeGLRenderAPI/BsGLOcclusionQuery.h
  79. 1 1
      Source/BansheeGLRenderAPI/BsGLPixelBuffer.h
  80. 1 1
      Source/BansheeGLRenderAPI/BsGLPixelFormat.cpp
  81. 15 13
      Source/BansheeGLRenderAPI/BsGLRenderAPI.cpp
  82. 2 2
      Source/BansheeGLRenderAPI/BsGLRenderAPI.h
  83. 1 1
      Source/BansheeGLRenderAPI/BsGLRenderTexture.cpp
  84. 1 1
      Source/BansheeGLRenderAPI/BsGLSupport.h
  85. 1 1
      Source/BansheeGLRenderAPI/BsGLTextureManager.cpp
  86. 1 1
      Source/BansheeGLRenderAPI/BsGLTextureView.h
  87. 1 1
      Source/BansheeGLRenderAPI/BsGLTimerQuery.h
  88. 20 0
      Source/BansheeGLRenderAPI/BsGLUtil.h
  89. 2 2
      Source/BansheeGLRenderAPI/BsGLVertexArrayObjectManager.cpp
  90. 1 1
      Source/BansheeGLRenderAPI/BsGLVertexBuffer.h
  91. 25 3
      Source/BansheeGLRenderAPI/CMakeLists.txt
  92. 6 4
      Source/BansheeGLRenderAPI/GLSL/BsGLSLGpuProgram.cpp
  93. 1 1
      Source/BansheeGLRenderAPI/GLSL/BsGLSLGpuProgram.h
  94. 3 3
      Source/BansheeGLRenderAPI/GLSL/BsGLSLParamParser.cpp
  95. 2 2
      Source/BansheeGLRenderAPI/GLSL/BsGLSLParamParser.h
  96. 2 2
      Source/BansheeGLRenderAPI/GLSL/BsGLSLProgramFactory.cpp
  97. 2 2
      Source/BansheeGLRenderAPI/GLSL/BsGLSLProgramPipelineManager.cpp
  98. 1 1
      Source/BansheeMono/BsMonoAssembly.cpp
  99. 1 1
      Source/BansheeMono/BsMonoManager.cpp
  100. 5 3
      Source/BansheeMono/CMakeLists.txt

+ 58 - 54
Documentation/GitHub/compiling.md

@@ -1,31 +1,27 @@
 # Compiling
 # Compiling
 
 
 ## Quick start
 ## Quick start
-Use the commands below to get Banshee up and running as quickly as possible. Scroll further below for advanced build options that allow for more customization.
-
-**Windows (Visual Studio 2015)**
-
-Make sure you have installed *git* and *CMake* (version 3.7.2 or newer). Make sure paths to their binaries are in your *PATH* enviroment variable.
-
-Run the following commands and the *.sln* will be placed in the */Build* folder:
-```
-git clone https://github.com/BearishSun/BansheeEngine.git
-cd BansheeEngine
-mkdir Build
-cd Build
-cmake -G "Visual Studio 14 2015 Win64" ../Source
-```
-
->Note: If compilation fails with errors related to DirectX, you need to install relevant DirectX dependencies as described [here](#otherDeps).
-
-**Linux**
-
-*Coming soon*
-
-**OS X**
-
-*Coming soon*
+Use the guide below to get Banshee up and running as quickly as possible. Scroll further below for advanced build options that allow for more customization.
 
 
+- Install git (https://git-scm.com) and CMake 3.9.0 or higher (https://cmake.org)
+  - Ensure they are added to your *PATH* environment variable
+- Run the following commands in the terminal/command line:
+  - `git clone https://github.com/BearishSun/BansheeEngine.git`
+  - `cd BansheeEngine`
+  - `mkdir Build`
+  - `cmake -G "$generator$" ../Source`
+    - Where *$generator$* should be replaced with any of the supported generators. Some common ones:
+	  - `Visual Studio 14 2015 Win64` - Visual Studio 2015 (64-bit build)
+	  - `Visual Studio 15 2017 Win64` - Visual Studio 2017 (64-bit build)
+	  - `Unix Makefiles`
+	  - `Ninja`
+	  - `Xcode`
+	- See all valid generators: [cmake-generators](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html)
+- Build the project using your chosen tool
+  - Build files are in `BansheeEngine\Build` folder
+- Install dependencies
+  - See [here](#otherDeps)
+	 
 ## Customizing the build
 ## Customizing the build
 
 
 By default the process above will fetch the *master* branch. If required switch to a different branch before building:
 By default the process above will fetch the *master* branch. If required switch to a different branch before building:
@@ -46,8 +42,9 @@ You can choose to use a different *CMake* generator than those specified above,
     - (Mac & Linux coming soon)
     - (Mac & Linux coming soon)
   - Supported compilers:
   - Supported compilers:
     - MSVC++ 14.0 (Visual Studio 2015)
     - MSVC++ 14.0 (Visual Studio 2015)
-    - (Clang/GCC coming soon)
- 
+    - GCC 7.0 (or newer)
+    - Clang 4 (or newer)
+
 ### <a name="dependencies"></a>Third party dependencies
 ### <a name="dependencies"></a>Third party dependencies
 Banshee relies on a variety of third party dependencies. A set of pre-compiled dependencies are provided for every supported platform/compiler. These will be fetched automatically by the build process, but you may also download them manually or compile them from source:
 Banshee relies on a variety of third party dependencies. A set of pre-compiled dependencies are provided for every supported platform/compiler. These will be fetched automatically by the build process, but you may also download them manually or compile them from source:
  * [Download dependencies (VS2015)](http://data.banshee3d.com/BansheeDependencies_VS2015_Master.zip)
  * [Download dependencies (VS2015)](http://data.banshee3d.com/BansheeDependencies_VS2015_Master.zip)
@@ -58,33 +55,40 @@ For older versions of pre-compiled dependencies check the git release tag descri
 ## <a name="otherDeps"></a>Other dependencies
 ## <a name="otherDeps"></a>Other dependencies
 The following dependencies will need to be installed manually. Which ones are required depend on the selected *CMake* options and your usage of Banshee (check text of each entry below).
 The following dependencies will need to be installed manually. Which ones are required depend on the selected *CMake* options and your usage of Banshee (check text of each entry below).
 
 
-**DirectX SDK** (Optional if not using DirectX)
- - Only needed if on Windows 7 or earlier and using DirectX 11 render API
- - Set up DXSDK_DIR environment variable pointing to the DirectX instalation
- 
-**Windows SDK** (Optional if not using DirectX)
- - Only needed if on Windows 8 or later and using DirectX 11 render API
+**Windows**
+  - **DirectX SDK** (Required by default on Windows 7 or earlier)
+	- Optional if you have choosen a different RenderAPI in *CMake* options
+    - Set up DXSDK_DIR environment variable pointing to the DirectX instalation
+  - **Windows SDK** (Required by default on Windows 8 or later)
+	- Optional if you have choosen a different RenderAPI in *CMake* options
+  - **DirectX Debug Layer** (Required by default on Windows 10)
+    - Optional if you have choosen a different RenderAPI in *CMake* options
+    - Go to Settings panel (type "Settings" in Start)->System->Apps & features->Manage optional Features->Add a feature->Select "Graphics Tools"
  
  
-**DirectX Debug Layer** (Optional if not using DirectX)
- - Only needed if on Windows 10 and using DirectX 11 render API
- - Go to Settings panel (type "Settings" in Start)->System->Apps & features->Manage optional Features->Add a feature->Select "Graphics Tools"
- 
-**Vulkan SDK** (Optional if not using Vulkan) 
- - Only needed if you selected the Vulkan render API during build configuration
- - https://lunarg.com/vulkan-sdk/
- - If CMake complains it cannot find Vulkan, manually set the Vulkan_INSTALL_DIRS to your installation directory
- 
-**Python 3.5** (Optional)
- - Only needed if you plan on running Python scripts in the /Scripts folder
- - https://www.python.org/downloads/
+**Linux**
+  - **OpenGL** (Required by default)
+    - Optional if you have choosen a different RenderAPI in *CMake* options
+    - Debian/Ubuntu: *apt-get install libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev*
+  - **X11**
+    - Debian/Ubuntu: *apt-get install libx11-dev libxcursor-dev libxrandr-dev*
+  - **LibUUID**
+    - Debian/Ubuntu: *apt-get install uuid-dev*
+  - (Or equivalent packages for your distribution)
 
 
-**FMOD Low Level Programmer API** (Optional)
- - Only needed if you selected the FMOD audio module during build configuration
- - http://www.fmod.org/download/
- - If CMake complains it cannot find FMOD, manually set the FMOD_INSTALL_DIRS to your installation directory 
- - Copy the dynamic libraries from {INSTALLDIR}/api/lowlevel/lib into /bin folder in Banshee source code folder
-  - Use logging libraries for the Debug builds, and non-logging for OptimizedDebug and Release builds
-  
-**Mono 4.2** (Optional)
- - If you wish to compile managed assemblies using a Microsoft compiler (e.g. using Visual Studio) yet still be able to debug the generated assemblies, you must install Mono 4.2. and set up an environment variable MONO_INSTALL_DIR pointing to the Mono installation directory. When this is set up "pdb2mdb" script will trigger on next compile generating the needed debug symbols.
- - http://www.mono-project.com/download/
+**All OS**
+  - **Vulkan SDK** (Optional) 
+    - Only needed if you selected the Vulkan render API during build configuration
+    - https://lunarg.com/vulkan-sdk/
+    - Set up VULKAN_SDK environment variable pointing to your instalation
+  - **Python 3.5** (Optional)
+    - Only needed if you plan on running Python scripts in the /Scripts folder
+    - https://www.python.org/downloads/
+  - **FMOD Low Level Programmer API 1.08.02** (Optional)
+    - Only needed if you selected the FMOD audio module during build configuration
+    - http://www.fmod.org/download/
+    - If CMake complains it cannot find FMOD, manually set the FMOD_INSTALL_DIRS to your installation directory 
+    - Copy the dynamic libraries (.dll) from {INSTALLDIR}/api/lowlevel/lib into /bin folder in Banshee source code folder
+      - Use logging libraries for the Debug builds, and non-logging for OptimizedDebug and Release builds
+  - **Mono 4.2** (Optional)
+    - If you wish to compile managed assemblies using a Microsoft compiler (e.g. using Visual Studio) yet still be able to debug the generated assemblies, you must install Mono 4.2. and set up an environment variable MONO_INSTALL_DIR pointing to the Mono installation directory. When this is set up "pdb2mdb" script will trigger on next compile generating the needed debug symbols.
+    - http://www.mono-project.com/download/

+ 66 - 150
Documentation/GitHub/dependencies.md

@@ -1,25 +1,38 @@
 # Compiling dependencies manually
 # Compiling dependencies manually
-To compile/retrieve dependencies manually follow the guides provided by each individual library. Below you will find a list of all the libraries, links to their download and outputs expected by Banshee.
 
 
-Rename and place the compiled/retrieved outputs into proper folders depending on their type:
-- Static libraries (.lib, .a): 
-  - Place outputs in (BansheeSource)/Dependencies/(LibName)/lib/(Platform)
-- Dynamic libraries (.dll, .so, .dylib)
-  - Place outputs in (BansheeSource)/bin/(Platform)/(Configuration)
+Below you will find a list of dependencies that Banshee relies on, as well as links to their source code and/or binaries. If a dependency isn't provided in binary form you will have to manually compile it (this is the case for the large majority or them). Make sure to compile the exact version of the dependency listed below. Newer versions *might* work, but haven't been tested. 
+
+Once you have the dependency development files (headers and binaries) you will need to make sure they placed in the appropriate folders so Banshee can find them during the build process. 
+
+The dependencies are searched for in these locations:
+- The `/Dependency` folder within Banshee's source. See below for the exact breakdown of how this folder is supposed to look. Usually you want to put all your dependencies here.
+- If dependency cannot be found in the `/Dependency` folder, its default install path is searched for instead. For example `usr/local` on Linux/macOS or default install path if the dependency comes with an installer. 
+
+Note that on Windows most dependencies do not have default install paths and should therefore be placed in the `/Dependency` folder. In order to avoid problems with dependency versions this should be the preferred behaviour on Linux/macOS as well. 
+
+`/Dependency` folder breakdown:
+- Static & shared libraries (.lib, .a, .so): 
+  - Pick one of:
+    - (BansheeSource)/Dependencies/(DepName)/lib
+	- (BansheeSource)/Dependencies/(DepName)/lib/(Platform)
+	- (BansheeSource)/Dependencies/(DepName)/lib/(Platform)/(Configuration)
+	- (BansheeSource)/Dependencies/(DepName)/lib/(Configuration)
+- Dynamic libraries (.dll, .dylib)
+  - Place in (BansheeSource)/bin/(Platform)/(Configuration)
 - Includes
 - Includes
-  - Place outputs in (BansheeSource)/Dependencies/(LibName)/include
+  - Place in (BansheeSource)/Dependencies/(DepName)/include
 - Tools (executables)
 - Tools (executables)
-  - Place outputs in (BansheeSource)/Dependencies/tools/(LibName)  
-   
-Each library below lists a set of outputs required by Banshee. After you compile/retrieve the library rename the outputs to what Banshee expects and place them relative to the above paths, depending on their type. Depending on which platform you're compiling for you will need to compile 32-bit or 64-bit versions of the libraries (or both).
-   
+  - Place in (BansheeSource)/Dependencies/tools/(DepName)  
+  
 Legend:
 Legend:
-- (BansheeSource) - root directory of Banshee's source code
-- (LibName) - name of the library (title of each library shown below)
+- (BansheeSource) - root directory of Banshee
+- (DepName) - name of the dependency (title of each dependency shown below)
 - (Platform) - x86 for 32-bit builds, x64 for 64-bit builds
 - (Platform) - x86 for 32-bit builds, x64 for 64-bit builds
-- (Configuration) - Debug, OptimizedDebug or Release
+- (Configuration) - Debug, OptimizedDebug or Release  
+  
+Each library is accompanied by a Find***.cmake CMake module that is responsible for finding the library. These modules are located under `Source/CMake/Modules`. They follow the rules described above, but if you are unsure where library outputs should be placed you can look at the source code for those modules to find their search paths.
    
    
-If the library structure still isn't clear, download one of the pre-compiled dependency packages to see an example.   
+Additionally, if the dependency structure still isn't clear, download one of the pre-compiled dependency packages to see an example.  
       
       
 ## Library list 
 ## Library list 
 	  
 	  
@@ -27,205 +40,108 @@ If the library structure still isn't clear, download one of the pre-compiled dep
 - Google's Snappy compressor/decompressor
 - Google's Snappy compressor/decompressor
 - https://github.com/BearishSun/snappy
 - https://github.com/BearishSun/snappy
 - Required by BansheeUtility
 - Required by BansheeUtility
-- Outputs:
-  - Windows (Static library):
-    - /Debug/Snappy.lib (Debug configuration)
-    - /Release/Snappy.lib (Release configuration)
+- Compile as a static library
 	  
 	  
 **nvtt**
 **nvtt**
-- NVIDIA Texture Tools 2.1.0 (commit e85d851cd9502d77c6e20769d8c21baa3a94ac18)
-- https://github.com/castano/nvidia-texture-tools
-- Compilation notes:
-  - Compile using the "no-cuda" configurations
+- NVIDIA Texture Tools 2.1.0
+- https://github.com/BearishSun/nvidia-texture-tools
 - Required by BansheeCore
 - Required by BansheeCore
-- Outputs: 
-  - Windows (Dynamic library):
-    - /Debug/nvtt.lib (Debug configuration)
-    - /Release/nvtt.lib (Release configuration)
-    - nvtt.dll (All configurations)
+- Compile as a static library
  
  
 **FBXSDK**
 **FBXSDK**
 - FBX SDK 2016.1
 - FBX SDK 2016.1
 - http://usa.autodesk.com/fbx
 - http://usa.autodesk.com/fbx
-- Compilation notes:
-  - No compilation required, libraries are provided pre-compiled
 - Required by BansheeFBXImporter
 - Required by BansheeFBXImporter
-- Outputs:  
-  - Windows (Static library):
-    - /Debug/libfbxsdk-md.lib (Debug configuration)
-    - /Release/libfbxsdk-md.lib (Release configuration)
+- No compilation required, libraries are provided pre-compiled
  
  
 **freetype**
 **freetype**
 - Freetype 2.3.5
 - Freetype 2.3.5
-- http://www.freetype.org
-- Compilation notes:
-  - Make sure to define FREETYPE2_STATIC as it might not be defined by default
+- https://github.com/BearishSun/freetype (branch *banshee*)
 - Required by BansheeFontImporter
 - Required by BansheeFontImporter
-- Outputs:
-  - Windows (Static library):
-    - /Debug/freetype.lib (Debug configuration)
-    - /Release/freetype.lib (Release configuration)
+- Compile as a static library
    
    
 **freeimg**
 **freeimg**
 - FreeImage 3.13.1
 - FreeImage 3.13.1
 - http://freeimage.sourceforge.net
 - http://freeimage.sourceforge.net
 - Required by BansheeFreeImgImporter
 - Required by BansheeFreeImgImporter
-- Outputs:
-  - Windows (Static library):
-    - /Debug/FreeImage.lib (Debug configuration)
-    - /Release/FreeImage.lib (Release configuration)
+- Compile as a static library
    
    
 **OIS**
 **OIS**
-- BansheeOIS - Slightly modified version of OIS 1.3
-- Source code included in the dependencies package
+- OIS 1.3
+- https://github.com/BearishSun/OIS
 - Required by BansheeOISInput
 - Required by BansheeOISInput
-- Outputs:
-  - Windows (Dynamic library):
-    - /Debug/BansheeOIS.lib (Debug configuration)
-    - /Release/BansheeOIS.lib (Release configuration)
-    - BansheeOIS.dll (All configurations)
+- Compile as a dynamic library
    
    
 **mono**
 **mono**
 - Mono 4.4.0
 - Mono 4.4.0
 - http://www.mono-project.com/
 - http://www.mono-project.com/
-- Compilation notes:
-  - See Mono-4.4.0-IntegrationGuide.txt
 - Required by BansheeMono
 - Required by BansheeMono
-- Outputs:
-  - Windows (Dynamic library):
-    - /Debug/mono-2.0.lib (Debug configuration)
-    - /Release/mono-2.0.lib (Release configuration)
-    - mono-2.0.dll (All configurations)
+- Compile as a dynamic library
+ - See Mono-4.4.0-IntegrationGuide.txt for additional notes
    
    
 **PhysX**
 **PhysX**
 - PhysX 3.3
 - PhysX 3.3
 - https://github.com/NVIDIAGameWorks/PhysX-3.3
 - https://github.com/NVIDIAGameWorks/PhysX-3.3
 - Required by BansheePhysX
 - Required by BansheePhysX
-- Outputs:
-  - Windows (Dynamic library):
-    - x64
-      - /Debug/PhysX3CharacterKinematicCHECKED_x64.lib (Compile using "checked" configuration)
-      - /Debug/PhysX3CHECKED_x64.lib (Compile using "checked" configuration)
-      - /Debug/PhysX3CommonCHECKED_x64.lib (Compile using "checked" configuration)
-      - /Debug/PhysX3CookingCHECKED_x64.lib (Compile using "checked" configuration)
-      - /Debug/PhysX3ExtensionsCHECKED.lib (Compile using "checked" configuration)
-      - /Release/PhysX3CharacterKinematic_x64.lib (Compile using "release" configuration)
-      - /Release/PhysX3_x64.lib (Compile using "release" configuration)
-      - /Release/PhysX3Common_x64.lib (Compile using "release" configuration)
-      - /Release/PhysX3Cooking_x64.lib (Compile using "release" configuration)
-      - /Release/PhysX3Extensions.lib (Compile using "release" configuration)
-      - PhysX3CharacterKinematicCHECKED_x64.dll (For Debug configuration)
-      - PhysX3CHECKED_x64.dll (For Debug configuration)
-      - PhysX3CommonCHECKED_x64.dll (For Debug configuration)
-      - PhysX3CookingCHECKED_x64.dll (For Debug configuration)
-      - PhysX3CharacterKinematic_x64.dll (For Release/OptimizedDebug configuration)
-      - PhysX3_x64.dll (For Release/OptimizedDebug configuration)
-      - PhysX3Common_x64.dll (For Release/OptimizedDebug configuration)
-      - PhysX3Cooking_x64.dll (For Release/OptimizedDebug configuration)
-    - x86
-      - /Debug/PhysX3CharacterKinematicCHECKED_x86.lib (Compile using "checked" configuration)
-      - /Debug/PhysX3CHECKED_x86.lib (Compile using "checked" configuration)
-      - /Debug/PhysX3CommonCHECKED_x86.lib (Compile using "checked" configuration)
-      - /Debug/PhysX3CookingCHECKED_x86.lib (Compile using "checked" configuration)
-      - /Debug/PhysX3ExtensionsCHECKED.lib (Compile using "checked" configuration)
-      - /Release/PhysX3CharacterKinematic_x86.lib (Compile using "release" configuration)
-      - /Release/PhysX3_x86.lib (Compile using "release" configuration)
-      - /Release/PhysX3Common_x86.lib (Compile using "release" configuration)
-      - /Release/PhysX3Cooking_x86.lib (Compile using "release" configuration)
-      - /Release/PhysX3Extensions.lib (Compile using "release" configuration)
-      - PhysX3CharacterKinematicCHECKED_x86.dll (For Debug configuration)
-      - PhysX3CHECKED_x86.dll (For Debug configuration)
-      - PhysX3CommonCHECKED_x86.dll (For Debug configuration)
-      - PhysX3CookingCHECKED_x86.dll (For Debug configuration)
-      - PhysX3CharacterKinematic_x86.dll (For Release/OptimizedDebug configuration)
-      - PhysX3_x86.dll (For Release/OptimizedDebug configuration)
-      - PhysX3Common_x86.dll (For Release/OptimizedDebug configuration)
-      - PhysX3Cooking_x86.dll (For Release/OptimizedDebug configuration)	
+- Compile as a dynamic library
 	
 	
 **OpenAL**
 **OpenAL**
 - OpenAL Soft 1.17.2
 - OpenAL Soft 1.17.2
 - https://github.com/kcat/openal-soft
 - https://github.com/kcat/openal-soft
 - Required by BansheeOpenAudio
 - Required by BansheeOpenAudio
-- Outputs:
-  - Windows (Dynamic library):
-    - OpenAL32.lib (Compile using "release" configuration)
-    - OpenAL32.dll (All configurations)
+- Compile as a dynamic library
    
    
 **libogg**
 **libogg**
 - libogg v1.3.2
 - libogg v1.3.2
 - https://xiph.org/downloads/
 - https://xiph.org/downloads/
-- Compilation notes:
+- Required by BansheeOpenAudio and BansheeFMOD
+- Compile as a static library
   - Switch runtime library to dynamic to avoid linker warnings when adding it to Banshee
   - Switch runtime library to dynamic to avoid linker warnings when adding it to Banshee
   - This is also required when compiling libvorbis and libflac (below). See readme files included with those libraries.
   - This is also required when compiling libvorbis and libflac (below). See readme files included with those libraries.
-- Required by BansheeOpenAudio and BansheeFMOD
-- Outputs:
-  - Windows (Static library):
-    - Debug/libogg.lib (Debug configuration)
-    - Release/libogg.lib (Release configuration)
-   
+  
 **libvorbis**
 **libvorbis**
-- libvorbis commit:5bbe49dc947ea9f1532273644348c53054ca214a
+- libvorbis commit:8a8f8589e19c5016f6548d877a8fda231fce4f93
 - https://git.xiph.org/?p=vorbis.git
 - https://git.xiph.org/?p=vorbis.git
-- Compilation notes:
-  - Requires libogg, as described in its readme file.
 - Required by BansheeOpenAudio and BansheeFMOD
 - Required by BansheeOpenAudio and BansheeFMOD
-- Outputs:
-  - Windows (Dynamic library):
-    - libvorbis.lib (Compile using "release" configuration)
-    - libvorbisfile.lib (Compile using "release" configuration)
-    - libvorbis.dll (All configurations)
-    - libvorbisfile.dll (All configurations)
+- Compile as a dynamic library
+  - Requires libogg, as described in its readme file.
    
    
 **libFLAC**
 **libFLAC**
-- libflac commit: 94a61241b02064c7d9fe508f72a742f2a90b8492
+- libflac commit: f7cd466c24fb5d1966943f3ea36a1f4a37858597
 - https://git.xiph.org/?p=flac.git
 - https://git.xiph.org/?p=flac.git
-- Compilation notes:
-  - Requires libogg, as described in its readme file.
 - Required by BansheeOpenAudio
 - Required by BansheeOpenAudio
-- Outputs:
-  - Windows (Dynamic library):
-    - libFLAC.lib (Compile using "release" configuration)
-    - libFLAC_dynamic.dll (All configurations)
+- Compile as a dynamic library
+  - Requires libogg, as described in its readme file.
    
    
 **glslang**
 **glslang**
 - glslang commit: 19bdf90eba71390f04bb85226337517df65d73e2
 - glslang commit: 19bdf90eba71390f04bb85226337517df65d73e2
 - https://github.com/KhronosGroup/glslang
 - https://github.com/KhronosGroup/glslang
 - Required by BansheeVulkanRenderAPI
 - Required by BansheeVulkanRenderAPI
-- Outputs:
-  - Windows (Static library):
-    - glslang.lib (Compile using "release" configuration)
-    - glslangd.lib (Compile using "debug" configuration)
-    - HLSL.lib (Compile using "release" configuration)
-    - HLSLd.lib (Compile using "debug" configuration)
-    - OGLCompiler.lib (Compile using "release" configuration)
-    - OGLCompilerd.lib (Compile using "debug" configuration)
-    - OSDependent.lib (Compile using "release" configuration)
-    - OSDependentd.lib (Compile using "debug" configuration)
+- Compile as a static library
    
    
 **XShaderCompiler**
 **XShaderCompiler**
-- Distributed with Banshee source in Source/External/XShaderCompiler
+- https://github.com/BearishSun/XShaderCompiler (branch *banshee*)
 - Required by BansheeSL
 - Required by BansheeSL
+- Compile as a static library
    
    
 **bison**
 **bison**
-- Bison 2.7
-- http://sourceforge.net/projects/winflexbison/files/
+- Bison 3.0.4
+- **Windows**
+  - http://sourceforge.net/projects/winflexbison/files/
+- **Linux/Mac**
+  - http://ftp.gnu.org/gnu/bison/
 - Required by BansheeSL
 - Required by BansheeSL
-- Outputs:
-  - Windows (tool):
-    - bison/bison.exe (Including all other installation files)
    
    
 **flex**
 **flex**
-- Flex 2.5.37
-- http://sourceforge.net/projects/winflexbison/files/
+- Flex 2.6.1
+- **Windows**
+  - http://sourceforge.net/projects/winflexbison/files/
+- **Linux/Mac**
+  - https://github.com/westes/flex/releases
 - Required by BansheeSL
 - Required by BansheeSL
-- Outputs:
-  - Windows (tool):
-    - flex/flex.exe (Including all other installation files)
 	
 	
 **BansheeSBGen**
 **BansheeSBGen**
  - Banshee Script Binding Generator 1.0
  - Banshee Script Binding Generator 1.0
  - https://github.com/BearishSun/BansheeSBGen
  - https://github.com/BearishSun/BansheeSBGen
  - Required for generation of C# script binding files. Not required if not using the scripting sub-system.
  - Required for generation of C# script binding files. Not required if not using the scripting sub-system.
- - Outputs:
-   - Windows (tool):
-     - BansheeSBGen/BansheeSBGen_v1.0.0.exe
+ - Executable (tool)

+ 9 - 12
Source/BansheeCore/Animation/BsAnimation.cpp

@@ -10,17 +10,17 @@
 namespace bs
 namespace bs
 {
 {
 	AnimationClipInfo::AnimationClipInfo()
 	AnimationClipInfo::AnimationClipInfo()
-		: fadeDirection(0.0f), fadeTime(0.0f), fadeLength(0.0f), curveVersion(0), layerIdx((UINT32)-1)
-		, stateIdx((UINT32)-1), playbackType(AnimPlaybackType::Normal)
+		: playbackType(AnimPlaybackType::Normal), fadeDirection(0.0f), fadeTime(0.0f), fadeLength(0.0f), curveVersion(0)
+		, layerIdx((UINT32)-1), stateIdx((UINT32)-1)
 	{ }
 	{ }
 
 
 	AnimationClipInfo::AnimationClipInfo(const HAnimationClip& clip)
 	AnimationClipInfo::AnimationClipInfo(const HAnimationClip& clip)
-		: fadeDirection(0.0f), fadeTime(0.0f), fadeLength(0.0f), clip(clip), curveVersion(0), layerIdx((UINT32)-1)
-		, stateIdx((UINT32)-1), playbackType(AnimPlaybackType::Normal)
+		: clip(clip), playbackType(AnimPlaybackType::Normal), fadeDirection(0.0f), fadeTime(0.0f), fadeLength(0.0f)
+		, curveVersion(0), layerIdx((UINT32)-1), stateIdx((UINT32)-1)
 	{ }
 	{ }
 
 
 	Blend1DInfo::Blend1DInfo(UINT32 numClips)
 	Blend1DInfo::Blend1DInfo(UINT32 numClips)
-		: clips(nullptr), numClips(numClips)
+		: numClips(numClips), clips(nullptr)
 	{
 	{
 		if (numClips > 0)
 		if (numClips > 0)
 			clips = bs_newN<BlendClipInfo>(numClips);
 			clips = bs_newN<BlendClipInfo>(numClips);
@@ -34,8 +34,8 @@ namespace bs
 
 
 	AnimationProxy::AnimationProxy(UINT64 id)
 	AnimationProxy::AnimationProxy(UINT64 id)
 		: id(id), layers(nullptr), numLayers(0), numSceneObjects(0), sceneObjectInfos(nullptr)
 		: id(id), layers(nullptr), numLayers(0), numSceneObjects(0), sceneObjectInfos(nullptr)
-		, sceneObjectTransforms(nullptr), morphChannelInfos(nullptr), morphShapeInfos(nullptr), numMorphShapes(0)
-		, numMorphChannels(0), numMorphVertices(0), morphChannelWeightsDirty(false), mCullEnabled(true), numGenericCurves(0)
+		, sceneObjectTransforms(nullptr), morphChannelInfos(nullptr), morphShapeInfos(nullptr), numMorphChannels(0)
+		, numMorphShapes(0), numMorphVertices(0), morphChannelWeightsDirty(false), mCullEnabled(true), numGenericCurves(0)
 		, genericCurveOutputs(nullptr)
 		, genericCurveOutputs(nullptr)
 	{ }
 	{ }
 
 
@@ -1282,13 +1282,10 @@ namespace bs
 			clipInfo.state.time += scaledTimeDelta;
 			clipInfo.state.time += scaledTimeDelta;
 
 
 			HAnimationClip clip = clipInfo.clip;
 			HAnimationClip clip = clipInfo.clip;
-			float clipLength = 0.0f;
 			if (clip.isLoaded())
 			if (clip.isLoaded())
 			{
 			{
 				if (clipInfo.curveVersion != clip->getVersion())
 				if (clipInfo.curveVersion != clip->getVersion())
 					mDirty |= AnimDirtyStateFlag::Layout;
 					mDirty |= AnimDirtyStateFlag::Layout;
-
-				clipLength = clip->getLength();
 			}
 			}
 
 
 			float fadeTime = clipInfo.fadeTime + scaledTimeDelta;
 			float fadeTime = clipInfo.fadeTime + scaledTimeDelta;
@@ -1414,7 +1411,7 @@ namespace bs
 				const SPtr<Skeleton>& skeleton = mAnimProxy->skeleton;
 				const SPtr<Skeleton>& skeleton = mAnimProxy->skeleton;
 
 
 				UINT32 parentBoneIdx = skeleton->getBoneInfo(soInfo.boneIdx).parent;
 				UINT32 parentBoneIdx = skeleton->getBoneInfo(soInfo.boneIdx).parent;
-				if (parentBoneIdx == -1)
+				if (parentBoneIdx == (UINT32)-1)
 				{
 				{
 					so->setPosition(position);
 					so->setPosition(position);
 					so->setRotation(rotation);
 					so->setRotation(rotation);
@@ -1422,7 +1419,7 @@ namespace bs
 				}
 				}
 				else
 				else
 				{
 				{
-					while(parentBoneIdx != -1)
+					while(parentBoneIdx != (UINT32)-1)
 					{
 					{
 						// Update rotation
 						// Update rotation
 						const Quaternion& parentOrientation = mAnimProxy->skeletonPose.rotations[parentBoneIdx];
 						const Quaternion& parentOrientation = mAnimProxy->skeletonPose.rotations[parentBoneIdx];

+ 3 - 3
Source/BansheeCore/Animation/BsAnimationCurve.cpp

@@ -525,7 +525,7 @@ namespace bs
 			mKeyframes[i].value = getDiff(mKeyframes[i].value, refKey.value);
 			mKeyframes[i].value = getDiff(mKeyframes[i].value, refKey.value);
 	}
 	}
 
 
-	template BS_CORE_EXPORT class TAnimationCurve<Vector3>;
-	template BS_CORE_EXPORT class TAnimationCurve<Quaternion>;
-	template BS_CORE_EXPORT class TAnimationCurve<float>;
+	template class TAnimationCurve<Vector3>;
+	template class TAnimationCurve<Quaternion>;
+	template class TAnimationCurve<float>;
 }
 }

+ 1 - 1
Source/BansheeCore/Animation/BsAnimationManager.cpp

@@ -217,7 +217,7 @@ namespace bs
 				if (soInfo.boneIdx != -1)
 				if (soInfo.boneIdx != -1)
 					continue;
 					continue;
 
 
-				if (soInfo.layerIdx == (UINT32)-1 || soInfo.stateIdx == (UINT32)-1)
+				if (soInfo.layerIdx == -1 || soInfo.stateIdx == -1)
 					continue;
 					continue;
 
 
 				const AnimationState& state = anim->layers[soInfo.layerIdx].states[soInfo.stateIdx];
 				const AnimationState& state = anim->layers[soInfo.layerIdx].states[soInfo.stateIdx];

+ 3 - 3
Source/BansheeCore/Animation/BsSkeleton.cpp

@@ -30,7 +30,7 @@ namespace bs
 	}
 	}
 
 
 	LocalSkeletonPose::LocalSkeletonPose(UINT32 numPos, UINT32 numRot, UINT32 numScale)
 	LocalSkeletonPose::LocalSkeletonPose(UINT32 numPos, UINT32 numRot, UINT32 numScale)
-		: numBones(0), hasOverride(nullptr)
+		: hasOverride(nullptr), numBones(0)
 	{
 	{
 		UINT32 bufferSize = sizeof(Vector3) * numPos + sizeof(Quaternion) * numRot + sizeof(Vector3) * numScale;
 		UINT32 bufferSize = sizeof(Vector3) * numPos + sizeof(Quaternion) * numRot + sizeof(Vector3) * numScale;
 		UINT8* buffer = (UINT8*)bs_alloc(bufferSize);
 		UINT8* buffer = (UINT8*)bs_alloc(bufferSize);
@@ -85,11 +85,11 @@ namespace bs
 	}
 	}
 
 
 	Skeleton::Skeleton()
 	Skeleton::Skeleton()
-		:mInvBindPoses(nullptr), mBoneInfo(nullptr), mNumBones(0)
+		: mNumBones(0), mInvBindPoses(nullptr), mBoneInfo(nullptr)
 	{ }
 	{ }
 
 
 	Skeleton::Skeleton(BONE_DESC* bones, UINT32 numBones)
 	Skeleton::Skeleton(BONE_DESC* bones, UINT32 numBones)
-		:mInvBindPoses(bs_newN<Matrix4>(numBones)), mBoneInfo(bs_newN<SkeletonBoneInfo>(numBones)), mNumBones(numBones)
+		: mNumBones(numBones), mInvBindPoses(bs_newN<Matrix4>(numBones)), mBoneInfo(bs_newN<SkeletonBoneInfo>(numBones))
 	{
 	{
 		for(UINT32 i = 0; i < numBones; i++)
 		for(UINT32 i = 0; i < numBones; i++)
 		{
 		{

+ 2 - 2
Source/BansheeCore/Audio/BsAudioClip.cpp

@@ -8,8 +8,8 @@
 namespace bs
 namespace bs
 {
 {
 	AudioClip::AudioClip(const SPtr<DataStream>& samples, UINT32 streamSize, UINT32 numSamples, const AUDIO_CLIP_DESC& desc)
 	AudioClip::AudioClip(const SPtr<DataStream>& samples, UINT32 streamSize, UINT32 numSamples, const AUDIO_CLIP_DESC& desc)
-		: Resource(false), mDesc(desc), mNumSamples(numSamples), mStreamData(samples), mStreamSize(streamSize)
-		, mStreamOffset(0), mLength(0.0f)
+		: Resource(false), mDesc(desc), mNumSamples(numSamples), mStreamSize(streamSize), mStreamOffset(0), mLength(0.0f)
+		, mStreamData(samples)
 	{
 	{
 		if (samples != nullptr)
 		if (samples != nullptr)
 			mStreamOffset = (UINT32)samples->tell();
 			mStreamOffset = (UINT32)samples->tell();

+ 1 - 1
Source/BansheeCore/CMakeLists.txt

@@ -23,7 +23,7 @@ target_compile_definitions(BansheeCore PRIVATE -DBS_CORE_EXPORTS)
 
 
 # Libraries
 # Libraries
 ## External lib: NVTT
 ## External lib: NVTT
-target_link_libraries(BansheeCore PUBLIC ${nvtt_LIBRARIES})	
+target_link_libraries(BansheeCore PRIVATE ${nvtt_LIBRARIES})	
 
 
 ## Local libs
 ## Local libs
 target_link_libraries(BansheeCore PUBLIC BansheeUtility)	
 target_link_libraries(BansheeCore PUBLIC BansheeUtility)	

+ 1 - 1
Source/BansheeCore/Components/BsCRigidbody.h

@@ -215,7 +215,7 @@ namespace bs
 		void _setJoint(const HJoint& joint) { mParentJoint = joint; }
 		void _setJoint(const HJoint& joint) { mParentJoint = joint; }
 
 
 		/** @copydoc Rigidbody::updateMassDistribution */
 		/** @copydoc Rigidbody::updateMassDistribution */
-		inline void _updateMassDistribution();
+		void _updateMassDistribution();
 
 
 		/** @} */
 		/** @} */
 	protected:
 	protected:

+ 4 - 3
Source/BansheeCore/CoreThread/BsCommandQueue.h

@@ -85,12 +85,13 @@ namespace bs
 #else
 #else
 		QueuedCommand(std::function<void(AsyncOp&)> _callback, const SPtr<AsyncOpSyncData>& asyncOpSyncData, 
 		QueuedCommand(std::function<void(AsyncOp&)> _callback, const SPtr<AsyncOpSyncData>& asyncOpSyncData, 
 			bool _notifyWhenComplete = false, UINT32 _callbackId = 0)
 			bool _notifyWhenComplete = false, UINT32 _callbackId = 0)
-			:callbackWithReturnValue(_callback), returnsValue(true), notifyWhenComplete(_notifyWhenComplete), 
-			callbackId(_callbackId), asyncOp(asyncOpSyncData)
+			: callbackWithReturnValue(_callback), asyncOp(asyncOpSyncData), returnsValue(true), callbackId(_callbackId)
+			, notifyWhenComplete(_notifyWhenComplete)
 		{ }
 		{ }
 
 
 		QueuedCommand(std::function<void()> _callback, bool _notifyWhenComplete = false, UINT32 _callbackId = 0)
 		QueuedCommand(std::function<void()> _callback, bool _notifyWhenComplete = false, UINT32 _callbackId = 0)
-			:callback(_callback), returnsValue(false), notifyWhenComplete(_notifyWhenComplete), callbackId(_callbackId), asyncOp(AsyncOpEmpty())
+			: callback(_callback), asyncOp(AsyncOpEmpty()), returnsValue(false), callbackId(_callbackId)
+			, notifyWhenComplete(_notifyWhenComplete)
 		{ }
 		{ }
 #endif
 #endif
 
 

+ 1 - 0
Source/BansheeCore/CoreThread/BsCoreObjectCore.h

@@ -55,6 +55,7 @@ namespace bs
 
 
 	protected:
 	protected:
 		friend class CoreObjectManager;
 		friend class CoreObjectManager;
+		friend class bs::CoreObjectManager;
 		friend class bs::CoreObject;
 		friend class bs::CoreObject;
 
 
 		/**
 		/**

+ 1 - 2
Source/BansheeCore/Image/BsPixelUtil.cpp

@@ -1208,7 +1208,7 @@ namespace bs
 		virtual void beginImage(int size, int width, int height, int depth, int face, int miplevel)
 		virtual void beginImage(int size, int width, int height, int depth, int face, int miplevel)
 		{ 
 		{ 
 			assert(miplevel >= 0 && miplevel < (int)buffers.size());
 			assert(miplevel >= 0 && miplevel < (int)buffers.size());
-			assert(size == buffers[miplevel]->getConsecutiveSize());
+			assert((UINT32)size == buffers[miplevel]->getConsecutiveSize());
 
 
 			activeBuffer = buffers[miplevel];
 			activeBuffer = buffers[miplevel];
 
 
@@ -1834,7 +1834,6 @@ namespace bs
 
 
 	float PixelUtil::unpackDepth(PixelFormat format, void* src)
 	float PixelUtil::unpackDepth(PixelFormat format, void* src)
 	{
 	{
-		const PixelFormatDescription &des = getDescriptionFor(format);
 		if (!isDepth(format))
 		if (!isDepth(format))
 		{
 		{
 			LOGERR("Cannot unpack from " + getFormatName(format) + ": it is not a depth format");
 			LOGERR("Cannot unpack from " + getFormatName(format) + ": it is not a depth format");

+ 0 - 5
Source/BansheeCore/Image/BsTexture.cpp

@@ -52,19 +52,14 @@ namespace bs
 		UINT32 height = getHeight();
 		UINT32 height = getHeight();
 		UINT32 depth = getDepth();
 		UINT32 depth = getDepth();
 
 
-		UINT32 totalSize = PixelUtil::getMemorySize(width, height, depth, getFormat());
-
 		for (UINT32 j = 0; j < mipLevel; j++)
 		for (UINT32 j = 0; j < mipLevel; j++)
 		{
 		{
-			totalSize = PixelUtil::getMemorySize(width, height, depth, getFormat());
-
 			if (width != 1) width /= 2;
 			if (width != 1) width /= 2;
 			if (height != 1) height /= 2;
 			if (height != 1) height /= 2;
 			if (depth != 1) depth /= 2;
 			if (depth != 1) depth /= 2;
 		}
 		}
 
 
 		SPtr<PixelData> dst = bs_shared_ptr_new<PixelData>(width, height, depth, getFormat());
 		SPtr<PixelData> dst = bs_shared_ptr_new<PixelData>(width, height, depth, getFormat());
-
 		dst->allocateInternalBuffer();
 		dst->allocateInternalBuffer();
 
 
 		return dst;
 		return dst;

+ 1 - 1
Source/BansheeCore/Input/BsInput.cpp

@@ -16,7 +16,7 @@ namespace bs
 
 
 	Input::DeviceData::DeviceData()
 	Input::DeviceData::DeviceData()
 	{
 	{
-		for (int i = 0; i < BC_Count; i++)
+		for (UINT32 i = 0; i < BC_Count; i++)
 			keyStates[i] = ButtonState::Off;
 			keyStates[i] = ButtonState::Off;
 	}
 	}
 
 

+ 2 - 10
Source/BansheeCore/Material/BsGpuParamsSet.cpp

@@ -197,7 +197,6 @@ namespace bs
 			const GpuParamDesc& curDesc = **iter;
 			const GpuParamDesc& curDesc = **iter;
 			for (auto blockIter = curDesc.paramBlocks.begin(); blockIter != curDesc.paramBlocks.end(); ++blockIter)
 			for (auto blockIter = curDesc.paramBlocks.begin(); blockIter != curDesc.paramBlocks.end(); ++blockIter)
 			{
 			{
-				bool isBlockValid = true;
 				const GpuParamBlockDesc& curBlock = blockIter->second;
 				const GpuParamBlockDesc& curBlock = blockIter->second;
 
 
 				if (!curBlock.isShareable) // Non-shareable buffers are handled differently, they're allowed same names
 				if (!curBlock.isShareable) // Non-shareable buffers are handled differently, they're allowed same names
@@ -230,18 +229,12 @@ namespace bs
 
 
 					// Cannot find other param, blocks aren't equal
 					// Cannot find other param, blocks aren't equal
 					if (otherParamFind == otherDesc->params.end())
 					if (otherParamFind == otherDesc->params.end())
-					{
-						isBlockValid = false;
 						break;
 						break;
-					}
 
 
 					const GpuParamDataDesc& otherParam = otherParamFind->second;
 					const GpuParamDataDesc& otherParam = otherParamFind->second;
 
 
 					if (!areParamsEqual(myParam, otherParam, false) || curBlock.name != otherBlockName)
 					if (!areParamsEqual(myParam, otherParam, false) || curBlock.name != otherBlockName)
-					{
-						isBlockValid = false;
 						break;
 						break;
-					}
 				}
 				}
 
 
 				// Note: Ignoring mismatched blocks for now, because glslang parser doesn't report dead uniform entries,
 				// Note: Ignoring mismatched blocks for now, because glslang parser doesn't report dead uniform entries,
@@ -578,7 +571,7 @@ namespace bs
 						UINT32 paramIdx = params->getParamIndex(iterFind->second);
 						UINT32 paramIdx = params->getParamIndex(iterFind->second);
 
 
 						// Parameter shouldn't be in the valid parameter list if it cannot be found
 						// Parameter shouldn't be in the valid parameter list if it cannot be found
-						assert(paramIdx != -1);
+						assert(paramIdx != (UINT32)-1);
 
 
 						mDataParamInfos.push_back(DataParamInfo());
 						mDataParamInfos.push_back(DataParamInfo());
 						DataParamInfo& paramInfo = mDataParamInfos.back();
 						DataParamInfo& paramInfo = mDataParamInfos.back();
@@ -845,7 +838,7 @@ namespace bs
 
 
 					const BlockBinding& binding = blockInfo.passData[j].bindings[progType];
 					const BlockBinding& binding = blockInfo.passData[j].bindings[progType];
 
 
-					if (binding.slot != -1)
+					if (binding.slot != (UINT32)-1)
 						paramPtr->setParamBlockBuffer(binding.set, binding.slot, paramBlock);
 						paramPtr->setParamBlockBuffer(binding.set, binding.slot, paramBlock);
 				}
 				}
 			}
 			}
@@ -981,7 +974,6 @@ namespace bs
 
 
 			for(UINT32 j = 0; j < NUM_STAGES; j++)
 			for(UINT32 j = 0; j < NUM_STAGES; j++)
 			{
 			{
-				GpuProgramType progType = (GpuProgramType)j;
 				const StageParamInfo& stageInfo = mPassParamInfos[i].stages[j];
 				const StageParamInfo& stageInfo = mPassParamInfos[i].stages[j];
 
 
 				for(UINT32 k = 0; k < stageInfo.numTextures; k++)
 				for(UINT32 k = 0; k < stageInfo.numTextures; k++)

+ 6 - 6
Source/BansheeCore/Material/BsMaterialParam.h

@@ -52,7 +52,7 @@ namespace bs
 		T get(UINT32 arrayIdx = 0) const;
 		T get(UINT32 arrayIdx = 0) const;
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mMaterial == nullptr;
 			return mMaterial == nullptr;
 		}
 		}
@@ -84,7 +84,7 @@ namespace bs
 		UINT32 getElementSize() const;
 		UINT32 getElementSize() const;
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mMaterial == nullptr;
 			return mMaterial == nullptr;
 		}
 		}
@@ -114,7 +114,7 @@ namespace bs
 		TextureType get() const;
 		TextureType get() const;
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mMaterial == nullptr;
 			return mMaterial == nullptr;
 		}
 		}
@@ -143,7 +143,7 @@ namespace bs
 		TextureType get() const;
 		TextureType get() const;
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mMaterial == nullptr;
 			return mMaterial == nullptr;
 		}
 		}
@@ -172,7 +172,7 @@ namespace bs
 		BufferType get() const;
 		BufferType get() const;
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mMaterial == nullptr;
 			return mMaterial == nullptr;
 		}
 		}
@@ -201,7 +201,7 @@ namespace bs
 		SamplerStateType get() const;
 		SamplerStateType get() const;
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mMaterial == nullptr;
 			return mMaterial == nullptr;
 		}
 		}

+ 4 - 1
Source/BansheeCore/Material/BsMaterialParams.cpp

@@ -215,7 +215,6 @@ namespace bs
 	{
 	{
 		auto& dataParams = shader->getDataParams();
 		auto& dataParams = shader->getDataParams();
 		auto& textureParams = shader->getTextureParams();
 		auto& textureParams = shader->getTextureParams();
-		auto& bufferParams = shader->getBufferParams();
 		auto& samplerParams = shader->getSamplerParams();
 		auto& samplerParams = shader->getSamplerParams();
 
 
 		mStructParams = mAlloc.construct<ParamStructDataType>(mNumStructParams);
 		mStructParams = mAlloc.construct<ParamStructDataType>(mNumStructParams);
@@ -752,6 +751,8 @@ namespace bs
 					coreObjects.push_back(samplerData.value.get());
 					coreObjects.push_back(samplerData.value.get());
 			}
 			}
 			break;
 			break;
+			default:
+				break;
 			}
 			}
 		}
 		}
 	}
 	}
@@ -813,6 +814,8 @@ namespace bs
 				mSamplerStateParams[param.index].value = sampStateCore;
 				mSamplerStateParams[param.index].value = sampStateCore;
 			}
 			}
 				break;
 				break;
+			default:
+				break;
 			}
 			}
 		}
 		}
 	}
 	}

+ 0 - 0
Source/BansheeCore/Mesh/bsmesh.h → Source/BansheeCore/Mesh/BsMesh.h


+ 1 - 1
Source/BansheeCore/Mesh/BsMeshHeap.cpp

@@ -85,7 +85,7 @@ namespace bs
 	MeshHeap::MeshHeap(UINT32 numVertices, UINT32 numIndices,
 	MeshHeap::MeshHeap(UINT32 numVertices, UINT32 numIndices,
 		const SPtr<VertexDataDesc>& vertexDesc, IndexType indexType, GpuDeviceFlags deviceMask)
 		const SPtr<VertexDataDesc>& vertexDesc, IndexType indexType, GpuDeviceFlags deviceMask)
 		: mNumVertices(numVertices), mNumIndices(numIndices), mCPUIndexData(nullptr), mVertexDesc(vertexDesc)
 		: mNumVertices(numVertices), mNumIndices(numIndices), mCPUIndexData(nullptr), mVertexDesc(vertexDesc)
-		, mIndexType(indexType), mNextQueryId(0), mDeviceMask(deviceMask)
+		, mIndexType(indexType), mDeviceMask(deviceMask), mNextQueryId(0)
 	{
 	{
 		for (UINT32 i = 0; i <= mVertexDesc->getMaxStreamIdx(); i++)
 		for (UINT32 i = 0; i <= mVertexDesc->getMaxStreamIdx(); i++)
 		{
 		{

+ 21 - 21
Source/BansheeCore/Physics/BsCollider.h

@@ -29,67 +29,67 @@ namespace bs
 		virtual ~Collider() { }
 		virtual ~Collider() { }
 
 
 		/** @copydoc FCollider::getPosition */
 		/** @copydoc FCollider::getPosition */
-		inline Vector3 getPosition() const;
+		Vector3 getPosition() const;
 
 
 		/** @copydoc FCollider::getRotation */
 		/** @copydoc FCollider::getRotation */
-		inline Quaternion getRotation() const;
+		Quaternion getRotation() const;
 
 
 		/** @copydoc FCollider::setTransform */
 		/** @copydoc FCollider::setTransform */
-		inline void setTransform(const Vector3& pos, const Quaternion& rot);
+		void setTransform(const Vector3& pos, const Quaternion& rot);
 
 
 		/** Sets the scale of the collider geometry. */
 		/** Sets the scale of the collider geometry. */
 		virtual void setScale(const Vector3& scale);
 		virtual void setScale(const Vector3& scale);
 
 
 		/** Retrieves the scale of the collider geometry. */
 		/** Retrieves the scale of the collider geometry. */
-		inline Vector3 getScale() const;
+		Vector3 getScale() const;
 
 
 		/** @copydoc FCollider::setIsTrigger */
 		/** @copydoc FCollider::setIsTrigger */
-		inline void setIsTrigger(bool value);
+		void setIsTrigger(bool value);
 
 
 		/** @copydoc FCollider::getIsTrigger */
 		/** @copydoc FCollider::getIsTrigger */
-		inline bool getIsTrigger() const;
+		bool getIsTrigger() const;
 
 
 		/** Determines the Rigidbody that controls this collider (if any). */
 		/** Determines the Rigidbody that controls this collider (if any). */
-		inline void setRigidbody(Rigidbody* value);
+		void setRigidbody(Rigidbody* value);
 
 
 		/** @copydoc setRigidbody() */
 		/** @copydoc setRigidbody() */
 		Rigidbody* getRigidbody() const { return mRigidbody; }
 		Rigidbody* getRigidbody() const { return mRigidbody; }
 
 
 		/** @copydoc FCollider::setMass */
 		/** @copydoc FCollider::setMass */
-		inline void setMass(float mass);
+		void setMass(float mass);
 
 
 		/** @copydoc FCollider::getMass */
 		/** @copydoc FCollider::getMass */
-		inline float getMass() const;
+		float getMass() const;
 
 
 		/** @copydoc FCollider::setMaterial */
 		/** @copydoc FCollider::setMaterial */
-		inline void setMaterial(const HPhysicsMaterial& material);
+		void setMaterial(const HPhysicsMaterial& material);
 
 
 		/** @copydoc FCollider::getMaterial */
 		/** @copydoc FCollider::getMaterial */
-		inline HPhysicsMaterial getMaterial() const;
+		HPhysicsMaterial getMaterial() const;
 
 
 		/** @copydoc FCollider::setContactOffset */
 		/** @copydoc FCollider::setContactOffset */
-		inline void setContactOffset(float value);
+		void setContactOffset(float value);
 
 
 		/** @copydoc FCollider::getContactOffset */
 		/** @copydoc FCollider::getContactOffset */
-		inline float getContactOffset();
+		float getContactOffset();
 
 
 		/** @copydoc FCollider::setRestOffset */
 		/** @copydoc FCollider::setRestOffset */
-		inline void setRestOffset(float value);
+		void setRestOffset(float value);
 
 
 		/** @copydoc FCollider::getRestOffset */
 		/** @copydoc FCollider::getRestOffset */
-		inline float getRestOffset();
+		float getRestOffset();
 
 
 		/** @copydoc FCollider::setLayer */
 		/** @copydoc FCollider::setLayer */
-		inline void setLayer(UINT64 layer);
+		void setLayer(UINT64 layer);
 
 
 		/** @copydoc FCollider::getLayer */
 		/** @copydoc FCollider::getLayer */
-		inline UINT64 getLayer() const;
+		UINT64 getLayer() const;
 
 
 		/** @copydoc FCollider::setCollisionReportMode */
 		/** @copydoc FCollider::setCollisionReportMode */
-		inline void setCollisionReportMode(CollisionReportMode mode);
+		void setCollisionReportMode(CollisionReportMode mode);
 
 
 		/** @copydoc FCollider::getCollisionReportMode */
 		/** @copydoc FCollider::getCollisionReportMode */
-		inline CollisionReportMode getCollisionReportMode() const;
+		CollisionReportMode getCollisionReportMode() const;
 
 
 		/** 
 		/** 
 		 * Checks does the ray hit this collider. 
 		 * Checks does the ray hit this collider. 
@@ -99,7 +99,7 @@ namespace bs
 		 * @param[in]	maxDist	Maximum distance from the ray origin to search for hits.
 		 * @param[in]	maxDist	Maximum distance from the ray origin to search for hits.
 		 * @return				True if the ray has hit the collider.
 		 * @return				True if the ray has hit the collider.
 		 */
 		 */
-		inline bool rayCast(const Ray& ray, PhysicsQueryHit& hit, float maxDist = FLT_MAX) const;
+		bool rayCast(const Ray& ray, PhysicsQueryHit& hit, float maxDist = FLT_MAX) const;
 
 
 		/** 
 		/** 
 		 * Checks does the ray hit this collider. 
 		 * Checks does the ray hit this collider. 
@@ -110,7 +110,7 @@ namespace bs
 		 * @param[in]	maxDist	Maximum distance from the ray origin to search for hits.
 		 * @param[in]	maxDist	Maximum distance from the ray origin to search for hits.
 		 * @return				True if the ray has hit the collider.
 		 * @return				True if the ray has hit the collider.
 		 */
 		 */
-		inline bool rayCast(const Vector3& origin, const Vector3& unitDir, PhysicsQueryHit& hit,
+		bool rayCast(const Vector3& origin, const Vector3& unitDir, PhysicsQueryHit& hit,
 			float maxDist = FLT_MAX) const;
 			float maxDist = FLT_MAX) const;
 
 
 		/** 
 		/** 

+ 11 - 11
Source/BansheeCore/Physics/BsJoint.h

@@ -27,37 +27,37 @@ namespace bs
 		virtual ~Joint() { }
 		virtual ~Joint() { }
 
 
 		/** @copydoc FJoint::getBody */
 		/** @copydoc FJoint::getBody */
-		inline Rigidbody* getBody(JointBody body) const;
+		Rigidbody* getBody(JointBody body) const;
 
 
 		/** @copydoc FJoint::setBody */
 		/** @copydoc FJoint::setBody */
-		inline void setBody(JointBody body, Rigidbody* value);
+		void setBody(JointBody body, Rigidbody* value);
 
 
 		/** @copydoc FJoint::getPosition */
 		/** @copydoc FJoint::getPosition */
-		inline Vector3 getPosition(JointBody body) const;
+		Vector3 getPosition(JointBody body) const;
 
 
 		/** @copydoc FJoint::getRotation */
 		/** @copydoc FJoint::getRotation */
-		inline Quaternion getRotation(JointBody body) const;
+		Quaternion getRotation(JointBody body) const;
 
 
 		/** @copydoc FJoint::setTransform */
 		/** @copydoc FJoint::setTransform */
-		inline void setTransform(JointBody body, const Vector3& position, const Quaternion& rotation);
+		void setTransform(JointBody body, const Vector3& position, const Quaternion& rotation);
 
 
 		/** @copydoc FJoint::getBreakForce */
 		/** @copydoc FJoint::getBreakForce */
-		inline float getBreakForce() const;
+		float getBreakForce() const;
 
 
 		/** @copydoc FJoint::setBreakForce */
 		/** @copydoc FJoint::setBreakForce */
-		inline void setBreakForce(float force);
+		void setBreakForce(float force);
 
 
 		/** @copydoc FJoint::getBreakTorque */
 		/** @copydoc FJoint::getBreakTorque */
-		inline float getBreakTorque() const;
+		float getBreakTorque() const;
 
 
 		/** @copydoc FJoint::setBreakTorque */
 		/** @copydoc FJoint::setBreakTorque */
-		inline void setBreakTorque(float torque);
+		void setBreakTorque(float torque);
 
 
 		/** @copydoc FJoint::getEnableCollision */
 		/** @copydoc FJoint::getEnableCollision */
-		inline bool getEnableCollision() const;
+		bool getEnableCollision() const;
 
 
 		/** @copydoc FJoint::setEnableCollision */
 		/** @copydoc FJoint::setEnableCollision */
-		inline void setEnableCollision(bool value);
+		void setEnableCollision(bool value);
 
 
 		/** Triggered when the joint's break force or torque is exceeded. */
 		/** Triggered when the joint's break force or torque is exceeded. */
 		Event<void()> onJointBreak;
 		Event<void()> onJointBreak;

+ 3 - 2
Source/BansheeCore/Profiling/BsProfilerCPU.cpp

@@ -44,7 +44,7 @@ namespace bs
 
 
 	inline double ProfilerCPU::Timer::getCurrentTime() const
 	inline double ProfilerCPU::Timer::getCurrentTime() const
 	{
 	{
-		steady_clock::time_point timeNow = mHRClock.now();
+		high_resolution_clock::time_point timeNow = mHRClock.now();
 		nanoseconds timeNowNs = timeNow.time_since_epoch();
 		nanoseconds timeNowNs = timeNow.time_since_epoch();
 
 
 		return timeNowNs.count() * 0.000001;
 		return timeNowNs.count() * 0.000001;
@@ -180,7 +180,8 @@ namespace bs
 
 
 		activeBlock = ActiveBlock(ActiveSamplingType::Basic, rootBlock);
 		activeBlock = ActiveBlock(ActiveSamplingType::Basic, rootBlock);
 		if (activeBlocks == nullptr)
 		if (activeBlocks == nullptr)
-			activeBlocks = frameAlloc.alloc<Stack<ActiveBlock, StdFrameAlloc<ActiveBlock>>>(&frameAlloc);
+			activeBlocks = frameAlloc.alloc<Stack<ActiveBlock, StdFrameAlloc<ActiveBlock>>>
+					(StdFrameAlloc<ActiveBlock>(&frameAlloc));
 
 
 		activeBlocks->push(activeBlock);
 		activeBlocks->push(activeBlock);
 		
 		

+ 1 - 1
Source/BansheeCore/RTTI/BsCSkyboxRTTI.h

@@ -5,7 +5,7 @@
 #include "BsCorePrerequisites.h"
 #include "BsCorePrerequisites.h"
 #include "Reflection/BsRTTIType.h"
 #include "Reflection/BsRTTIType.h"
 #include "Components/BsCSkybox.h"
 #include "Components/BsCSkybox.h"
-#include "Rtti/BsGameObjectRTTI.h"
+#include "RTTI/BsGameObjectRTTI.h"
 
 
 namespace bs
 namespace bs
 {
 {

+ 6 - 6
Source/BansheeCore/RenderAPI/BsGpuParam.h

@@ -122,7 +122,7 @@ namespace bs
 		const GpuParamDataDesc& getDesc() const { return *mParamDesc; }
 		const GpuParamDataDesc& getDesc() const { return *mParamDesc; }
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mParamDesc == nullptr;
 			return mParamDesc == nullptr;
 		}
 		}
@@ -156,7 +156,7 @@ namespace bs
 		const GpuParamDataDesc& getDesc() const { return *mParamDesc; }
 		const GpuParamDataDesc& getDesc() const { return *mParamDesc; }
 
 
 		/**	Checks if param is initialized. */
 		/**	Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mParamDesc == nullptr;
 			return mParamDesc == nullptr;
 		}
 		}
@@ -191,7 +191,7 @@ namespace bs
 		const GpuParamObjectDesc& getDesc() const { return *mParamDesc; }
 		const GpuParamObjectDesc& getDesc() const { return *mParamDesc; }
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mParamDesc == nullptr;
 			return mParamDesc == nullptr;
 		}
 		}
@@ -226,7 +226,7 @@ namespace bs
 		const GpuParamObjectDesc& getDesc() const { return *mParamDesc; }
 		const GpuParamObjectDesc& getDesc() const { return *mParamDesc; }
 
 
 		/**	Checks if param is initialized. */
 		/**	Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mParamDesc == nullptr;
 			return mParamDesc == nullptr;
 		}
 		}
@@ -261,7 +261,7 @@ namespace bs
 		const GpuParamObjectDesc& getDesc() const { return *mParamDesc; }
 		const GpuParamObjectDesc& getDesc() const { return *mParamDesc; }
 
 
 		/** Checks if param is initialized. */
 		/** Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mParamDesc == nullptr;
 			return mParamDesc == nullptr;
 		}
 		}
@@ -296,7 +296,7 @@ namespace bs
 		const GpuParamObjectDesc& getDesc() const { return *mParamDesc; }
 		const GpuParamObjectDesc& getDesc() const { return *mParamDesc; }
 
 
 		/**	Checks if param is initialized. */
 		/**	Checks if param is initialized. */
-		bool operator==(const nullptr_t& nullval) const
+		bool operator==(const std::nullptr_t& nullval) const
 		{
 		{
 			return mParamDesc == nullptr;
 			return mParamDesc == nullptr;
 		}
 		}

+ 1 - 1
Source/BansheeCore/RenderAPI/BsGpuPipelineParamInfo.cpp

@@ -166,7 +166,7 @@ namespace bs
 					UINT32 sequentialIdx = mNumElementsPerType[typeIdx];
 					UINT32 sequentialIdx = mNumElementsPerType[typeIdx];
 
 
 					SetInfo& setInfo = mSetInfos[samplerDesc.set];
 					SetInfo& setInfo = mSetInfos[samplerDesc.set];
-					if (setInfo.slotIndices[samplerDesc.slot] == -1) // Slot is sampler only
+					if (setInfo.slotIndices[samplerDesc.slot] == (UINT32)-1) // Slot is sampler only
 					{
 					{
 						setInfo.slotIndices[samplerDesc.slot] = sequentialIdx;
 						setInfo.slotIndices[samplerDesc.slot] = sequentialIdx;
 						setInfo.slotTypes[samplerDesc.slot] = ParamType::SamplerState;
 						setInfo.slotTypes[samplerDesc.slot] = ParamType::SamplerState;

+ 4 - 3
Source/BansheeCore/RenderAPI/BsRenderAPI.h

@@ -16,12 +16,13 @@
 
 
 namespace bs
 namespace bs
 {
 {
+	class RenderAPIInfo;
+	class RenderAPIManager;
+
 	/** @addtogroup RenderAPI
 	/** @addtogroup RenderAPI
 	 *  @{
 	 *  @{
 	 */
 	 */
 
 
-	class RenderAPIInfo;
-
 	/**
 	/**
 	 * Provides access to ct::RenderAPI from the simulation thread. All the commands get queued on the core thread queue 
 	 * Provides access to ct::RenderAPI from the simulation thread. All the commands get queued on the core thread queue 
 	 * for the calling thread.
 	 * for the calling thread.
@@ -612,7 +613,7 @@ namespace bs
 		/* 								INTERNAL DATA					       	*/
 		/* 								INTERNAL DATA					       	*/
 		/************************************************************************/
 		/************************************************************************/
 	protected:
 	protected:
-		friend class RenderAPIManager;
+		friend class bs::RenderAPIManager;
 
 
 		SPtr<RenderTarget> mActiveRenderTarget;
 		SPtr<RenderTarget> mActiveRenderTarget;
 
 

+ 1 - 1
Source/BansheeCore/RenderAPI/BsRenderAPICapabilities.cpp

@@ -9,7 +9,7 @@ namespace bs
 
 
 	RenderAPICapabilities::RenderAPICapabilities()
 	RenderAPICapabilities::RenderAPICapabilities()
 	{
 	{
-		for(int i = 0; i < CAPS_CATEGORY_COUNT; i++)
+		for(UINT32 i = 0; i < CAPS_CATEGORY_COUNT; i++)
 		{
 		{
 			mCapabilities[i] = 0;
 			mCapabilities[i] = 0;
 		}
 		}

+ 9 - 9
Source/BansheeCore/RenderAPI/BsRenderTexture.cpp

@@ -12,7 +12,7 @@ namespace bs
 {
 {
 	RenderTextureProperties::RenderTextureProperties(const RENDER_TEXTURE_DESC& desc, bool requiresFlipping)
 	RenderTextureProperties::RenderTextureProperties(const RENDER_TEXTURE_DESC& desc, bool requiresFlipping)
 	{
 	{
-		UINT32 firstIdx = -1;
+		UINT32 firstIdx = (UINT32)-1;
 		bool requiresHwGamma = false;
 		bool requiresHwGamma = false;
 		for (UINT32 i = 0; i < BS_MAX_MULTIPLE_RENDER_TARGETS; i++)
 		for (UINT32 i = 0; i < BS_MAX_MULTIPLE_RENDER_TARGETS; i++)
 		{
 		{
@@ -21,13 +21,13 @@ namespace bs
 			if (!texture.isLoaded())
 			if (!texture.isLoaded())
 				continue;
 				continue;
 
 
-			if (firstIdx == -1)
+			if (firstIdx == (UINT32)-1)
 				firstIdx = i;
 				firstIdx = i;
 
 
 			requiresHwGamma |= texture->getProperties().isHardwareGammaEnabled();
 			requiresHwGamma |= texture->getProperties().isHardwareGammaEnabled();
 		}
 		}
 
 
-		if (firstIdx == -1)
+		if (firstIdx == (UINT32)-1)
 		{
 		{
 			HTexture texture = desc.depthStencilSurface.texture;
 			HTexture texture = desc.depthStencilSurface.texture;
 			if (texture.isLoaded())
 			if (texture.isLoaded())
@@ -49,7 +49,7 @@ namespace bs
 
 
 	RenderTextureProperties::RenderTextureProperties(const ct::RENDER_TEXTURE_DESC& desc, bool requiresFlipping)
 	RenderTextureProperties::RenderTextureProperties(const ct::RENDER_TEXTURE_DESC& desc, bool requiresFlipping)
 	{
 	{
-		UINT32 firstIdx = -1;
+		UINT32 firstIdx = (UINT32)-1;
 		bool requiresHwGamma = false;
 		bool requiresHwGamma = false;
 		for (UINT32 i = 0; i < BS_MAX_MULTIPLE_RENDER_TARGETS; i++)
 		for (UINT32 i = 0; i < BS_MAX_MULTIPLE_RENDER_TARGETS; i++)
 		{
 		{
@@ -58,13 +58,13 @@ namespace bs
 			if (texture == nullptr)
 			if (texture == nullptr)
 				continue;
 				continue;
 
 
-			if (firstIdx == -1)
+			if (firstIdx == (UINT32)-1)
 				firstIdx = i;
 				firstIdx = i;
 
 
 			requiresHwGamma |= texture->getProperties().isHardwareGammaEnabled();
 			requiresHwGamma |= texture->getProperties().isHardwareGammaEnabled();
 		}
 		}
 
 
-		if(firstIdx == -1)
+		if(firstIdx == (UINT32)-1)
 		{
 		{
 			SPtr<ct::Texture> texture = desc.depthStencilSurface.texture;
 			SPtr<ct::Texture> texture = desc.depthStencilSurface.texture;
 			if(texture != nullptr)
 			if(texture != nullptr)
@@ -234,13 +234,13 @@ namespace bs
 
 
 	void RenderTexture::throwIfBuffersDontMatch() const
 	void RenderTexture::throwIfBuffersDontMatch() const
 	{
 	{
-		UINT32 firstSurfaceIdx = -1;
+		UINT32 firstSurfaceIdx = (UINT32)-1;
 		for (UINT32 i = 0; i < BS_MAX_MULTIPLE_RENDER_TARGETS; i++)
 		for (UINT32 i = 0; i < BS_MAX_MULTIPLE_RENDER_TARGETS; i++)
 		{
 		{
 			if (mColorSurfaces[i] == nullptr)
 			if (mColorSurfaces[i] == nullptr)
 				continue;
 				continue;
 
 
-			if (firstSurfaceIdx == -1)
+			if (firstSurfaceIdx == (UINT32)-1)
 			{
 			{
 				firstSurfaceIdx = i;
 				firstSurfaceIdx = i;
 				continue;
 				continue;
@@ -277,7 +277,7 @@ namespace bs
 			}
 			}
 		}
 		}
 
 
-		if (firstSurfaceIdx != -1)
+		if (firstSurfaceIdx != (UINT32)-1)
 		{
 		{
 			const TextureProperties& firstTexProps = mDesc.colorSurfaces[firstSurfaceIdx].texture->getProperties();
 			const TextureProperties& firstTexProps = mDesc.colorSurfaces[firstSurfaceIdx].texture->getProperties();
 			SPtr<TextureView> firstSurfaceView = mColorSurfaces[firstSurfaceIdx];
 			SPtr<TextureView> firstSurfaceView = mColorSurfaces[firstSurfaceIdx];

+ 3 - 1
Source/BansheeCore/RenderAPI/BsRenderWindow.h

@@ -9,6 +9,8 @@
 
 
 namespace bs
 namespace bs
 {
 {
+	class RenderWindowManager;
+
 	/** @addtogroup RenderAPI
 	/** @addtogroup RenderAPI
 	 *  @{
 	 *  @{
 	 */
 	 */
@@ -322,8 +324,8 @@ namespace bs
 
 
 	protected:
 	protected:
 		friend class bs::RenderWindow;
 		friend class bs::RenderWindow;
-		friend class bs::RenderWindowManager;
 		friend class RenderWindowManager;
 		friend class RenderWindowManager;
+		friend class bs::RenderWindowManager;
 
 
 		/**
 		/**
 		 * Returns window properties that are always kept in sync between core and sim threads.
 		 * Returns window properties that are always kept in sync between core and sim threads.

+ 4 - 0
Source/BansheeCore/RenderAPI/BsVertexDeclaration.cpp

@@ -67,6 +67,8 @@ namespace bs
 			return sizeof(INT32) * 3;
 			return sizeof(INT32) * 3;
 		case VET_UBYTE4:
 		case VET_UBYTE4:
 			return sizeof(UINT8) * 4;
 			return sizeof(UINT8) * 4;
+		default:
+			break;
 		}
 		}
 
 
 		return 0;
 		return 0;
@@ -104,6 +106,8 @@ namespace bs
 		case VET_UBYTE4:
 		case VET_UBYTE4:
 		case VET_UBYTE4_NORM:
 		case VET_UBYTE4_NORM:
 			return 4;
 			return 4;
+		default:
+			break;
 		}
 		}
 
 
 		BS_EXCEPT(InvalidParametersException, "Invalid type");
 		BS_EXCEPT(InvalidParametersException, "Invalid type");

+ 2 - 0
Source/BansheeCore/Renderer/BsLight.cpp

@@ -163,6 +163,8 @@ namespace bs
 			mBounds = Sphere(center, radius);
 			mBounds = Sphere(center, radius);
 		}
 		}
 			break;
 			break;
+		default:
+			break;
 		}
 		}
 	}
 	}
 
 

+ 2 - 2
Source/BansheeCore/Renderer/BsLightProbeVolume.cpp

@@ -534,7 +534,7 @@ namespace bs
 				}
 				}
 
 
 				// Found an empty slot
 				// Found an empty slot
-				if (compactIdx == -1)
+				if (compactIdx == (UINT32)-1)
 				{
 				{
 					compactIdx = (UINT32)mProbeInfos.size();
 					compactIdx = (UINT32)mProbeInfos.size();
 
 
@@ -577,7 +577,7 @@ namespace bs
 				// Move the empty info to the back of the array so all non-empty probes are contiguous
 				// Move the empty info to the back of the array so all non-empty probes are contiguous
 				// Search from back to current index, and find first non-empty probe to switch switch
 				// Search from back to current index, and find first non-empty probe to switch switch
 				UINT32 lastSearchIdx = (UINT32)mProbeInfos.size() - 1;
 				UINT32 lastSearchIdx = (UINT32)mProbeInfos.size() - 1;
-				while (lastSearchIdx >= (INT32)compactIdx)
+				while (lastSearchIdx >= (UINT32)compactIdx)
 				{
 				{
 					LightProbeFlags flags = mProbeInfos[lastSearchIdx].flags;
 					LightProbeFlags flags = mProbeInfos[lastSearchIdx].flags;
 					if (flags != LightProbeFlags::Empty)
 					if (flags != LightProbeFlags::Empty)

+ 1 - 1
Source/BansheeCore/Renderer/BsRenderSettings.cpp

@@ -95,7 +95,7 @@ namespace bs
 	}
 	}
 
 
 	ScreenSpaceReflectionsSettings::ScreenSpaceReflectionsSettings()
 	ScreenSpaceReflectionsSettings::ScreenSpaceReflectionsSettings()
-		: enabled(true), intensity(1.0f), maxRoughness(0.8f), quality(2)
+		: enabled(true), quality(2), intensity(1.0f), maxRoughness(0.8f)
 	{ }
 	{ }
 
 
 	RTTITypeBase* ScreenSpaceReflectionsSettings::getRTTIStatic()
 	RTTITypeBase* ScreenSpaceReflectionsSettings::getRTTIStatic()

+ 1 - 1
Source/BansheeCore/Scene/BsComponent.cpp

@@ -11,7 +11,7 @@ namespace bs
 	{ }
 	{ }
 
 
 	Component::Component(const HSceneObject& parent)
 	Component::Component(const HSceneObject& parent)
-		:mNotifyFlags(TCF_None), mParent(parent), mSceneManagerId(-1)
+		:mNotifyFlags(TCF_None), mSceneManagerId(-1), mParent(parent)
 	{
 	{
 		setName("Component");
 		setName("Component");
 	}
 	}

+ 4 - 4
Source/BansheeCore/Scene/BsPrefabDiff.cpp

@@ -132,7 +132,7 @@ namespace bs
 		{
 		{
 			for (auto& component : components)
 			for (auto& component : components)
 			{
 			{
-				if (componentDiff->id == component->getLinkId())
+				if (componentDiff->id == (INT32)component->getLinkId())
 				{
 				{
 					IDiff& diffHandler = component->getRTTI()->getDiffHandler();
 					IDiff& diffHandler = component->getRTTI()->getDiffHandler();
 					diffHandler.applyDiff(component.getInternalPtr(), componentDiff->data);
 					diffHandler.applyDiff(component.getInternalPtr(), componentDiff->data);
@@ -257,7 +257,7 @@ namespace bs
 				continue;
 				continue;
 
 
 			bool foundMatching = false;
 			bool foundMatching = false;
-			if (instanceChild->getLinkId() != -1)
+			if (instanceChild->getLinkId() != (UINT32)-1)
 			{
 			{
 				for (UINT32 j = 0; j < prefabChildCount; j++)
 				for (UINT32 j = 0; j < prefabChildCount; j++)
 				{
 				{
@@ -346,7 +346,7 @@ namespace bs
 			HComponent instanceComponent = instanceComponents[i];
 			HComponent instanceComponent = instanceComponents[i];
 
 
 			bool foundMatching = false;
 			bool foundMatching = false;
-			if (instanceComponent->getLinkId() != -1)
+			if (instanceComponent->getLinkId() != (UINT32)-1)
 			{
 			{
 				for (UINT32 j = 0; j < prefabComponentCount; j++)
 				for (UINT32 j = 0; j < prefabComponentCount; j++)
 				{
 				{
@@ -476,7 +476,7 @@ namespace bs
 
 
 				if (iterFind != linkToInstanceId.end())
 				if (iterFind != linkToInstanceId.end())
 				{
 				{
-					if (child->getLinkId() != -1)
+					if (child->getLinkId() != (UINT32)-1)
 					{
 					{
 						UnorderedMap<UINT32, UINT64>& idMap = iterFind->second;
 						UnorderedMap<UINT32, UINT64>& idMap = iterFind->second;
 
 

+ 4 - 4
Source/BansheeCore/Scene/BsPrefabUtility.cpp

@@ -416,7 +416,7 @@ namespace bs
 			StackEntry current = todo.top();
 			StackEntry current = todo.top();
 			todo.pop();
 			todo.pop();
 
 
-			if (current.proxy->linkId == -1)
+			if (current.proxy->linkId == (UINT32)-1)
 				current.so->_setInstanceData(current.proxy->instanceData);
 				current.so->_setInstanceData(current.proxy->instanceData);
 
 
 			Vector<HComponent>& components = current.so->mComponents;
 			Vector<HComponent>& components = current.so->mComponents;
@@ -429,7 +429,7 @@ namespace bs
 					bool foundInstanceData = false;
 					bool foundInstanceData = false;
 					for (; componentProxyIdx < numComponentProxies; componentProxyIdx++)
 					for (; componentProxyIdx < numComponentProxies; componentProxyIdx++)
 					{
 					{
-						if (current.proxy->components[componentProxyIdx].linkId != -1)
+						if (current.proxy->components[componentProxyIdx].linkId != (UINT32)-1)
 							continue;
 							continue;
 
 
 						component->_setInstanceData(current.proxy->components[componentProxyIdx].instanceData);
 						component->_setInstanceData(current.proxy->components[componentProxyIdx].instanceData);
@@ -455,10 +455,10 @@ namespace bs
 					bool foundInstanceData = false;
 					bool foundInstanceData = false;
 					for (; childProxyIdx < numChildProxies; childProxyIdx++)
 					for (; childProxyIdx < numChildProxies; childProxyIdx++)
 					{
 					{
-						if (current.proxy->children[childProxyIdx].linkId != -1)
+						if (current.proxy->children[childProxyIdx].linkId != (UINT32)-1)
 							continue;
 							continue;
 
 
-						assert(current.proxy->children[childProxyIdx].linkId == -1);
+						assert(current.proxy->children[childProxyIdx].linkId == (UINT32)-1);
 						child->_setInstanceData(current.proxy->children[childProxyIdx].instanceData);
 						child->_setInstanceData(current.proxy->children[childProxyIdx].instanceData);
 
 
 						if (child->mPrefabLinkUUID.empty())
 						if (child->mPrefabLinkUUID.empty())

+ 2 - 2
Source/BansheeEditor/BsEditorPrerequisites.h

@@ -188,8 +188,8 @@ namespace bs
 	class DropDownWindow;
 	class DropDownWindow;
 	class ProjectSettings;
 	class ProjectSettings;
 
 
-	static const char* EDITOR_ASSEMBLY = "MBansheeEditor";
-	static const char* SCRIPT_EDITOR_ASSEMBLY = "MScriptEditor";
+	static constexpr const char* EDITOR_ASSEMBLY = "MBansheeEditor";
+	static constexpr const char* SCRIPT_EDITOR_ASSEMBLY = "MScriptEditor";
 	static const Path PROJECT_INTERNAL_DIR = L"Internal\\";
 	static const Path PROJECT_INTERNAL_DIR = L"Internal\\";
 	static const Path INTERNAL_ASSEMBLY_PATH = PROJECT_INTERNAL_DIR + "Assemblies\\";
 	static const Path INTERNAL_ASSEMBLY_PATH = PROJECT_INTERNAL_DIR + "Assemblies\\";
 
 

+ 1 - 1
Source/BansheeEditor/EditorWindow/BsDockManager.h

@@ -265,7 +265,7 @@ namespace bs
 		DockOverlayRenderer();
 		DockOverlayRenderer();
 
 
 	private:
 	private:
-		friend class DockManager;
+		friend class bs::DockManager;
 
 
 		/**	@copydoc RendererExtension::initialize */
 		/**	@copydoc RendererExtension::initialize */
 		void initialize(const Any& data) override;
 		void initialize(const Any& data) override;

+ 2 - 0
Source/BansheeEditor/EditorWindow/BsEditorWidget.h

@@ -163,6 +163,8 @@ namespace bs
 	 *  @{
 	 *  @{
 	 */
 	 */
 
 
+	template <class Type> class EditorWidget;
+
 	/**
 	/**
 	 * Helper class that registers a widget creation callback with the widget manager. The creation callback allows the
 	 * Helper class that registers a widget creation callback with the widget manager. The creation callback allows the
 	 * runtime to open widgets just by their name without knowing the actual type.
 	 * runtime to open widgets just by their name without knowing the actual type.

+ 1 - 1
Source/BansheeEditor/EditorWindow/BsEditorWidgetContainer.cpp

@@ -195,7 +195,7 @@ namespace bs
 
 
 	void EditorWidgetContainer::setActiveWidget(UINT32 idx)
 	void EditorWidgetContainer::setActiveWidget(UINT32 idx)
 	{
 	{
-		if(mActiveWidget == idx)
+		if((UINT32)mActiveWidget == idx)
 			return;
 			return;
 
 
 		mActiveWidget = idx;
 		mActiveWidget = idx;

+ 1 - 1
Source/BansheeEditor/GUI/BsGUIFloatField.cpp

@@ -21,7 +21,7 @@ namespace bs
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
 		: TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mValue(0.0f)
 		: TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mValue(0.0f)
 		, mLastDragPos(0), mMinValue(std::numeric_limits<float>::lowest()), mMaxValue(std::numeric_limits<float>::max())
 		, mLastDragPos(0), mMinValue(std::numeric_limits<float>::lowest()), mMaxValue(std::numeric_limits<float>::max())
-		, mIsDragging(false), mHasInputFocus(false), mStep(0.0f)
+		, mStep(0.0f), mIsDragging(false), mHasInputFocus(false)
 	{
 	{
 		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), getSubStyleName(getInputStyleType()));
 		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), getSubStyleName(getInputStyleType()));
 		mInputBox->setFilter(&GUIFloatField::floatFilter);
 		mInputBox->setFilter(&GUIFloatField::floatFilter);

+ 2 - 2
Source/BansheeEditor/GUI/BsGUIIntField.cpp

@@ -21,8 +21,8 @@ namespace bs
 	GUIIntField::GUIIntField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 	GUIIntField::GUIIntField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
 		const String& style, const GUIDimensions& dimensions, bool withLabel)
 		: TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mValue(0)
 		: TGUIField(dummy, labelContent, labelWidth, style, dimensions, withLabel), mInputBox(nullptr), mValue(0)
-		, mLastDragPos(0), mMinValue(std::numeric_limits<INT32>::lowest())
-		, mMaxValue(std::numeric_limits<INT32>::max()), mIsDragging(false), mIsDragCursorSet(false), mHasInputFocus(false), mStep(1)
+		, mLastDragPos(0), mMinValue(std::numeric_limits<INT32>::lowest()), mMaxValue(std::numeric_limits<INT32>::max())
+		, mStep(1), mIsDragging(false), mIsDragCursorSet(false), mHasInputFocus(false)
 	{
 	{
 		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), getSubStyleName(getInputStyleType()));
 		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), getSubStyleName(getInputStyleType()));
 		mInputBox->setFilter(&GUIIntField::intFilter);
 		mInputBox->setFilter(&GUIIntField::intFilter);

+ 0 - 3
Source/BansheeEditor/GUI/BsGUIMenuBar.cpp

@@ -562,8 +562,5 @@ namespace bs
 		}
 		}
 
 
 		Platform::setCaptionNonClientAreas(*mParentWindow->getCore(), nonClientAreas);
 		Platform::setCaptionNonClientAreas(*mParentWindow->getCore(), nonClientAreas);
-
-		Rect2I menuBarBounds = mMenuItemLayout->getBounds();
-		menuBarBounds.width = menuWidth;
 	}
 	}
 }
 }

+ 3 - 3
Source/BansheeEditor/GUI/BsGUISceneTreeView.cpp

@@ -489,7 +489,7 @@ namespace bs
 		if (duplicateList.size() == 1)
 		if (duplicateList.size() == 1)
 			message = L"Duplicated " + toWString(duplicateList[0]->getName());
 			message = L"Duplicated " + toWString(duplicateList[0]->getName());
 		else
 		else
-			message = L"Duplicated " + toWString(duplicateList.size()) + L" elements";
+			message = L"Duplicated " + toWString((UINT32)duplicateList.size()) + L" elements";
 
 
 		CmdCloneSO::execute(duplicateList, message);
 		CmdCloneSO::execute(duplicateList, message);
 		onModified();
 		onModified();
@@ -545,7 +545,7 @@ namespace bs
 			if (mCopyList.size() == 1)
 			if (mCopyList.size() == 1)
 				message = L"Moved " + toWString(mCopyList[0]->getName());
 				message = L"Moved " + toWString(mCopyList[0]->getName());
 			else
 			else
-				message = L"Moved " + toWString(mCopyList.size()) + L" elements";
+				message = L"Moved " + toWString((UINT32)mCopyList.size()) + L" elements";
 
 
 			CmdReparentSO::execute(mCopyList, parent, message);
 			CmdReparentSO::execute(mCopyList, parent, message);
 			clearCopyList();
 			clearCopyList();
@@ -556,7 +556,7 @@ namespace bs
 			if (mCopyList.size() == 1)
 			if (mCopyList.size() == 1)
 				message = L"Copied " + toWString(mCopyList[0]->getName());
 				message = L"Copied " + toWString(mCopyList[0]->getName());
 			else
 			else
-				message = L"Copied " + toWString(mCopyList.size()) + L" elements";
+				message = L"Copied " + toWString((UINT32)mCopyList.size()) + L" elements";
 
 
 			Vector<HSceneObject> clones = CmdCloneSO::execute(mCopyList, message);
 			Vector<HSceneObject> clones = CmdCloneSO::execute(mCopyList, message);
 			for (auto& clone : clones)
 			for (auto& clone : clones)

+ 1 - 1
Source/BansheeEditor/GUI/BsGUIStatusBar.cpp

@@ -191,7 +191,7 @@ namespace bs
 		else
 		else
 			newlinePos = -1;
 			newlinePos = -1;
 
 
-		if (newlinePos == -1)
+		if (newlinePos == (UINT32)-1)
 		{
 		{
 			GUIContent messageContent(HString(message), iconTexture);
 			GUIContent messageContent(HString(message), iconTexture);
 			mMessage->setContent(messageContent);
 			mMessage->setContent(messageContent);

+ 1 - 1
Source/BansheeEditor/Handles/BsHandleDrawManager.h

@@ -239,7 +239,7 @@ namespace bs
 		HandleRenderer();
 		HandleRenderer();
 
 
 	private:
 	private:
-		friend class HandleDrawManager;
+		friend class bs::HandleDrawManager;
 
 
 		/** @copydoc RendererExtension::initialize */
 		/** @copydoc RendererExtension::initialize */
 		void initialize(const Any& data) override;
 		void initialize(const Any& data) override;

+ 2 - 2
Source/BansheeEditor/Scene/BsGizmoManager.h

@@ -427,7 +427,7 @@ namespace bs
 		void limitIconSize(UINT32& width, UINT32& height);
 		void limitIconSize(UINT32& width, UINT32& height);
 
 
 		/** Converts mesh data from DrawHelper into mesh data usable by the gizmo renderer. */
 		/** Converts mesh data from DrawHelper into mesh data usable by the gizmo renderer. */
-		Vector<MeshRenderData> GizmoManager::createMeshProxyData(const Vector<DrawHelper::ShapeMeshData>& meshData);
+		Vector<MeshRenderData> createMeshProxyData(const Vector<DrawHelper::ShapeMeshData>& meshData);
 
 
 		/**
 		/**
 		 * Calculates colors for an icon based on its position in the camera. For example icons too close to too far might
 		 * Calculates colors for an icon based on its position in the camera. For example icons too close to too far might
@@ -527,7 +527,7 @@ namespace bs
 	/** Performs rendering of gizmos on the core thread, as managed by the GizmoManager. */
 	/** Performs rendering of gizmos on the core thread, as managed by the GizmoManager. */
 	class GizmoRenderer : public RendererExtension
 	class GizmoRenderer : public RendererExtension
 	{
 	{
-		friend class GizmoManager;
+		friend class bs::GizmoManager;
 
 
 	public:
 	public:
 		GizmoRenderer();
 		GizmoRenderer();

+ 1 - 1
Source/BansheeEditor/Scene/BsSceneGrid.h

@@ -85,7 +85,7 @@ namespace bs
 		SceneGridRenderer();
 		SceneGridRenderer();
 
 
 	private:
 	private:
-		friend class SceneGrid;
+		friend class bs::SceneGrid;
 
 
 		/**	@copydoc RendererExtension::initialize */
 		/**	@copydoc RendererExtension::initialize */
 		void initialize(const Any& data) override;
 		void initialize(const Any& data) override;

+ 1 - 1
Source/BansheeEditor/Scene/BsSelectionRenderer.h

@@ -37,7 +37,7 @@ namespace bs
 	/** Core thread version of the selection renderer, that handles actual rendering. */
 	/** Core thread version of the selection renderer, that handles actual rendering. */
 	class SelectionRendererCore : public RendererExtension
 	class SelectionRendererCore : public RendererExtension
 	{
 	{
-		friend class SelectionRenderer;
+		friend class bs::SelectionRenderer;
 
 
 	public:
 	public:
 		SelectionRendererCore();
 		SelectionRendererCore();

+ 0 - 3
Source/BansheeEditor/SceneView/BsGizmoManager.cpp

@@ -1047,9 +1047,6 @@ namespace bs
 		if (renderTarget == nullptr)
 		if (renderTarget == nullptr)
 			return;
 			return;
 
 
-		float width = (float)renderTarget->getProperties().getWidth();
-		float height = (float)renderTarget->getProperties().getHeight();
-
 		Rect2I screenArea = camera->getViewport()->getArea();
 		Rect2I screenArea = camera->getViewport()->getArea();
 		Matrix4 viewMatrix = camera->getViewMatrix();
 		Matrix4 viewMatrix = camera->getViewMatrix();
 		Matrix4 projMatrix = camera->getProjectionMatrixRS();
 		Matrix4 projMatrix = camera->getProjectionMatrixRS();

+ 0 - 1
Source/BansheeEditor/SceneView/BsSelectionRenderer.cpp

@@ -133,7 +133,6 @@ namespace bs
 	{
 	{
 		THROW_IF_NOT_CORE_THREAD;
 		THROW_IF_NOT_CORE_THREAD;
 
 
-		const RendererAnimationData& animData = AnimationManager::instance().getRendererData();
 		Matrix4 viewProjMat = mCamera->getProjectionMatrixRS() * mCamera->getViewMatrix();
 		Matrix4 viewProjMat = mCamera->getProjectionMatrixRS() * mCamera->getViewMatrix();
 
 
 		SPtr<Renderer> renderer = gRenderer();
 		SPtr<Renderer> renderer = gRenderer();

+ 1 - 1
Source/BansheeEditor/Testing/BsEditorTestSuite.cpp

@@ -617,7 +617,7 @@ namespace bs
 		BS_TEST_ASSERT(_1->getLinkId() != _3->getLinkId() && _1->getLinkId() != _10->getLinkId());
 		BS_TEST_ASSERT(_1->getLinkId() != _3->getLinkId() && _1->getLinkId() != _10->getLinkId());
 
 
 		// Ensure new instances of a prefab have -1 root link ID
 		// Ensure new instances of a prefab have -1 root link ID
-		BS_TEST_ASSERT(_3->getLinkId() == -1 && _10->getLinkId() == -1);
+		BS_TEST_ASSERT(_3->getLinkId() == (UINT32)-1 && _10->getLinkId() == (UINT32)-1);
 
 
 		scenePrefab->update(sceneRoot);
 		scenePrefab->update(sceneRoot);
 
 

+ 2 - 2
Source/BansheeEngine/2D/BsSpriteMaterial.cpp

@@ -42,7 +42,7 @@ namespace bs
 
 
 		mParamBufferIdx = mParams->getParamBlockBufferIndex("GUIParams");
 		mParamBufferIdx = mParams->getParamBlockBufferIndex("GUIParams");
 
 
-		if(mParamBufferIdx == -1)
+		if(mParamBufferIdx == (UINT32)-1)
 			LOGERR("Sprite material shader missing \"GUIParams\" block.");
 			LOGERR("Sprite material shader missing \"GUIParams\" block.");
 	}
 	}
 
 
@@ -79,7 +79,7 @@ namespace bs
 		mTextureParam.set(spriteTexture);
 		mTextureParam.set(spriteTexture);
 		mSamplerParam.set(sampler);
 		mSamplerParam.set(sampler);
 
 
-		if(mParamBufferIdx != -1)
+		if(mParamBufferIdx != (UINT32)-1)
 			mParams->setParamBlockBuffer(mParamBufferIdx, paramBuffer, true);
 			mParams->setParamBlockBuffer(mParamBufferIdx, paramBuffer, true);
 
 
 		mMaterial->updateParamsSet(mParams);
 		mMaterial->updateParamsSet(mParams);

+ 1 - 1
Source/BansheeEngine/Debug/BsDebugDraw.h

@@ -206,7 +206,7 @@ namespace bs
 	/** Performs rendering of meshes provided by DebugDraw. */
 	/** Performs rendering of meshes provided by DebugDraw. */
 	class DebugDrawRenderer : public RendererExtension
 	class DebugDrawRenderer : public RendererExtension
 	{
 	{
-		friend class DebugDraw;
+		friend class bs::DebugDraw;
 
 
 	public:
 	public:
 		DebugDrawRenderer();
 		DebugDrawRenderer();

+ 1 - 1
Source/BansheeEngine/GUI/BsGUIDropDownContent.cpp

@@ -357,7 +357,7 @@ namespace bs
 			UINT32 visIdx = 0;
 			UINT32 visIdx = 0;
 			for (auto& visElem : mVisibleElements)
 			for (auto& visElem : mVisibleElements)
 			{
 			{
-				if (visElem.idx == prevIdx)
+				if (visElem.idx == (UINT32)prevIdx)
 				{
 				{
 					setSelected(visIdx);
 					setSelected(visIdx);
 					break;
 					break;

+ 1 - 1
Source/BansheeEngine/GUI/BsGUILabel.cpp

@@ -10,7 +10,7 @@
 namespace bs
 namespace bs
 {
 {
 	GUILabel::GUILabel(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions)
 	GUILabel::GUILabel(const String& styleName, const GUIContent& content, const GUIDimensions& dimensions)
-		:GUIElement(styleName, dimensions), mImageSprite(nullptr), mContent(content)
+		:GUIElement(styleName, dimensions), mContent(content), mImageSprite(nullptr)
 	{
 	{
 		mTextSprite = bs_new<TextSprite>();
 		mTextSprite = bs_new<TextSprite>();
 	}
 	}

+ 0 - 5
Source/BansheeEngine/GUI/BsGUIManager.cpp

@@ -1477,11 +1477,6 @@ namespace bs
 	// nothing stays in hover state
 	// nothing stays in hover state
 	void GUIManager::onMouseLeftWindow(RenderWindow& win)
 	void GUIManager::onMouseLeftWindow(RenderWindow& win)
 	{
 	{
-		bool buttonStates[3];
-		buttonStates[0] = false;
-		buttonStates[1] = false;
-		buttonStates[2] = false;
-
 		mNewElementsUnderPointer.clear();
 		mNewElementsUnderPointer.clear();
 
 
 		for(auto& elementInfo : mElementsUnderPointer)
 		for(auto& elementInfo : mElementsUnderPointer)

+ 1 - 1
Source/BansheeEngine/GUI/BsGUIManager.h

@@ -434,7 +434,7 @@ namespace bs
 	/**	Handles GUI rendering on the core thread. */
 	/**	Handles GUI rendering on the core thread. */
 	class BS_EXPORT GUIRenderer : public RendererExtension
 	class BS_EXPORT GUIRenderer : public RendererExtension
 	{
 	{
-		friend class GUIManager;
+		friend class bs::GUIManager;
 
 
 	public:
 	public:
 		GUIRenderer();
 		GUIRenderer();

+ 2 - 2
Source/BansheeEngine/GUI/BsShortcutKey.h

@@ -16,12 +16,12 @@ namespace bs
 	{
 	{
 		struct BS_EXPORT Hash
 		struct BS_EXPORT Hash
 		{
 		{
-			inline size_t operator()(const ShortcutKey& x) const;
+			size_t operator()(const ShortcutKey& x) const;
 		};
 		};
 
 
 		struct BS_EXPORT Equals
 		struct BS_EXPORT Equals
 		{
 		{
-			inline bool operator()(const ShortcutKey& a, const ShortcutKey& b) const;
+			bool operator()(const ShortcutKey& a, const ShortcutKey& b) const;
 		};
 		};
 
 
 		ShortcutKey();
 		ShortcutKey();

+ 5 - 5
Source/BansheeEngine/Platform/BsCursor.cpp

@@ -53,7 +53,7 @@ namespace bs
 	void Cursor::setCursor(CursorType type)
 	void Cursor::setCursor(CursorType type)
 	{
 	{
 		UINT32 id = (UINT32)type;
 		UINT32 id = (UINT32)type;
-		if(mActiveCursorId != id)
+		if((UINT32)mActiveCursorId != id)
 		{
 		{
 			mActiveCursorId = id;
 			mActiveCursorId = id;
 			updateCursorImage();
 			updateCursorImage();
@@ -70,7 +70,7 @@ namespace bs
 		}
 		}
 
 
 		UINT32 id = iterFind->second;
 		UINT32 id = iterFind->second;
-		if(mActiveCursorId != id)
+		if((UINT32)mActiveCursorId != id)
 		{
 		{
 			mActiveCursorId = id;
 			mActiveCursorId = id;
 			updateCursorImage();
 			updateCursorImage();
@@ -85,7 +85,7 @@ namespace bs
 			UINT32 id = iterFind->second;
 			UINT32 id = iterFind->second;
 			mCustomIcons[id] = CustomIcon(pixelData, hotSpot);
 			mCustomIcons[id] = CustomIcon(pixelData, hotSpot);
 
 
-			if(mActiveCursorId == id)
+			if((UINT32)mActiveCursorId == id)
 				updateCursorImage(); // Refresh active
 				updateCursorImage(); // Refresh active
 		}
 		}
 		else
 		else
@@ -103,7 +103,7 @@ namespace bs
 		mCustomIcons[id].pixelData = pixelData;
 		mCustomIcons[id].pixelData = pixelData;
 		mCustomIcons[id].hotSpot = hotSpot;
 		mCustomIcons[id].hotSpot = hotSpot;
 
 
-		if(mActiveCursorId == id)
+		if((UINT32)mActiveCursorId == id)
 			updateCursorImage(); // Refresh active
 			updateCursorImage(); // Refresh active
 	}
 	}
 
 
@@ -121,7 +121,7 @@ namespace bs
 	{
 	{
 		restoreCursorIcon(type);
 		restoreCursorIcon(type);
 
 
-		if(mActiveCursorId == (UINT32)type)
+		if(mActiveCursorId == (INT32)type)
 			updateCursorImage(); // Refresh active
 			updateCursorImage(); // Refresh active
 	}
 	}
 
 

+ 1 - 1
Source/BansheeEngine/Renderer/BsRendererMaterial.h

@@ -17,7 +17,7 @@
 	static void _initMetaData()												\
 	static void _initMetaData()												\
 	{																		\
 	{																		\
 		_initVariations(mMetaData.variations);								\
 		_initVariations(mMetaData.variations);								\
-		RendererMaterialManager::_registerMaterial(&mMetaData, path);		\
+		bs::RendererMaterialManager::_registerMaterial(&mMetaData, path);	\
 	};																		\
 	};																		\
 	static void _initVariations(ShaderVariations& variations);
 	static void _initVariations(ShaderVariations& variations);
 
 

+ 2 - 0
Source/BansheeEngine/Resources/BsBuiltinResources.cpp

@@ -1397,6 +1397,8 @@ namespace bs
 			return mShaderDiffuse;
 			return mShaderDiffuse;
 		case BuiltinShader::Transparent:
 		case BuiltinShader::Transparent:
 			return mShaderTransparent;
 			return mShaderTransparent;
+		default:
+			break;
 		}
 		}
 
 
 		return HShader();
 		return HShader();

+ 7 - 6
Source/BansheeEngine/Utility/BsPaths.h

@@ -8,12 +8,13 @@ namespace bs
 	 *  @{
 	 *  @{
 	 */
 	 */
 
 
-	static const char* ENGINE_ASSEMBLY = "MBansheeEngine";
-	static const char* SCRIPT_GAME_ASSEMBLY = "MScriptGame";
-	static const char* GAME_RESOURCES_FOLDER_NAME = "Resources\\";
-	static const char* GAME_SETTINGS_NAME = "GameSettings.asset";
-	static const char* GAME_RESOURCE_MANIFEST_NAME = "ResourceManifest.asset";
-	static const char* GAME_RESOURCE_MAPPING_NAME = "ResourceMapping.asset";
+	constexpr const char* ENGINE_ASSEMBLY = "MBansheeEngine";
+	constexpr const char* SCRIPT_GAME_ASSEMBLY = "MScriptGame";
+	constexpr const char* GAME_RESOURCES_FOLDER_NAME = "Resources\\";
+	constexpr const char* GAME_SETTINGS_NAME = "GameSettings.asset";
+	constexpr const char* GAME_RESOURCE_MANIFEST_NAME = "ResourceManifest.asset";
+	constexpr const char* GAME_RESOURCE_MAPPING_NAME = "ResourceMapping.asset";
+
 
 
 	/** Contains common engine paths. */
 	/** Contains common engine paths. */
 	class BS_EXPORT Paths
 	class BS_EXPORT Paths

+ 0 - 1
Source/BansheeFBXImporter/BsFBXImporter.cpp

@@ -266,7 +266,6 @@ namespace bs
 		for (auto& mesh : scene.meshes)
 		for (auto& mesh : scene.meshes)
 		{
 		{
 			// Create bones
 			// Create bones
-			UINT32 numBones = (UINT32)mesh->bones.size();
 			for (auto& fbxBone : mesh->bones)
 			for (auto& fbxBone : mesh->bones)
 			{
 			{
 				UINT32 boneIdx = (UINT32)allBones.size();
 				UINT32 boneIdx = (UINT32)allBones.size();

+ 6 - 4
Source/BansheeFBXImporter/CMakeLists.txt

@@ -1,12 +1,14 @@
 # Source files and their filters
 # Source files and their filters
 include(CMakeSources.cmake)
 include(CMakeSources.cmake)
 
 
+# Packages
+find_package(FBXSDK REQUIRED)
+
 # Includes
 # Includes
 set(BansheeFBXImporter_INC 
 set(BansheeFBXImporter_INC 
 	"./" 
 	"./" 
 	"../BansheeUtility" 
 	"../BansheeUtility" 
-	"../BansheeCore"
-	"../../Dependencies/FBXSDK/include")
+	"../BansheeCore")
 
 
 include_directories(${BansheeFBXImporter_INC})	
 include_directories(${BansheeFBXImporter_INC})	
 	
 	
@@ -18,10 +20,10 @@ target_compile_definitions(BansheeFBXImporter PRIVATE -DBS_FBX_EXPORTS)
 
 
 # Libraries
 # Libraries
 ## External lib: FBX
 ## External lib: FBX
-add_library_per_config(BansheeFBXImporter FBXSDK Release/libfbxsdk-md Debug/libfbxsdk-md)	
+target_link_libraries(BansheeFBXImporter ${FBXSDK_LIBRARIES})
 
 
 ## Local libs
 ## Local libs
-target_link_libraries(BansheeFBXImporter PUBLIC BansheeUtility BansheeCore)
+target_link_libraries(BansheeFBXImporter BansheeUtility BansheeCore)
 
 
 # IDE specific
 # IDE specific
 set_property(TARGET BansheeFBXImporter PROPERTY FOLDER Plugins)
 set_property(TARGET BansheeFBXImporter PROPERTY FOLDER Plugins)

+ 5 - 8
Source/BansheeFMOD/CMakeLists.txt

@@ -4,6 +4,8 @@ include(CMakeSources.cmake)
 # Packages
 # Packages
 if(AUDIO_MODULE MATCHES "FMOD")
 if(AUDIO_MODULE MATCHES "FMOD")
 	find_package(FMOD)
 	find_package(FMOD)
+	find_package(ogg)
+	find_package(vorbis)
 endif()
 endif()
 
 
 # Includes
 # Includes
@@ -11,10 +13,7 @@ set(BansheeFMOD_INC
 	"./" 
 	"./" 
 	"../BansheeUtility" 
 	"../BansheeUtility" 
 	"../BansheeCore"
 	"../BansheeCore"
-	"../BansheeOpenAudio"
-	${FMOD_INCLUDE_DIRS}
-	"../../Dependencies/libogg/include"
-	"../../Dependencies/libvorbis/include")
+	"../BansheeOpenAudio")
 
 
 include_directories(${BansheeFMOD_INC})	
 include_directories(${BansheeFMOD_INC})	
 	
 	
@@ -27,10 +26,8 @@ target_compile_definitions(BansheeFMOD PRIVATE -DBS_FMOD_EXPORTS)
 # Libraries
 # Libraries
 ## External libs: FMOD, Vorbis, Ogg
 ## External libs: FMOD, Vorbis, Ogg
 target_link_libraries(BansheeFMOD PRIVATE ${FMOD_LIBRARIES})	
 target_link_libraries(BansheeFMOD PRIVATE ${FMOD_LIBRARIES})	
-
-add_library_per_config_multi(BansheeFMOD libvorbis libvorbis libvorbis libvorbis)
-add_library_per_config_multi(BansheeFMOD libvorbisfile libvorbis libvorbisfile libvorbisfile)
-add_library_per_config(BansheeFMOD libogg Release/libogg Debug/libogg)
+target_link_libraries(BansheeFMOD PRIVATE ${ogg_LIBRARIES})
+target_link_libraries(BansheeFMOD PRIVATE ${vorbis_LIBRARIES})
 
 
 ## Local libs
 ## Local libs
 target_link_libraries(BansheeFMOD PUBLIC BansheeUtility BansheeCore)
 target_link_libraries(BansheeFMOD PUBLIC BansheeUtility BansheeCore)

+ 1 - 1
Source/BansheeFontImporter/BsFontImporter.cpp

@@ -193,7 +193,7 @@ namespace bs
 				for(size_t i = 0; i < atlasElements.size(); i++)
 				for(size_t i = 0; i < atlasElements.size(); i++)
 				{
 				{
 					// Copy character bitmap
 					// Copy character bitmap
-					if(atlasElements[i].output.page != pageIdx)
+					if(atlasElements[i].output.page != (INT32)pageIdx)
 						continue;
 						continue;
 
 
 					TextureAtlasUtility::Element curElement = atlasElements[i];
 					TextureAtlasUtility::Element curElement = atlasElements[i];

+ 6 - 4
Source/BansheeFontImporter/CMakeLists.txt

@@ -1,12 +1,14 @@
 # Source files and their filters
 # Source files and their filters
 include(CMakeSources.cmake)
 include(CMakeSources.cmake)
 
 
+# Packages
+find_package(freetype REQUIRED)
+
 # Includes
 # Includes
 set(BansheeFontImporter_INC 
 set(BansheeFontImporter_INC 
 	"./" 
 	"./" 
 	"../BansheeUtility" 
 	"../BansheeUtility" 
-	"../BansheeCore"
-	"../../Dependencies/freetype/include")
+	"../BansheeCore")
 
 
 include_directories(${BansheeFontImporter_INC})	
 include_directories(${BansheeFontImporter_INC})	
 	
 	
@@ -18,10 +20,10 @@ target_compile_definitions(BansheeFontImporter PRIVATE -DBS_FONT_EXPORTS -DUSE_F
 
 
 # Libraries
 # Libraries
 ## External lib: FreeType
 ## External lib: FreeType
-add_library_per_config(BansheeFontImporter freetype Release/freetype Debug/freetype)
+target_link_libraries(BansheeFontImporter ${freetype_LIBRARIES})
 
 
 ## Local libs
 ## Local libs
-target_link_libraries(BansheeFontImporter PUBLIC BansheeUtility BansheeCore)
+target_link_libraries(BansheeFontImporter BansheeUtility BansheeCore)
 
 
 # IDE specific
 # IDE specific
 set_property(TARGET BansheeFontImporter PROPERTY FOLDER Plugins)
 set_property(TARGET BansheeFontImporter PROPERTY FOLDER Plugins)

+ 2 - 2
Source/BansheeFreeImgImporter/BsFreeImgImporter.cpp

@@ -691,7 +691,7 @@ namespace bs
 			std::array<SPtr<PixelData>, 6> superSampledOutput;
 			std::array<SPtr<PixelData>, 6> superSampledOutput;
 			readCubemapUVRemap(source, superSampledOutput, superSampledFaceSize, &mapCubemapDirToCylindrical);
 			readCubemapUVRemap(source, superSampledOutput, superSampledFaceSize, &mapCubemapDirToCylindrical);
 
 
-			if (faceSize.x != superSampledFaceSize)
+			if (faceSize.x != (INT32)superSampledFaceSize)
 				downsampleCubemap(superSampledOutput, output, faceSize.x);
 				downsampleCubemap(superSampledOutput, output, faceSize.x);
 			else
 			else
 				output = superSampledOutput;
 				output = superSampledOutput;
@@ -704,7 +704,7 @@ namespace bs
 			std::array<SPtr<PixelData>, 6> superSampledOutput;
 			std::array<SPtr<PixelData>, 6> superSampledOutput;
 			readCubemapUVRemap(source, superSampledOutput, superSampledFaceSize, &mapCubemapDirToSpherical);
 			readCubemapUVRemap(source, superSampledOutput, superSampledFaceSize, &mapCubemapDirToSpherical);
 
 
-			if (faceSize.x != superSampledFaceSize)
+			if (faceSize.x != (INT32)superSampledFaceSize)
 				downsampleCubemap(superSampledOutput, output, faceSize.x);
 				downsampleCubemap(superSampledOutput, output, faceSize.x);
 			else
 			else
 				output = superSampledOutput;
 				output = superSampledOutput;

+ 6 - 4
Source/BansheeFreeImgImporter/CMakeLists.txt

@@ -1,13 +1,15 @@
 # Source files and their filters
 # Source files and their filters
 include(CMakeSources.cmake)
 include(CMakeSources.cmake)
 
 
+# Packages
+find_package(freeimg REQUIRED)
+
 # Includes
 # Includes
 set(BansheeFreeImgImporter_INC 
 set(BansheeFreeImgImporter_INC 
 	"./" 
 	"./" 
 	"../BansheeUtility" 
 	"../BansheeUtility" 
 	"../BansheeCore"
 	"../BansheeCore"
-	"../BansheeEngine"
-	"../../Dependencies/freeimg/include")
+	"../BansheeEngine")
 
 
 include_directories(${BansheeFreeImgImporter_INC})	
 include_directories(${BansheeFreeImgImporter_INC})	
 	
 	
@@ -19,10 +21,10 @@ target_compile_definitions(BansheeFreeImgImporter PRIVATE -DBS_FREEIMG_EXPORTS -
 
 
 # Libraries
 # Libraries
 ## External lib: FreeImage
 ## External lib: FreeImage
-add_library_per_config(BansheeFreeImgImporter freeimg Release/FreeImage Debug/FreeImage)
+target_link_libraries(BansheeFreeImgImporter ${freeimg_LIBRARIES})
 
 
 ## Local libs
 ## Local libs
-target_link_libraries(BansheeFreeImgImporter PUBLIC BansheeUtility BansheeCore BansheeEngine)
+target_link_libraries(BansheeFreeImgImporter BansheeUtility BansheeCore BansheeEngine)
 
 
 # IDE specific
 # IDE specific
 set_property(TARGET BansheeFreeImgImporter PROPERTY FOLDER Plugins)
 set_property(TARGET BansheeFreeImgImporter PROPERTY FOLDER Plugins)

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLBuffer.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsVertexBuffer.h"
+#include "RenderAPI/BsVertexBuffer.h"
 #include "BsGLVertexArrayObjectManager.h"
 #include "BsGLVertexArrayObjectManager.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLCommandBuffer.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsCommandBuffer.h"
+#include "RenderAPI/BsCommandBuffer.h"
 #include "BsGLRenderAPI.h"
 #include "BsGLRenderAPI.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLEventQuery.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsEventQuery.h"
+#include "RenderAPI/BsEventQuery.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLGpuBuffer.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsGpuBuffer.h"
+#include "RenderAPI/BsGpuBuffer.h"
 #include "BsGLBuffer.h"
 #include "BsGLBuffer.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLGpuParamBlockBuffer.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsGpuParamBlockBuffer.h"
+#include "RenderAPI/BsGpuParamBlockBuffer.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 3 - 3
Source/BansheeGLRenderAPI/BsGLHardwareBufferManager.cpp

@@ -4,10 +4,10 @@
 #include "BsGLVertexBuffer.h"
 #include "BsGLVertexBuffer.h"
 #include "BsGLIndexBuffer.h"
 #include "BsGLIndexBuffer.h"
 #include "BsGLGpuBuffer.h"
 #include "BsGLGpuBuffer.h"
-#include "Renderapi/BsHardwareBuffer.h"
+#include "RenderAPI/BsHardwareBuffer.h"
 #include "BsGLGpuParamBlockBuffer.h"
 #include "BsGLGpuParamBlockBuffer.h"
-#include "Renderapi/BsRenderAPI.h"
-#include "Renderapi/BsRenderAPICapabilities.h"
+#include "RenderAPI/BsRenderAPI.h"
+#include "RenderAPI/BsRenderAPICapabilities.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLIndexBuffer.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsIndexBuffer.h"
+#include "RenderAPI/BsIndexBuffer.h"
 #include "BsGLBuffer.h"
 #include "BsGLBuffer.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLOcclusionQuery.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsOcclusionQuery.h"
+#include "RenderAPI/BsOcclusionQuery.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLPixelBuffer.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsHardwareBuffer.h"
+#include "RenderAPI/BsHardwareBuffer.h"
 #include "Image/BsPixelUtil.h"
 #include "Image/BsPixelUtil.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLPixelFormat.cpp

@@ -1,7 +1,7 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 #include "BsGLPixelFormat.h"
 #include "BsGLPixelFormat.h"
-#include "Renderapi/BsRenderAPI.h"
+#include "RenderAPI/BsRenderAPI.h"
 #include "Utility/BsBitwise.h"
 #include "Utility/BsBitwise.h"
 #include "Debug/BsDebug.h"
 #include "Debug/BsDebug.h"
 
 

+ 15 - 13
Source/BansheeGLRenderAPI/BsGLRenderAPI.cpp

@@ -1,29 +1,29 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 #include "BsGLRenderAPI.h"
 #include "BsGLRenderAPI.h"
-#include "Renderapi/BsRenderAPI.h"
+#include "RenderAPI/BsRenderAPI.h"
 #include "BsGLTextureManager.h"
 #include "BsGLTextureManager.h"
 #include "BsGLIndexBuffer.h"
 #include "BsGLIndexBuffer.h"
 #include "BsGLUtil.h"
 #include "BsGLUtil.h"
-#include "Glsl/BsGLSLGpuProgram.h"
+#include "GLSL/BsGLSLGpuProgram.h"
 #include "Error/BsException.h"
 #include "Error/BsException.h"
 #include "BsGLContext.h"
 #include "BsGLContext.h"
 #include "BsGLSupport.h"
 #include "BsGLSupport.h"
-#include "Renderapi/BsBlendState.h"
-#include "Renderapi/BsRasterizerState.h"
-#include "Renderapi/BsDepthStencilState.h"
+#include "RenderAPI/BsBlendState.h"
+#include "RenderAPI/BsRasterizerState.h"
+#include "RenderAPI/BsDepthStencilState.h"
 #include "BsGLRenderTexture.h"
 #include "BsGLRenderTexture.h"
 #include "BsGLRenderWindowManager.h"
 #include "BsGLRenderWindowManager.h"
-#include "Glsl/BsGLSLProgramPipelineManager.h"
+#include "GLSL/BsGLSLProgramPipelineManager.h"
 #include "BsGLVertexArrayObjectManager.h"
 #include "BsGLVertexArrayObjectManager.h"
 #include "Managers/BsRenderStateManager.h"
 #include "Managers/BsRenderStateManager.h"
-#include "Renderapi/BsGpuParams.h"
+#include "RenderAPI/BsGpuParams.h"
 #include "BsGLGpuParamBlockBuffer.h"
 #include "BsGLGpuParamBlockBuffer.h"
-#include "Corethread/BsCoreThread.h"
+#include "CoreThread/BsCoreThread.h"
 #include "BsGLQueryManager.h"
 #include "BsGLQueryManager.h"
 #include "Debug/BsDebug.h"
 #include "Debug/BsDebug.h"
 #include "Profiling/BsRenderStats.h"
 #include "Profiling/BsRenderStats.h"
-#include "Renderapi/BsGpuParamDesc.h"
+#include "RenderAPI/BsGpuParamDesc.h"
 #include "BsGLGpuBuffer.h"
 #include "BsGLGpuBuffer.h"
 #include "BsGLCommandBuffer.h"
 #include "BsGLCommandBuffer.h"
 #include "BsGLCommandBufferManager.h"
 #include "BsGLCommandBufferManager.h"
@@ -33,7 +33,8 @@ namespace bs { namespace ct
 {
 {
 	const char* MODULE_NAME = "BansheeGLRenderAPI.dll";
 	const char* MODULE_NAME = "BansheeGLRenderAPI.dll";
 
 
-	void __stdcall openGlErrorCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam);
+	void openGlErrorCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar
+				*message, GLvoid *userParam);
 
 
 	/************************************************************************/
 	/************************************************************************/
 	/* 								PUBLIC INTERFACE                   		*/
 	/* 								PUBLIC INTERFACE                   		*/
@@ -592,6 +593,8 @@ namespace bs { namespace ct
 									glBindBufferBase(GL_SHADER_STORAGE_BUFFER, unit, 0);
 									glBindBufferBase(GL_SHADER_STORAGE_BUFFER, unit, 0);
 							}
 							}
 							break;
 							break;
+						default:
+							break;
 						}
 						}
 					}
 					}
 
 
@@ -1493,8 +1496,6 @@ namespace bs { namespace ct
 		if (mActiveRenderTarget == nullptr)
 		if (mActiveRenderTarget == nullptr)
 			return;
 			return;
 
 
-		const RenderTargetProperties& rtProps = mActiveRenderTarget->getProperties();
-
 		// Calculate the "lower-left" corner of the viewport
 		// Calculate the "lower-left" corner of the viewport
 		GLsizei x = 0, y = 0, w = 0, h = 0;
 		GLsizei x = 0, y = 0, w = 0, h = 0;
 
 
@@ -2373,7 +2374,8 @@ namespace bs { namespace ct
 		return block;
 		return block;
 	}
 	}
 
 
-	void __stdcall openGlErrorCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, GLvoid *userParam)
+	void openGlErrorCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
+		const GLchar *message, GLvoid *userParam)
 	{
 	{
 		if (type != GL_DEBUG_TYPE_PERFORMANCE && type != GL_DEBUG_TYPE_OTHER)
 		if (type != GL_DEBUG_TYPE_PERFORMANCE && type != GL_DEBUG_TYPE_OTHER)
 		{
 		{

+ 2 - 2
Source/BansheeGLRenderAPI/BsGLRenderAPI.h

@@ -3,9 +3,9 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsRenderAPI.h"
+#include "RenderAPI/BsRenderAPI.h"
 #include "BsGLHardwareBufferManager.h"
 #include "BsGLHardwareBufferManager.h"
-#include "Glsl/BsGLSLProgramFactory.h"
+#include "GLSL/BsGLSLProgramFactory.h"
 #include "Math/BsMatrix4.h"
 #include "Math/BsMatrix4.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLRenderTexture.cpp

@@ -3,7 +3,7 @@
 #include "BsGLRenderTexture.h"
 #include "BsGLRenderTexture.h"
 #include "BsGLPixelFormat.h"
 #include "BsGLPixelFormat.h"
 #include "BsGLPixelBuffer.h"
 #include "BsGLPixelBuffer.h"
-#include "Renderapi/BsTextureView.h"
+#include "RenderAPI/BsTextureView.h"
 
 
 namespace bs
 namespace bs
 {
 {

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLSupport.h

@@ -4,7 +4,7 @@
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
 #include "BsGLRenderAPI.h"
 #include "BsGLRenderAPI.h"
-#include "Renderapi/BsRenderWindow.h"
+#include "RenderAPI/BsRenderWindow.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLTextureManager.cpp

@@ -1,7 +1,7 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 #include "BsGLTextureManager.h"
 #include "BsGLTextureManager.h"
-#include "Renderapi/BsRenderAPI.h"
+#include "RenderAPI/BsRenderAPI.h"
 #include "BsGLRenderTexture.h"
 #include "BsGLRenderTexture.h"
 #include "BsGLPixelFormat.h"
 #include "BsGLPixelFormat.h"
 
 

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLTextureView.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsTextureView.h"
+#include "RenderAPI/BsTextureView.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLTimerQuery.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsTimerQuery.h"
+#include "RenderAPI/BsTimerQuery.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 20 - 0
Source/BansheeGLRenderAPI/BsGLUtil.h

@@ -22,4 +22,24 @@ namespace bs { namespace ct
 	/** @} */
 	/** @} */
 }}
 }}
 
 
+#elif BS_PLATFORM == BS_PLATFORM_LINUX
+
+namespace bs { namespace ct
+	{
+		/** @addtogroup GL
+		 *  @{
+		 */
+
+		/**	Helper method that returns a platform specific GL support object. */
+		GLSupport* getGLSupport()
+		{
+			assert(false);
+
+			// TODOPORT - Not implemented
+			return nullptr;
+		}
+
+		/** @} */
+	}}
+
 #endif
 #endif

+ 2 - 2
Source/BansheeGLRenderAPI/BsGLVertexArrayObjectManager.cpp

@@ -2,8 +2,8 @@
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 #include "BsGLVertexArrayObjectManager.h"
 #include "BsGLVertexArrayObjectManager.h"
 #include "BsGLVertexBuffer.h"
 #include "BsGLVertexBuffer.h"
-#include "Renderapi/BsVertexDeclaration.h"
-#include "Glsl/BsGLSLGpuProgram.h"
+#include "RenderAPI/BsVertexDeclaration.h"
+#include "GLSL/BsGLSLGpuProgram.h"
 #include "BsGLHardwareBufferManager.h"
 #include "BsGLHardwareBufferManager.h"
 #include "Profiling/BsRenderStats.h"
 #include "Profiling/BsRenderStats.h"
 
 

+ 1 - 1
Source/BansheeGLRenderAPI/BsGLVertexBuffer.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsVertexBuffer.h"
+#include "RenderAPI/BsVertexBuffer.h"
 #include "BsGLBuffer.h"
 #include "BsGLBuffer.h"
 #include "BsGLVertexArrayObjectManager.h"
 #include "BsGLVertexArrayObjectManager.h"
 
 

+ 25 - 3
Source/BansheeGLRenderAPI/CMakeLists.txt

@@ -1,6 +1,21 @@
 # Source files and their filters
 # Source files and their filters
 include(CMakeSources.cmake)
 include(CMakeSources.cmake)
 
 
+# Find packages
+if(NOT WIN32)
+	find_package(X11 REQUIRED)
+	find_package(LibUUID REQUIRED)
+	find_package(OpenGL REQUIRED)
+
+	if(NOT X11_Xcursor_FOUND)
+		message(FATAL_ERROR "Could not find XCursor library.")
+	endif()
+
+	if(NOT X11_Xrandr_FOUND)
+		message(FATAL_ERROR "Could not find XRandR library.")
+	endif()
+endif()
+
 # Includes
 # Includes
 set(BansheeGLRenderAPI_INC 
 set(BansheeGLRenderAPI_INC 
 	"./" 
 	"./" 
@@ -11,6 +26,7 @@ set(BansheeGLRenderAPI_INC
 if(WIN32)
 if(WIN32)
 	set(BansheeGLRenderAPI_INC ${BansheeGLRenderAPI_INC} "Source/Win32")
 	set(BansheeGLRenderAPI_INC ${BansheeGLRenderAPI_INC} "Source/Win32")
 else()
 else()
+	set(BansheeGLRenderAPI_INC ${BansheeGLRenderAPI_INC} ${OPENGL_INCLUDE_DIR})
 # TODO_OTHER_PLATFORMS_GO_HERE
 # TODO_OTHER_PLATFORMS_GO_HERE
 endif()
 endif()
 	
 	
@@ -23,11 +39,17 @@ add_library(BansheeGLRenderAPI SHARED ${BS_BANSHEEGLRENDERAPI_SRC})
 target_compile_definitions(BansheeGLRenderAPI PRIVATE -DBS_RSGL_EXPORTS -DGLEW_STATIC)
 target_compile_definitions(BansheeGLRenderAPI PRIVATE -DBS_RSGL_EXPORTS -DGLEW_STATIC)
 
 
 # Libraries
 # Libraries
-## External lib: OpenGL
-target_link_libraries(BansheeGLRenderAPI glu32 opengl32)	
+if(WIN32)
+	## External lib: OpenGL
+	target_link_libraries(BansheeGLRenderAPI PRIVATE glu32 opengl32)
+else()
+	## External lib: OpenGL, X11, LibUUID
+	target_link_libraries(BansheeGLRenderAPI PRIVATE ${X11_LIBRARIES} ${X11_Xcursor_LIB} ${X11_Xrandr_LIB}
+        ${OPENGL_LIBRARIES} ${LibUUID_LIBRARIES})
+endif()
 
 
 ## Local libs
 ## Local libs
-target_link_libraries(BansheeGLRenderAPI BansheeUtility BansheeCore)
+target_link_libraries(BansheeGLRenderAPI PUBLIC BansheeUtility BansheeCore)
 
 
 # IDE specific
 # IDE specific
 set_property(TARGET BansheeGLRenderAPI PROPERTY FOLDER Plugins)
 set_property(TARGET BansheeGLRenderAPI PROPERTY FOLDER Plugins)

+ 6 - 4
Source/BansheeGLRenderAPI/GLSL/BsGLSLGpuProgram.cpp

@@ -1,12 +1,12 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#include "Glsl/BsGLSLGpuProgram.h"
-#include "Renderapi/BsRenderAPI.h"
+#include "GLSL/BsGLSLGpuProgram.h"
+#include "RenderAPI/BsRenderAPI.h"
 #include "Error/BsException.h"
 #include "Error/BsException.h"
-#include "Glsl/BsGLSLParamParser.h"
+#include "GLSL/BsGLSLParamParser.h"
 #include "Managers/BsHardwareBufferManager.h"
 #include "Managers/BsHardwareBufferManager.h"
 #include "Profiling/BsRenderStats.h"
 #include "Profiling/BsRenderStats.h"
-#include "Renderapi/BsGpuParams.h"
+#include "RenderAPI/BsGpuParams.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {
@@ -124,6 +124,8 @@ namespace bs { namespace ct
 			shaderType = GL_COMPUTE_SHADER;
 			shaderType = GL_COMPUTE_SHADER;
 			mProgramID = ++mComputeShaderCount;
 			mProgramID = ++mComputeShaderCount;
 			break;
 			break;
+		default:
+			break;
 		}
 		}
 
 
 		// Add preprocessor extras and main source
 		// Add preprocessor extras and main source

+ 1 - 1
Source/BansheeGLRenderAPI/GLSL/BsGLSLGpuProgram.h

@@ -3,7 +3,7 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsGpuProgram.h"
+#include "RenderAPI/BsGpuProgram.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 3 - 3
Source/BansheeGLRenderAPI/GLSL/BsGLSLParamParser.cpp

@@ -1,6 +1,6 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#include "Glsl/BsGLSLParamParser.h"
+#include "GLSL/BsGLSLParamParser.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {
@@ -566,14 +566,14 @@ namespace bs { namespace ct
 				GpuParamDataDesc& structDesc = foundStructs[structName];
 				GpuParamDataDesc& structDesc = foundStructs[structName];
 
 
 				assert(gpuParam.cpuMemOffset >= structDesc.cpuMemOffset);
 				assert(gpuParam.cpuMemOffset >= structDesc.cpuMemOffset);
-				if (arrayIdx == firstArrayIndex) // Determine element size only using the first array element
+				if (arrayIdx == (UINT32)firstArrayIndex) // Determine element size only using the first array element
 				{
 				{
 					structDesc.elementSize = std::max(structDesc.elementSize, (gpuParam.cpuMemOffset - structDesc.cpuMemOffset) + gpuParam.arrayElementStride * gpuParam.arraySize);
 					structDesc.elementSize = std::max(structDesc.elementSize, (gpuParam.cpuMemOffset - structDesc.cpuMemOffset) + gpuParam.arrayElementStride * gpuParam.arraySize);
 					structDesc.arrayElementStride = structDesc.elementSize;
 					structDesc.arrayElementStride = structDesc.elementSize;
 				}
 				}
 
 
 				// New array element reached, determine arrayElementStride
 				// New array element reached, determine arrayElementStride
-				if (arrayIdx != firstArrayIndex)
+				if (arrayIdx != (UINT32)firstArrayIndex)
 				{
 				{
 					UINT32 numElements = arrayIdx - firstArrayIndex;
 					UINT32 numElements = arrayIdx - firstArrayIndex;
 					structDesc.arrayElementStride = (gpuParam.cpuMemOffset - structDesc.cpuMemOffset) / numElements;
 					structDesc.arrayElementStride = (gpuParam.cpuMemOffset - structDesc.cpuMemOffset) / numElements;

+ 2 - 2
Source/BansheeGLRenderAPI/GLSL/BsGLSLParamParser.h

@@ -3,10 +3,10 @@
 #pragma once
 #pragma once
 
 
 #include "BsGLPrerequisites.h"
 #include "BsGLPrerequisites.h"
-#include "Renderapi/BsVertexDeclaration.h"
+#include "RenderAPI/BsVertexDeclaration.h"
 #include "Debug/BsDebug.h"
 #include "Debug/BsDebug.h"
 #include "Error/BsException.h"
 #include "Error/BsException.h"
-#include "Renderapi/BsGpuParamDesc.h"
+#include "RenderAPI/BsGpuParamDesc.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 2 - 2
Source/BansheeGLRenderAPI/GLSL/BsGLSLProgramFactory.cpp

@@ -1,7 +1,7 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#include "Glsl/BsGLSLProgramFactory.h"
-#include "Glsl/BsGLSLGpuProgram.h"
+#include "GLSL/BsGLSLProgramFactory.h"
+#include "GLSL/BsGLSLGpuProgram.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct
 {
 {

+ 2 - 2
Source/BansheeGLRenderAPI/GLSL/BsGLSLProgramPipelineManager.cpp

@@ -1,7 +1,7 @@
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
 //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
-#include "Glsl/BsGLSLProgramPipelineManager.h"
-#include "Glsl/BsGLSLGpuProgram.h"
+#include "GLSL/BsGLSLProgramPipelineManager.h"
+#include "GLSL/BsGLSLGpuProgram.h"
 #include "Profiling/BsRenderStats.h"
 #include "Profiling/BsRenderStats.h"
 
 
 namespace bs { namespace ct
 namespace bs { namespace ct

+ 1 - 1
Source/BansheeMono/BsMonoAssembly.cpp

@@ -291,7 +291,7 @@ namespace bs
 					void* iter = nullptr;
 					void* iter = nullptr;
 					do
 					do
 					{
 					{
-						::MonoClass* rawNestedClass = rawNestedClass = mono_class_get_nested_types(curNestedClass->_getInternalClass(), &iter);
+						::MonoClass* rawNestedClass = mono_class_get_nested_types(curNestedClass->_getInternalClass(), &iter);
 						if (rawNestedClass == nullptr)
 						if (rawNestedClass == nullptr)
 							break;
 							break;
 
 

+ 1 - 1
Source/BansheeMono/BsMonoManager.cpp

@@ -341,7 +341,7 @@ namespace bs
 #if BS_PLATFORM == BS_PLATFORM_WIN32
 #if BS_PLATFORM == BS_PLATFORM_WIN32
 		compilerPath.append("mcs.exe");
 		compilerPath.append("mcs.exe");
 #else
 #else
-		static_assert(false, "Not implemented");
+		compilerPath.append("mcs");
 #endif
 #endif
 
 
 		return compilerPath;
 		return compilerPath;

+ 5 - 3
Source/BansheeMono/CMakeLists.txt

@@ -1,13 +1,15 @@
 # Source files and their filters
 # Source files and their filters
 include(CMakeSources.cmake)
 include(CMakeSources.cmake)
 
 
+# Find packages
+find_package(mono)
+
 # Includes
 # Includes
 set(BansheeMono_INC 
 set(BansheeMono_INC 
 	"./" 
 	"./" 
 	"../BansheeUtility" 
 	"../BansheeUtility" 
 	"../BansheeCore"
 	"../BansheeCore"
-	"../BansheeEngine"
-	"../../Dependencies/Mono/include")
+	"../BansheeEngine")
 
 
 include_directories(${BansheeMono_INC})	
 include_directories(${BansheeMono_INC})	
 
 
@@ -19,7 +21,7 @@ target_compile_definitions(BansheeMono PRIVATE -DBS_MONO_EXPORTS)
 
 
 # Libraries
 # Libraries
 ## External lib: Mono
 ## External lib: Mono
-add_library_per_config(BansheeMono mono Release/mono-2.0 Debug/mono-2.0)
+target_link_libraries(BansheeMono PRIVATE ${mono_LIBRARIES})
 
 
 ## Local libs
 ## Local libs
 target_link_libraries(BansheeMono PUBLIC BansheeEngine BansheeUtility BansheeCore)
 target_link_libraries(BansheeMono PUBLIC BansheeEngine BansheeUtility BansheeCore)

Некоторые файлы не были показаны из-за большого количества измененных файлов