ソースを参照

Feature: Linux is now a fully supported platform
- There are still minor things to test, and iron out potential problems with different Linux distros, but all major features have been tested and are working

Marko Pintera 8 年 前
コミット
af46409c10

+ 2 - 2
Documentation/GitHub/compiling.md

@@ -39,8 +39,8 @@ Variety of *CMake* variables are provided that allow you to customize the build:
  
 You can choose to use a different *CMake* generator than those specified above, as long as the platform/compiler is supported:  
   - Supported platforms:
-    - Windows
-    - (Mac & Linux coming soon)
+    - Windows, Linux
+    - (macOS coming soon)
   - Supported compilers:
     - MSVC++ 14.0 (Visual Studio 2015)
 	- MSVC++ 15.0 (Visual Studio 2017)

+ 5 - 5
Documentation/GitHub/features.md

@@ -5,12 +5,12 @@ All features listed here are the ones currently available (implemented). If you
 ---------------------------------------------------  
   
 ## Core
-* __Quality design__
-  * Modern code using C++14
+* __General__
+  * Modern C++14 code
   * Clean layered design
-  * Fully documented
   * Modular & plugin based
-  * Multiplatform ready
+  * Fully documented
+  * Platforms: Windows, Linux
 * __Renderer__
   * Vulkan, DX11 and OpenGL 4.5 render backends
   * Multi-threaded rendering
@@ -190,4 +190,4 @@ All features listed here are the ones currently available (implemented). If you
   * Automatically packages and outputs an executable
 * __Customizable frontend__
   * Dockable layout and floating windows
-  * Custom GUI skin & localization support
+  * Custom GUI skin & localization support

+ 2 - 0
Documentation/GitHub/install.md

@@ -1,5 +1,7 @@
 # Binaries
 
+**WARNING: Provided binaries are very out of date. If you want the latest changes you should compile from source. New binary releases are coming after the first stable version is complete.**
+
 Banshee is still in development and does not yet come with a proper installer. You will need to extract the downloaded files manually. The platform support is currently limited to Windows only, but more platforms are coming in near future.
 
 Before running the editor make sure to install VS2015 redistributables: 

+ 6 - 10
Documentation/GitHub/roadmap.md

@@ -1,26 +1,26 @@
 # Roadmap
 
 Remaining v1.0 features (in order):
- - Linux/Mac ports (Planned for Q4 2017)
+ - macOS port (Planned for Q4 2017)
  - v1.0 BETA release (Early 2018)
  
 ---------------------------------------------------
 
-Post v1.0 features (in no specific order): 
+Post v1.0 features (in rough order): 
  - Sprites & 2D rendering
+ - Effects/Particle editor
+ - Terrain system
+ - High level networking (replication, RPCs, RakNet integration)
+ - AI (pathfinding, navmesh, Recast/Detour integration)
  - 2D physics (Box2D or Chipmunk integration)
  - 2D animation (basic sprite animation, Spine and/or Spriter)
  - Mobile render API (likely Vulkan, possibly Metal for iOS)
  - Android/iOS/WP ports
  - Occlussion culling
- - High level networking (replication, RPCs, RakNet integration)
- - Effects/Particle editor
- - Terrain system
  - Visual GUI editor 
  
 And more to come after that:
  - Dynamic global illumination (+ other high fidelity graphical improvements)
- - AI (pathfinding, navmesh, Recast/Detour integration)
  - VR support
  - Cinematics editor
  - Visual shader editor
@@ -34,7 +34,3 @@ And more to come after that:
  - And more to be decided later...
  
 Implementation times for each of those roughly ranges from 1-4 months.
