Răsfoiți Sursa

Merge pull request #1388 from blackberry/master

Merge master to next
Sean Taylor 12 ani în urmă
părinte
comite
bb90215371

+ 3 - 0
.gitattributes

@@ -23,11 +23,14 @@
 *.xml text
 *.md text
 *.sh text
+*.project text
+*.cproject text
 
 # Declare windows files that will always have CRLF line endings on checkout.
 *.sln text eol=crlf
 *.vcxproj text eol=crlf
 *.vcxproj.filters text eol=crlf
+.vsxproj.user text eol=crlf
 *.bat text eol=crlf
 
 # Denote all files that are truly binary and should not be modified.

+ 1 - 1
gameplay/src/PlatformAndroid.cpp

@@ -325,7 +325,7 @@ static bool initEGL()
     {
         // Disable VAO extension for now.
         glBindVertexArray = (PFNGLBINDVERTEXARRAYOESPROC)eglGetProcAddress("glBindVertexArrayOES");
-        glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSOESPROC)eglGetProcAddress("glDeleteVertexArrays");
+        glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSOESPROC)eglGetProcAddress("glDeleteVertexArraysOES");
         glGenVertexArrays = (PFNGLGENVERTEXARRAYSOESPROC)eglGetProcAddress("glGenVertexArraysOES");
         glIsVertexArray = (PFNGLISVERTEXARRAYOESPROC)eglGetProcAddress("glIsVertexArrayOES");
     }

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

