Procházet zdrojové kódy

Merge branch 'next' of https://github.com/blackberry/GamePlay into next

Karim Ahmed před 12 roky
rodič
revize
28d47a264b

+ 2 - 1
README.md

@@ -19,7 +19,8 @@ GamePlay3D is an open-source, cross-platform 3D native C++ game framework making
 - [Google Android](https://github.com/blackberry/GamePlay/wiki/Android-NDK-Setup) (using Google Android NDK)
 
 ## Roadmap for 'next' branch
-- [backlog](https://github.com/blackberry/GamePlay/issues?milestone=7)
+- [2.0.0](https://github.com/blackberry/GamePlay/issues?milestone=6&page=1&state=open)
+- [backlog](https://github.com/blackberry/GamePlay/issues?milestone=5&page=1&state=open)
 
 ## License
 The project is open sourced under the [Apache 2.0 license](http://www.tldrlegal.com/license/apache-license-2.0-%28apache-2.0%29).

+ 2 - 1
install.bat

@@ -34,11 +34,12 @@ cd %~dp0
 >> temp.cs ECHO         try
 >> temp.cs ECHO         {
 >> temp.cs ECHO             WebClient client = new WebClient();
+>> temp.cs ECHO             client.Proxy = null;
 >> temp.cs ECHO             client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressChanged);
 >> temp.cs ECHO             client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadFileCompleted);
 >> temp.cs ECHO             Console.Write("Downloading " + url + ": 0%%    ");
 >> temp.cs ECHO             client.DownloadFileAsync(new Uri(url), file);
->> temp.cs ECHO             while (!done) System.Threading.Thread.Sleep(1000);
+>> temp.cs ECHO             while (!done) System.Threading.Thread.Sleep(500);
 >> temp.cs ECHO         }
 >> temp.cs ECHO         catch (Exception x)
 >> temp.cs ECHO         {

+ 1 - 1
samples/browser/src/LightSample.cpp

@@ -306,7 +306,7 @@ void LightSample::controlEvent(Control* control, EventType evt)
 		break;
 	}
 
-	if (changeTechnique)
+	if (_lighting && changeTechnique)
 	{
 		if (_noLight->isSelected())
 		{

+ 2 - 2
tools/encoder/CMakeLists.txt

@@ -1,7 +1,7 @@
 
 include_directories( 
     ${CMAKE_SOURCE_DIR}/external-deps/zlib/include
-    ${CMAKE_SOURCE_DIR}/external-deps/libpng/include
+    ${CMAKE_SOURCE_DIR}/external-deps/png/include
     ${CMAKE_SOURCE_DIR}/external-deps/freetype2/include
     /usr/include/fbxsdk
     /usr/include
@@ -12,7 +12,7 @@ add_definitions(-D__linux__ -DNO_BOOST -DNO_ZAE -DUSE_FBX)
 
 link_directories(
     ${CMAKE_SOURCE_DIR}/external-deps/zlib/lib/linux/${ARCH_DIR}
-    ${CMAKE_SOURCE_DIR}/external-deps/libpng/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/png/lib/linux/${ARCH_DIR}
     ${CMAKE_SOURCE_DIR}/external-deps/freetype2/lib/linux/${ARCH_DIR}
     /usr/lib/gcc4/${ARCH_DIR}/release
     /usr/lib

+ 2 - 2
tools/encoder/README.md

@@ -2,7 +2,7 @@
 Command-line tool for encoding games assets like true-type fonts and 3D scene files
 into a simple binary-based bundle file format for the gameplay 3D game framework runtime. 
 The 'bin' folder contains pre-built versions of the gameplay-encoder executables for 
-Windows 7, MacOS X and Linux Ubuntu 12 (32-bit) with support built-in support for:
+Windows 7, MacOS X and Linux Ubuntu (32-bit) with support built-in support for:
 
 ## TrueType Font
 TrueType Fonts represent a standard in defining outline fonts and has become the 
@@ -21,7 +21,7 @@ Simply execute the gameplay-encoder command-line executable:
 
 `Usage: gameplay-encoder [options] <file(s)>`
 
-Note: On Linux Ubuntu 12 (64-bit), you must first install the required 32-bit libs via:
+Note: On Linux Ubuntu (64-bit), you must first install the required 32-bit libs via:
 
 `sudo apt-get install ia32-libs`
 

+ 6 - 6
tools/encoder/gameplay-encoder.vcxproj

@@ -158,15 +158,15 @@
       <WarningLevel>Level4</WarningLevel>
       <Optimization>Disabled</Optimization>
       <PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=2;USE_FBX;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NO_BOOST;NO_ZAE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.1/include;../../external-deps/freetype2/include;../../external-deps/libpng/include;../../external-deps/zlib/include</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.1/include;../../external-deps/freetype2/include;../../external-deps/png/include;../../external-deps/zlib/include</AdditionalIncludeDirectories>
       <DisableLanguageExtensions>
       </DisableLanguageExtensions>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalLibraryDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.1/lib/vs2012/x86/debug;../../external-deps/freetype2/lib/windows/x86;../../external-deps/libpng/lib/windows/x86;../../external-deps/zlib/lib/windows/x86</AdditionalLibraryDirectories>
-      <AdditionalDependencies>libfbxsdk-md.lib;freetype245.lib;libpng14.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.1/lib/vs2012/x86/debug;../../external-deps/freetype2/lib/windows/x86;../../external-deps/png/lib/windows/x86;../../external-deps/zlib/lib/windows/x86</AdditionalLibraryDirectories>
+      <AdditionalDependencies>libfbxsdk-md.lib;freetype245.lib;libpng.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <IgnoreSpecificDefaultLibraries>MSVCRT</IgnoreSpecificDefaultLibraries>
     </Link>
     <PostBuildEvent>
@@ -183,15 +183,15 @@
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=0;USE_FBX;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;NO_BOOST;NO_ZAE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.1/include;../../external-deps/freetype2/include;../../external-deps/libpng/include;../../external-deps/zlib/include</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.1/include;../../external-deps/freetype2/include;../../external-deps/png/include;../../external-deps/zlib/include</AdditionalIncludeDirectories>
     </ClCompile>
     <Link>
       <SubSystem>Console</SubSystem>
       <GenerateDebugInformation>true</GenerateDebugInformation>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
       <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>libfbxsdk-md.lib;freetype245.lib;libpng14.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.1/lib/vs2012/x86/release;../../external-deps/freetype2/lib/windows/x86;../../external-deps/libpng/lib/windows/x86;../../external-deps/zlib/lib/windows/x86</AdditionalLibraryDirectories>
+      <AdditionalDependencies>libfbxsdk-md.lib;freetype245.lib;libpng.lib;zlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>C:/Program Files/Autodesk/FBX/FBX SDK/2014.1/lib/vs2012/x86/release;../../external-deps/freetype2/lib/windows/x86;../../external-deps/png/lib/windows/x86;../../external-deps/zlib/lib/windows/x86</AdditionalLibraryDirectories>
       <IgnoreSpecificDefaultLibraries>
       </IgnoreSpecificDefaultLibraries>
     </Link>

+ 9 - 9
tools/encoder/gameplay-encoder.xcodeproj/project.pbxproj

@@ -171,7 +171,7 @@
 		42C8EE3A1472DAAE00E43619 /* libbz2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbz2.dylib; path = usr/lib/libbz2.dylib; sourceTree = SDKROOT; };
 		42D277571472EFA700D867A4 /* libpcre.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpcre.a; path = "../external-deps/pcre/lib/macosx/libpcre.a"; sourceTree = "<group>"; };
 		42D277581472EFA700D867A4 /* libpcrecpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpcrecpp.a; path = "../external-deps/pcre/lib/macosx/libpcrecpp.a"; sourceTree = "<group>"; };
-		5BCD0642152CFC3C0071FAB5 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../external-deps/libpng/lib/macosx/libpng.a"; sourceTree = "<group>"; };
+		5BCD0642152CFC3C0071FAB5 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../external-deps/png/lib/macosx/libpng.a"; sourceTree = "<group>"; };
 		B661733D16A61CE40083A307 /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Image.cpp; path = src/Image.cpp; sourceTree = SOURCE_ROOT; };
 		B661733E16A61CE40083A307 /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Image.h; path = src/Image.h; sourceTree = SOURCE_ROOT; };
 		B661734116A61CFA0083A307 /* NormalMapGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NormalMapGenerator.cpp; path = src/NormalMapGenerator.cpp; sourceTree = SOURCE_ROOT; };
@@ -483,7 +483,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				HEADER_SEARCH_PATHS = (
 					"\"$(SRCROOT)/../../external-deps/freetype2/include\"",
-					"\"$(SRCROOT)/../../external-deps/libpng/include\"",
+					"\"$(SRCROOT)/../../external-deps/png/include\"",
 					"\"/Applications/Autodesk/FBX SDK/2014.1/include\"",
 				);
 				INFOPLIST_PREPROCESSOR_DEFINITIONS = "";
@@ -492,7 +492,7 @@
 				OTHER_TEST_FLAGS = "";
 				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = "../external-deps/freetype/include ./external-deps/libpng/include";
+				USER_HEADER_SEARCH_PATHS = "../external-deps/freetype/include ./external-deps/png/include";
 				WARNING_CFLAGS = "";
 			};
 			name = Debug;
@@ -519,7 +519,7 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				HEADER_SEARCH_PATHS = (
 					"\"$(SRCROOT)/../../external-deps/freetype2/include\"",
-					"\"$(SRCROOT)/../../external-deps/libpng/include\"",
+					"\"$(SRCROOT)/../../external-deps/png/include\"",
 					"\"/Applications/Autodesk/FBX SDK/2014.1/include\"",
 				);
 				INFOPLIST_PREPROCESSOR_DEFINITIONS = "";
@@ -527,7 +527,7 @@
 				OTHER_TEST_FLAGS = "";
 				PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO;
 				SDKROOT = macosx;
-				USER_HEADER_SEARCH_PATHS = "../external-deps/freetype/include ./external-deps/libpng/include";
+				USER_HEADER_SEARCH_PATHS = "../external-deps/freetype/include ./external-deps/png/include";
 				WARNING_CFLAGS = "";
 			};
 			name = Release;
@@ -549,13 +549,13 @@
 					"$(inherited)",
 					"\"$(SRCROOT)/../../external-deps/freetype2/lib/macosx\"",
 					"\"$(SRCROOT)/../../external-deps/pcre/lib/macosx\"",
-					"\"$(SRCROOT)/../../external-deps/libpng/lib/macosx\"",
+					"\"$(SRCROOT)/../../external-deps/png/lib/macosx\"",
 					"\"$(SRCROOT)\"",
 					"\"$(SYSTEM_APPS_DIR)/Autodesk/FBX SDK/2014.1/lib/gcc4/ub/debug\"",
 				);
 				MACH_O_TYPE = mh_execute;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = "../external-deps/freetype2/include ../external-deps/libpng/include";
+				USER_HEADER_SEARCH_PATHS = "../external-deps/freetype2/include ../external-deps/png/include";
 			};
 			name = Debug;
 		};
@@ -576,14 +576,14 @@
 					"$(inherited)",
 					"\"$(SRCROOT)/../../external-deps/freetype2/lib/macosx\"",
 					"\"$(SRCROOT)/../../external-deps/pcre/lib/macosx\"",
-					"\"$(SRCROOT)/../../external-deps/libpng/lib/macosx\"",
+					"\"$(SRCROOT)/../../external-deps/png/lib/macosx\"",
 					"\"$(SRCROOT)\"",
 					"\"$(SYSTEM_APPS_DIR)/Autodesk/FBX SDK/2014.1/lib/gcc4/ub/release\"",
 					"\"$(SYSTEM_APPS_DIR)/Autodesk/FBX SDK/2014.1/lib/gcc4/ub/debug\"",
 				);
 				MACH_O_TYPE = mh_execute;
 				PRODUCT_NAME = "$(TARGET_NAME)";
-				USER_HEADER_SEARCH_PATHS = "../external-deps/freetype2/include ../external-deps/libpng/include";
+				USER_HEADER_SEARCH_PATHS = "../external-deps/freetype2/include ../external-deps/png/include";
 			};
 			name = Release;
 		};

+ 0 - 2
tools/encoder/src/Font.cpp

@@ -44,10 +44,8 @@ void Font::writeText(FILE* file)
     fprintfElement(file, "style", style);
     fprintfElement(file, "size", size);
     fprintfElement(file, "alphabet", charset);
-    //fprintfElement(file, "glyphs", glyphs);
     fprintfElement(file, "texMapWidth", texMapWidth);
     fprintfElement(file, "texMapHeight", texMapHeight);
-    //fprintfElement(file, "texMap", texMap);
     fprintElementEnd(file);
 }
 

+ 0 - 9
tools/encoder/src/TTFFontEncoder.cpp

@@ -70,15 +70,6 @@ int writeFont(const char* inFilePath, const char* outFilePath, unsigned int font
         return -1;
     }
 
-    /* 
-    error = FT_Set_Pixel_Sizes(face, FONT_SIZE, 0);
-    if (error)
-    {
-        LOG(1, "FT_Set_Pixel_Sizes error : %d \n", error);
-        exit(1);
-    }
-    */
-
     // Save glyph information (slot contains the actual glyph bitmap).
     FT_GlyphSlot slot = face->glyph;