-
----------------------------------------------------
-
-[Detailed task list](https://trello.com/b/w6CyYY37/banshee-3d)

+ 2 - 0
README.md

@@ -9,6 +9,8 @@ The scripting system supports C# and comes with an extensive API ensuring you ca
 
 Aside from being a fully featured game engine and toolkit, Banshee can also be used as a **low level framework**, providing a powerful foundation to build new technologies with or to easily customize the engine for game specific needs. Layered and plugin based design allows developers to use only the functionality they need, and to fully remove or replace major engine systems. Banshee's code is modern, with clean interfaces that make it easy to learn and maintain. Platform specific functionality is kept at a minimum making porting as easy as possible. It is fully documented with an extensive API reference, as well as a set of manuals introducing you to most major systems.
 
+**WARNING: Banshee is still in development and should not be used in production.**
+
 # Features
 * [Features](https://github.com/BearishSun/BansheeEngine/blob/master/Documentation/GitHub/features.md) - A list of all currently available features.
 * [Roadmap](https://github.com/BearishSun/BansheeEngine/blob/master/Documentation/GitHub/roadmap.md) - A list of features to be implemented in both near and far future. 

+ 1 - 1
Source/BansheeCore/Linux/BsLinuxPlatform.cpp

@@ -662,7 +662,7 @@ namespace bs
 		char* commandStr = (char*)bs_stack_alloc((UINT32)pathString.size() + (UINT32)strlen(commandPattern) + 1);
 		sprintf(commandStr, commandPattern, pathString.c_str());
 
-		system(commandStr);
+		(void)system(commandStr);
 		bs_stack_free(commandStr);
 	}
 

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

@@ -892,9 +892,9 @@ namespace bs
 					{
 						UINT32 arrayOffset = i * paramSize;
 						memcpy(&temp, data + arrayOffset, paramSize);
-						temp = temp.transpose();
+						auto transposed = temp.transpose();
 
-						paramBlock->write((paramInfo.offset + arrayOffset) * sizeof(UINT32), &temp, paramSize);
+						paramBlock->write((paramInfo.offset + arrayOffset) * sizeof(UINT32), &transposed, paramSize);
 					}
 				};
 

+ 1 - 1
Source/BansheeCore/Material/BsMaterialParam.cpp

@@ -56,7 +56,7 @@ namespace bs
 	template<class T, bool Core>
 	T TMaterialDataParam<T, Core>::get(UINT32 arrayIdx) const
 	{
-		T output = T();
+		T output{};
 		if (mMaterial == nullptr || arrayIdx >= mArraySize)
 			return output;
 

+ 2 - 6
Source/BansheeCore/RenderAPI/BsGpuParam.cpp

@@ -46,7 +46,7 @@ namespace bs
 		bool transposeMatrices = ct::RenderAPI::instance().getAPIInfo().isFlagSet(RenderAPIFeatureFlag::ColumnMajorMatrices);
 		if (TransposePolicy<T>::transposeEnabled(transposeMatrices))
 		{
-			T transposed = TransposePolicy<T>::transpose(value);
+			auto transposed = TransposePolicy<T>::transpose(value);
 			paramBlock->write((mParamDesc->cpuMemOffset + arrayIdx * mParamDesc->arrayElementStride) * sizeof(UINT32), &transposed, sizeBytes);
 		}
 		else
@@ -86,11 +86,7 @@ namespace bs
 		T value;
 		paramBlock->read((mParamDesc->cpuMemOffset + arrayIdx * mParamDesc->arrayElementStride) * sizeof(UINT32), &value, sizeBytes);
 
-		bool transposeMatrices = ct::RenderAPI::instance().getAPIInfo().isFlagSet(RenderAPIFeatureFlag::ColumnMajorMatrices);
-		if (TransposePolicy<T>::transposeEnabled(transposeMatrices))
-			return TransposePolicy<T>::transpose(value);
-		else
-			return value;
+		return value;
 	}
 
 	template<bool Core>

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

@@ -70,7 +70,7 @@ namespace bs
 	template<int N, int M>
 	struct TransposePolicy<MatrixNxM<N, M>>
 	{
-		static MatrixNxM<N, M> transpose(const MatrixNxM<N, M>& value) { return value.transpose(); }
+		static MatrixNxM<M, N> transpose(const MatrixNxM<N, M>& value) { return value.transpose(); }
 		static bool transposeEnabled(bool enabled) { return enabled; }
 	};
 

+ 2 - 6
Source/BansheeCore/Renderer/BsParamBlocks.cpp

@@ -27,7 +27,7 @@ namespace bs { namespace ct
 		bool transposeMatrices = RenderAPI::instance().getAPIInfo().isFlagSet(RenderAPIFeatureFlag::ColumnMajorMatrices);
 		if (TransposePolicy<T>::transposeEnabled(transposeMatrices))
 		{
-			T transposed = TransposePolicy<T>::transpose(value);
+			auto transposed = TransposePolicy<T>::transpose(value);
 			paramBlock->write((mParamDesc.cpuMemOffset + arrayIdx * mParamDesc.arrayElementStride) * sizeof(UINT32), 
 				&transposed, sizeBytes);
 		}
@@ -63,11 +63,7 @@ namespace bs { namespace ct
 		paramBlock->read((mParamDesc.cpuMemOffset + arrayIdx * mParamDesc.arrayElementStride) * sizeof(UINT32), &value, 
 			sizeBytes);
 
-		bool transposeMatrices = RenderAPI::instance().getAPIInfo().isFlagSet(RenderAPIFeatureFlag::ColumnMajorMatrices);
-		if (TransposePolicy<T>::transposeEnabled(transposeMatrices))
-			return TransposePolicy<T>::transpose(value);
-		else
-			return value;
+		return value;
 	}
 
 	template class ParamBlockParam<float>;

+ 2 - 0
Source/BansheeEditor/SceneView/BsScenePicking.cpp

@@ -489,6 +489,8 @@ namespace bs
 			result.depth = depth;
 			result.normal = Vector3((normal.r * 2) - 1, (normal.g * 2) - 1, (normal.b * 2) - 1);
 		}
+		else
+			result.depth = 0;
 
 		mPickingTexture = nullptr;
 		

+ 2 - 2
Source/BansheeFBXImporter/BsFBXImporter.cpp

@@ -1167,7 +1167,7 @@ namespace bs
 
 			for (UINT32 i = 0; i < polygonCount; i++)
 			{
-				TNative value;
+				TNative value{};
 				indexer.get(i, value);
 
 				output[index++] = value;
@@ -1178,7 +1178,7 @@ namespace bs
 			break;
 		case FbxLayerElement::eAllSame:
 		{
-			TNative value;
+			TNative value{};
 			indexer.get(0, value);
 
 			for (UINT32 i = 0; i < indexCount; i++)

+ 3 - 3
Source/BansheeUtility/Math/BsMatrixNxM.h

@@ -30,13 +30,13 @@ namespace bs
 		}
 
 		/** Returns a transpose of the matrix (switched columns and rows). */
-		MatrixNxM<N, M> transpose() const
+		MatrixNxM<M, N> transpose() const
 		{
-			MatrixNxM<N, M> matTranspose;
+			MatrixNxM<M, N> matTranspose;
 			for (UINT32 row = 0; row < N; row++)
 			{
 				for (UINT32 col = 0; col < M; col++)
-					matTranspose[row][col] = m[col][row];
+					matTranspose[col][row] = m[row][col];
 			}
 
 			return matTranspose;

+ 1 - 1
Source/BansheeUtility/String/BsUnicode.cpp

@@ -333,7 +333,7 @@ namespace bs
 		auto iter = input.begin();
 		while(iter != input.end())
 		{
-			char32_t u32char;
+			char32_t u32char = 0;
 			iter = UTF16To32(iter, input.end(), u32char);
 			UTF32To8(u32char, backInserter, 4);
 		}

+ 8 - 2
Source/CMake/Common.cmake

@@ -157,8 +157,14 @@ function(update_binary_deps DEP_VERSION)
 	# Clean and create a temporary folder
 	execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/../Temp)	
 	execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/../Temp)	
-	
-	set(BINARY_DEPENDENCIES_URL http://data.banshee3d.com/BansheeDependencies_VS2015_Master_${DEP_VERSION}.zip)
+
+	if(WIN32)
+		set(DEP_TYPE VS2015)
+	elseif(LINUX)
+		set(DEP_TYPE Linux)
+	endif()
+
+	set(BINARY_DEPENDENCIES_URL http://data.banshee3d.com/BansheeDependencies_${DEP_TYPE}_Master_${DEP_VERSION}.zip)
 	file(DOWNLOAD ${BINARY_DEPENDENCIES_URL} ${PROJECT_SOURCE_DIR}/../Temp/Dependencies.zip 
 		SHOW_PROGRESS
 		STATUS DOWNLOAD_STATUS)

+ 10 - 12
Source/CMakeLists.txt

@@ -67,20 +67,18 @@ include(CMake/Common.cmake)
 
 # Ensure dependencies are up to date
 ## Check prebuilt dependencies that are downloaded in a .zip
-if(WIN32)
-	set(BUILTIN_DEP_VERSION_FILE ${PROJECT_SOURCE_DIR}/../Dependencies/.version)
-	if(NOT EXISTS ${BUILTIN_DEP_VERSION_FILE})
-		message(STATUS "Binary dependencies are missing. Downloading package...")
-		update_binary_deps(${BS_PREBUILT_DEPENDENCIES_VERSION})	
-	else()
-		file (STRINGS ${BUILTIN_DEP_VERSION_FILE} CURRENT_BUILTIN_DEP_VERSION)
-		if(${BS_PREBUILT_DEPENDENCIES_VERSION} GREATER ${CURRENT_BUILTIN_DEP_VERSION})
-			message(STATUS "Your precomiled dependencies package is out of date. Downloading latest package...")
-			update_binary_deps(${BS_PREBUILT_DEPENDENCIES_VERSION})
-		endif()
+set(BUILTIN_DEP_VERSION_FILE ${PROJECT_SOURCE_DIR}/../Dependencies/.version)
+if(NOT EXISTS ${BUILTIN_DEP_VERSION_FILE})
+	message(STATUS "Binary dependencies are missing. Downloading package...")
+	update_binary_deps(${BS_PREBUILT_DEPENDENCIES_VERSION})
+else()
+	file (STRINGS ${BUILTIN_DEP_VERSION_FILE} CURRENT_BUILTIN_DEP_VERSION)
+	if(${BS_PREBUILT_DEPENDENCIES_VERSION} GREATER ${CURRENT_BUILTIN_DEP_VERSION})
+		message(STATUS "Your precomiled dependencies package is out of date. Downloading latest package...")
+		update_binary_deps(${BS_PREBUILT_DEPENDENCIES_VERSION})
 	endif()
 endif()
-	
+
 ## Check dependencies built from source
 if(WIN32)
 	set(SOURCE_DEP_BUILD_DIR ${PROJECT_SOURCE_DIR}/../Dependencies/Build)

+ 5 - 5
Source/Game/CMakeLists.txt

@@ -30,8 +30,8 @@ if(WIN32)
 			TARGET Game POST_BUILD
 			COMMAND xcopy /Y /I \"$(TargetDir)$(TargetName).exe\" \"$(SolutionDir)..\\..\\Data\\Binaries\\${BS_COPY_FOLDER}\\\")
 	else()
-		set(SRC_FILE ${BS_BINARY_OUTPUT_DIR}/Game)
-		set(DST_FOLDER ../${PROJECT_SOURCE_DIR}/Data/Binaries/${BS_COPY_FOLDER})
+		set(SRC_FILE ${BS_BINARY_OUTPUT_DIR}/${CMAKE_BUILD_TYPE}/Game)
+		set(DST_FOLDER ${PROJECT_SOURCE_DIR}/../Data/Binaries/${BS_COPY_FOLDER})
 		add_custom_command(TARGET Game POST_BUILD COMMAND xcopy /Y /I ${SRC_FILE} ${DST_FOLDER})
 	endif()
 
@@ -42,12 +42,12 @@ elseif(LINUX)
 		set(BS_COPY_FOLDER Linux32)
 	endif()
 
-	set(SRC_FILE ${BS_BINARY_OUTPUT_DIR}/Game)
-	set(DST_FOLDER ../${PROJECT_SOURCE_DIR}/Data/Binaries/${BS_COPY_FOLDER})
+	set(SRC_FILE ${BS_BINARY_OUTPUT_DIR}/${CMAKE_BUILD_TYPE}/Game)
+	set(DST_FOLDER ${PROJECT_SOURCE_DIR}/../Data/Binaries/${BS_COPY_FOLDER})
 	add_custom_command(
 		TARGET Game POST_BUILD
 		COMMAND rm -rf ${DST_FOLDER}
-		COMMAND mkdir ${DST_FOLDER}
+		COMMAND mkdir -p ${DST_FOLDER}
 		COMMAND cp ${SRC_FILE} ${DST_FOLDER})
 else()
 # TODO_OTHER_PLATFORMS_GO_HERE

+ 2 - 2
Source/SBansheeEngine/Wrappers/BsScriptSceneObject.cpp

@@ -297,7 +297,7 @@ namespace bs
 		if (!checkIfDestroyed(nativeInstance))
 			*value = nativeInstance->mSceneObject->getLocalMatrix();
 		else
-			*value = Matrix4();
+			*value = Matrix4(BsIdentity);
 	}
 
 	void ScriptSceneObject::internal_getWorldTransform(ScriptSceneObject* nativeInstance, Matrix4* value)
@@ -305,7 +305,7 @@ namespace bs
 		if (!checkIfDestroyed(nativeInstance))
 			*value = nativeInstance->mSceneObject->getWorldMatrix();
 		else
-			*value = Matrix4();
+			*value = Matrix4(BsIdentity);
 	}
 
 	void ScriptSceneObject::internal_lookAt(ScriptSceneObject* nativeInstance, Vector3* direction, Vector3* up)