@@ -85,7 +85,7 @@
 		422BF0851804C16E0028D009 /* libm.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libm.dylib; path = ../../../../../../usr/lib/libm.dylib; sourceTree = "<group>"; };
 		422BF0871804C1E40028D009 /* libbz2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libbz2.dylib; path = ../../../../../../usr/lib/libbz2.dylib; sourceTree = "<group>"; };
 		422BF08F1804C5230028D009 /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "../../../../../../usr/lib/libstdc++.dylib"; sourceTree = "<group>"; };
-		422BF0911804C7060028D009 /* libfbxsdk-static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libfbxsdk-static.a"; path = "../../../../../../Applications/Autodesk/FBX SDK/2014.1/lib/gcc4/ub/release/libfbxsdk-static.a"; sourceTree = "<group>"; };
+		422BF0911804C7060028D009 /* libfbxsdk-static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libfbxsdk-static.a"; path = "../../../../../../Applications/Autodesk/FBX SDK/2014.2/lib/gcc4/ub/release/libfbxsdk-static.a"; sourceTree = "<group>"; };
 		42475CE6147208A000610A6A /* gameplay-encoder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "gameplay-encoder"; sourceTree = BUILT_PRODUCTS_DIR; };
 		4251B128152D044B002F6199 /* Curve.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Curve.cpp; path = src/Curve.cpp; sourceTree = SOURCE_ROOT; };
 		4251B129152D044B002F6199 /* Curve.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Curve.h; path = src/Curve.h; sourceTree = SOURCE_ROOT; };
@@ -495,13 +495,13 @@
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				HEADER_SEARCH_PATHS = (
-					"\"/Applications/Autodesk/FBX SDK/2014.1/include\"",
+					"\"/Applications/Autodesk/FBX SDK/2014.2/include\"",
 					"../../external-deps/png/include",
 					"../../external-deps/freetype2/include",
 				);
 				INFOPLIST_PREPROCESSOR_DEFINITIONS = "";
 				LIBRARY_SEARCH_PATHS = (
-					"\"/Applications/Autodesk/FBX SDK/2014.1/lib/gcc4/ub/release\"",
+					"\"/Applications/Autodesk/FBX SDK/2014.2/lib/gcc4/ub/release\"",
 					"../../external-deps/png/lib/macosx",
 					"../../external-deps/freetype2/lib/macosx",
 				);
@@ -543,13 +543,13 @@
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				HEADER_SEARCH_PATHS = (
-					"\"/Applications/Autodesk/FBX SDK/2014.1/include\"",
+					"\"/Applications/Autodesk/FBX SDK/2014.2/include\"",
 					"../../external-deps/png/include",
 					"../../external-deps/freetype2/include",
 				);
 				INFOPLIST_PREPROCESSOR_DEFINITIONS = "";
 				LIBRARY_SEARCH_PATHS = (
-					"\"/Applications/Autodesk/FBX SDK/2014.1/lib/gcc4/ub/release\"",
+					"\"/Applications/Autodesk/FBX SDK/2014.2/lib/gcc4/ub/release\"",
 					"../../external-deps/png/lib/macosx",
 					"../../external-deps/freetype2/lib/macosx",
 				);
@@ -578,8 +578,8 @@
 					"$(inherited)",
 					"../../external-deps/freetype2/lib/macosx",
 					"../../external-deps/png/lib/macosx",
-					"/Applications/Autodesk/FBX\\ SDK/2014.1/lib/gcc4/ub/release",
-					"$(SYSTEM_APPS_DIR)/Autodesk/FBX\\ SDK/2014.1/lib/gcc4/ub/release",
+					"/Applications/Autodesk/FBX\\ SDK/2014.2/lib/gcc4/ub/release",
+					"$(SYSTEM_APPS_DIR)/Autodesk/FBX\\ SDK/2014.2/lib/gcc4/ub/release",
 				);
 				MACH_O_TYPE = mh_execute;
 				PRODUCT_NAME = "$(TARGET_NAME)";
@@ -603,8 +603,8 @@
 					"../../external-deps/freetype2/lib/macosx",
 					"../../external-deps/png/lib/macosx",
 					/Applications/Autodesk/FBX,
-					SDK/2014.1/lib/gcc4/ub/release,
-					"$(SYSTEM_APPS_DIR)/Autodesk/FBX\\ SDK/2014.1/lib/gcc4/ub/release",
+					SDK/2014.2/lib/gcc4/ub/release,
+					"$(SYSTEM_APPS_DIR)/Autodesk/FBX\\ SDK/2014.2/lib/gcc4/ub/release",
 				);
 				MACH_O_TYPE = mh_execute;
 				PRODUCT_NAME = "$(TARGET_NAME)";

+ 28 - 27
tools/encoder/src/TTFFontEncoder.cpp

@@ -107,6 +107,34 @@ unsigned char* createDistanceFields(unsigned char* img, unsigned int width, unsi
     return out;
 }
 
+// Stores a single genreated font size to be written into the GPB
+struct FontData
+{
+    // Array of glyphs for a font
+    TTFGlyph glyphArray[END_INDEX - START_INDEX];
+
+    // Stores final height of a row required to render all glyphs
+    int fontSize;
+
+    // Actual size of the underlying glyphs (may be different from fontSize)
+    int glyphSize;
+
+    // Font texture
+    unsigned char* imageBuffer;
+    unsigned int imageWidth;
+    unsigned int imageHeight;
+
+    FontData() : fontSize(0), glyphSize(0), imageBuffer(NULL), imageWidth(0), imageHeight(0)
+    {
+    }
+
+    ~FontData()
+    {
+        if (imageBuffer)
+            free(imageBuffer);
+    }
+};
+ 
 int writeFont(const char* inFilePath, const char* outFilePath, std::vector<unsigned int>& fontSizes, const char* id, bool fontpreview = false, Font::FontFormat fontFormat = Font::BITMAP)
 {
     // Initialize freetype library.
@@ -127,33 +155,6 @@ int writeFont(const char* inFilePath, const char* outFilePath, std::vector<unsig
         return -1;
     }
 
-    // Stores a single genreated font size to be written into the GPB
-    struct FontData
-    {
-        // Array of glyphs for a font
-        TTFGlyph glyphArray[END_INDEX - START_INDEX];
-
-        // Stores final height of a row required to render all glyphs
-        int fontSize;
-
-        // Actual size of the underlying glyphs (may be different from fontSize)
-        int glyphSize;
-
-        // Font texture
-        unsigned char* imageBuffer;
-        unsigned int imageWidth;
-        unsigned int imageHeight;
-
-        FontData() : fontSize(0), glyphSize(0), imageBuffer(NULL), imageWidth(0), imageHeight(0)
-        {
-        }
-
-        ~FontData()
-        {
-            if (imageBuffer)
-                free(imageBuffer);
-        }
-    };
     std::vector<FontData*> fonts;
 
     for (size_t fontIndex = 0, count = fontSizes.size(); fontIndex < count; ++fontIndex)