Browse Source

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

Steve Grenier 10 years ago
parent
commit
2273e2e0da

+ 5 - 5
gameplay/gameplay.pro

@@ -9,8 +9,7 @@ TEMPLATE = lib
 CONFIG += staticlib
 CONFIG += staticlib
 CONFIG += c++11
 CONFIG += c++11
 CONFIG -= qt
 CONFIG -= qt
-
-#DEFINES += GP_NO_PLATFORM
+CONFIG(debug, debug|release): DEFINES += _DEBUG
 
 
 SOURCES += src/AbsoluteLayout.cpp \
 SOURCES += src/AbsoluteLayout.cpp \
     src/AIAgent.cpp \
     src/AIAgent.cpp \
@@ -548,18 +547,19 @@ linux: INCLUDEPATH += /usr/include/harfbuzz
 
 
 macx: OBJECTIVE_SOURCES += src/PlatformMacOSX.mm
 macx: OBJECTIVE_SOURCES += src/PlatformMacOSX.mm
 macx: OBJECTIVE_SOURCES += src/gameplay-main-macosx.mm
 macx: OBJECTIVE_SOURCES += src/gameplay-main-macosx.mm
-macx: QMAKE_CXXFLAGS += -x c++ -stdlib=libc++ -w -arch x86_64
-macx: QMAKE_OBJECTIVE_CFLAGS += -x objective-c++ -stdlib=libc++ -w -arch x86_64
+macx: QMAKE_CXXFLAGS += -x c++ -x objective-c++ -stdlib=libc++ -w -arch x86_64
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
 macx: LIBS += -F/System/Library/Frameworks -framework IOKit
 macx: LIBS += -F/System/Library/Frameworks -framework IOKit
 macx: LIBS += -F/System/Library/Frameworks -framework QuartzCore
 macx: LIBS += -F/System/Library/Frameworks -framework QuartzCore
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
+macx: LIBS += -F/System/Library/Frameworks -framework Foundation
 
 
 win32: SOURCES += src/PlatformWindows.cpp
 win32: SOURCES += src/PlatformWindows.cpp
 win32: SOURCES += src/gameplay-main-windows.cpp
 win32: SOURCES += src/gameplay-main-windows.cpp
 win32: DEFINES += WIN32 _UNICODE UNICODE
 win32: DEFINES += WIN32 _UNICODE UNICODE
-win32: INCLUDEPATH += $$(DXSDK_DIR)Include
+win32: INCLUDEPATH += $$(DXSDK_DIR)/Include
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w4302

+ 13 - 2
gameplay/src/Mesh.cpp

@@ -251,7 +251,6 @@ bool Mesh::isDynamic() const
     return _dynamic;
     return _dynamic;
 }
 }
 
 
-
 Mesh::PrimitiveType Mesh::getPrimitiveType() const
 Mesh::PrimitiveType Mesh::getPrimitiveType() const
 {
 {
     return _primitiveType;
     return _primitiveType;
@@ -262,7 +261,19 @@ void Mesh::setPrimitiveType(PrimitiveType type)
     _primitiveType = type;
     _primitiveType = type;
 }
 }
 
 
-void Mesh::setVertexData(const float* vertexData, unsigned int vertexStart, unsigned int vertexCount)
+void* Mesh::mapVertexBuffer(MapAccess access)
+{
+    GL_ASSERT( glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer) );
+
+    return (void*)glMapBuffer(GL_ARRAY_BUFFER, access);
+}
+
+bool Mesh::unmapVertexBuffer()
+{
+    return glUnmapBuffer(GL_ARRAY_BUFFER);
+}
+
+void Mesh::setVertexData(const void* vertexData, unsigned int vertexStart, unsigned int vertexCount)
 {
 {
     GL_ASSERT( glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer) );
     GL_ASSERT( glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer) );
 
 

+ 44 - 1
gameplay/src/Mesh.h

@@ -47,6 +47,16 @@ public:
         POINTS = GL_POINTS
         POINTS = GL_POINTS
     };
     };
 
 
+    /**
+     * Defines mapping access/usage.
+     */
+    enum MapAccess
+    {
+        MAP_READ_ONLY = GL_READ_ONLY,
+        MAP_WRITE_ONLY = GL_WRITE_ONLY,
+        MAP_READ_WRITE = GL_READ_WRITE
+    };
+
     /**
     /**
      * Constructs a new mesh with the specified vertex format.
      * Constructs a new mesh with the specified vertex format.
      *
      *
@@ -200,6 +210,39 @@ public:
      */
      */
     void setPrimitiveType(Mesh::PrimitiveType type);
     void setPrimitiveType(Mesh::PrimitiveType type);
 
 
+    /**
+     * Maps the vertex buffer for the specified access.
+     *
+     * Mapping vertex data causes a synchronizing issue. To avoid gpu idle
+     * If GPU is still working with the buffer object, mapVertexBuffer will not
+     * return until GPU finishes its job with the corresponding buffer object.
+     *
+     * To avoid waiting (idle), you can call first setVertexBuffer with NULL pointer,
+     * then call mapVertexBuffer(). In this case, the previous data will be discarded
+     * and mapVertexBuffer() returns a new allocated pointer immediately even if GPU is
+     * still working with the previous data.
+     *
+     * However, this method is valid only if you want to update entire data set because
+     * you discard the previous data. If you want to change only portion of data or to
+     * read data, you better not release the previous data.
+     *
+     * After modifying the data of VBO, it must be unmapped the buffer object from the client's
+     * memory. unmapVertexBuffer returns true if success. When it returns false, the contents of
+     * vertex buffer become corrupted while the buffer was mapped. The corruption results from screen
+     * resolution change or window system specific events. In this case, the data must be resubmitted.
+     *
+     * @param access The access for which the data can be use. Ex. read, write, read_write.
+     * @return The mapped vertex buffer
+     */
+    void* mapVertexBuffer(Mesh::MapAccess access);
+
+    /**
+     * Unmaps the vertex buffer.
+     *
+     * @return false if unmapping buffer was unsuccessful
+     */
+    bool unmapVertexBuffer();
+
     /**
     /**
      * Sets the specified vertex data into the mapped vertex buffer.
      * Sets the specified vertex data into the mapped vertex buffer.
      *
      *
@@ -207,7 +250,7 @@ public:
      * @param vertexStart The index of the starting vertex (0 by default).
      * @param vertexStart The index of the starting vertex (0 by default).
      * @param vertexCount The number of vertices to be set (default is 0, for all vertices).
      * @param vertexCount The number of vertices to be set (default is 0, for all vertices).
      */
      */
-    void setVertexData(const float* vertexData, unsigned int vertexStart = 0, unsigned int vertexCount = 0);
+    void setVertexData(const void* vertexData, unsigned int vertexStart = 0, unsigned int vertexCount = 0);
 
 
     /**
     /**
      * Creates and adds a new part of primitive data defining how the vertices are connected.
      * Creates and adds a new part of primitive data defining how the vertices are connected.

+ 14 - 2
gameplay/src/MeshPart.cpp

@@ -82,9 +82,16 @@ IndexBufferHandle MeshPart::getIndexBuffer() const
     return _indexBuffer;
     return _indexBuffer;
 }
 }
 
 
-bool MeshPart::isDynamic() const
+void* MeshPart::mapIndexBuffer(Mesh::MapAccess access)
 {
 {
-    return _dynamic;
+    GL_ASSERT( glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _indexBuffer) );
+
+    return (void*)glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, access);
+}
+
+bool MeshPart::unmapIndexBuffer()
+{
+    return glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
 }
 }
 
 
 void MeshPart::setIndexData(const void* indexData, unsigned int indexStart, unsigned int indexCount)
 void MeshPart::setIndexData(const void* indexData, unsigned int indexStart, unsigned int indexCount)
@@ -123,4 +130,9 @@ void MeshPart::setIndexData(const void* indexData, unsigned int indexStart, unsi
     }
     }
 }
 }
 
 
+bool MeshPart::isDynamic() const
+{
+    return _dynamic;
+}
+
 }
 }

+ 36 - 3
gameplay/src/MeshPart.h

@@ -58,11 +58,37 @@ public:
     IndexBufferHandle getIndexBuffer() const;
     IndexBufferHandle getIndexBuffer() const;
 
 
     /**
     /**
-     * Determines if the indices are dynamic.
+     * Maps the index buffer for the specified access.
      *
      *
-     * @return true if the part is dynamic; false otherwise.
+     * Mapping index data causes a synchronizing issue. To avoid gpu idle
+     * If GPU is still working with the buffer object, mapIndexBuffer will not
+     * return until GPU finishes its job with the corresponding buffer object.
+     *
+     * To avoid waiting (idle), you can call first setIndexData with NULL pointer,
+     * then call mapIndexBuffer(). In this case, the previous data will be discarded
+     * and mapIndexData() returns a new allocated pointer immediately even if GPU is
+     * still working with the previous data.
+     *
+     * However, this method is valid only if you want to update entire data set because
+     * you discard the previous data. If you want to change only portion of data or to
+     * read data, you better not release the previous data.
+     *
+     * After modifying the data of VBO, it must be unmapped the buffer object from the client's
+     * memory. unmapIndexBuffer returns true if success. When it returns false, the contents of
+     * index buffer become corrupted while the buffer was mapped. The corruption results from screen
+     * resolution change or window system specific events. In this case, the data must be resubmitted.
+     *
+     * @param access The access for which the data can be use. Ex. read, write, read_write.
+     * @return The mapped index buffer
      */
      */
-    bool isDynamic() const;
+    void* mapIndexBuffer(Mesh::MapAccess access);
+
+    /**
+     * Unmaps the index buffer.
+     *
+     * @return false if unmapping buffer was unsuccessful
+     */
+    bool unmapIndexBuffer();
 
 
     /**
     /**
      * Sets the specified index data into the mapped index buffer.
      * Sets the specified index data into the mapped index buffer.
@@ -74,6 +100,13 @@ public:
      */
      */
     void setIndexData(const void* indexData, unsigned int indexStart, unsigned int indexCount);
     void setIndexData(const void* indexData, unsigned int indexStart, unsigned int indexCount);
 
 
+    /**
+     * Determines if the indices are dynamic.
+     *
+     * @return true if the part is dynamic; false otherwise.
+     */
+    bool isDynamic() const;
+
 private:
 private:
 
 
     /**
     /**

+ 40 - 21
gameplay/src/Node.cpp

@@ -218,23 +218,32 @@ Node* Node::getRootNode() const
 }
 }
 
 
 Node* Node::findNode(const char* id, bool recursive, bool exactMatch) const
 Node* Node::findNode(const char* id, bool recursive, bool exactMatch) const
+{
+    return findNode(id, recursive, exactMatch, false);
+}
+
+Node* Node::findNode(const char* id, bool recursive, bool exactMatch, bool skipSkin) const
 {
 {
     GP_ASSERT(id);
     GP_ASSERT(id);
 
 
-    // If the drawable is a model with a mesh skin, search the skin's hierarchy as well.
-    Node* rootNode = NULL;
-    Model* model = dynamic_cast<Model*>(_drawable);
-    if (model)
+    // If not skipSkin hierarchy, try searching the skin hierarchy
+    if (!skipSkin)
     {
     {
-        if (model->getSkin() != NULL && (rootNode = model->getSkin()->_rootNode) != NULL)
+        // If the drawable is a model with a mesh skin, search the skin's hierarchy as well.
+        Node* rootNode = NULL;
+        Model* model = dynamic_cast<Model*>(_drawable);
+        if (model)
         {
         {
-            if ((exactMatch && rootNode->_id == id) || (!exactMatch && rootNode->_id.find(id) == 0))
-                return rootNode;
-
-            Node* match = rootNode->findNode(id, true, exactMatch);
-            if (match)
+            if (model->getSkin() != NULL && (rootNode = model->getSkin()->_rootNode) != NULL)
             {
             {
-                return match;
+                if ((exactMatch && rootNode->_id == id) || (!exactMatch && rootNode->_id.find(id) == 0))
+                    return rootNode;
+
+                Node* match = rootNode->findNode(id, true, exactMatch, true);
+                if (match)
+                {
+                    return match;
+                }
             }
             }
         }
         }
     }
     }
@@ -252,7 +261,7 @@ Node* Node::findNode(const char* id, bool recursive, bool exactMatch) const
     {
     {
         for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
         for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
         {
         {
-            Node* match = child->findNode(id, true, exactMatch);
+            Node* match = child->findNode(id, true, exactMatch, skipSkin);
             if (match)
             if (match)
             {
             {
                 return match;
                 return match;
@@ -263,25 +272,35 @@ Node* Node::findNode(const char* id, bool recursive, bool exactMatch) const
 }
 }
 
 
 unsigned int Node::findNodes(const char* id, std::vector<Node*>& nodes, bool recursive, bool exactMatch) const
 unsigned int Node::findNodes(const char* id, std::vector<Node*>& nodes, bool recursive, bool exactMatch) const
+{
+    return findNodes(id, nodes, recursive, exactMatch, false);
+}
+
+unsigned int Node::findNodes(const char* id, std::vector<Node*>& nodes, bool recursive, bool exactMatch, bool skipSkin) const
 {
 {
     GP_ASSERT(id);
     GP_ASSERT(id);
 
 
     // If the drawable is a model with a mesh skin, search the skin's hierarchy as well.
     // If the drawable is a model with a mesh skin, search the skin's hierarchy as well.
     unsigned int count = 0;
     unsigned int count = 0;
-    Node* rootNode = NULL;
-    Model* model = dynamic_cast<Model*>(_drawable);
-    if (model)
+
+    if (!skipSkin)
     {
     {
-        if (model->getSkin() != NULL && (rootNode = model->getSkin()->_rootNode) != NULL)
+        Node* rootNode = NULL;
+        Model* model = dynamic_cast<Model*>(_drawable);
+        if (model)
         {
         {
-            if ((exactMatch && rootNode->_id == id) || (!exactMatch && rootNode->_id.find(id) == 0))
+            if (model->getSkin() != NULL && (rootNode = model->getSkin()->_rootNode) != NULL)
             {
             {
-                nodes.push_back(rootNode);
-                ++count;
+                if ((exactMatch && rootNode->_id == id) || (!exactMatch && rootNode->_id.find(id) == 0))
+                {
+                    nodes.push_back(rootNode);
+                    ++count;
+                }
+                count += rootNode->findNodes(id, nodes, recursive, exactMatch, true);
             }
             }
-            count += rootNode->findNodes(id, nodes, true, exactMatch);
         }
         }
     }
     }
+
     // Search immediate children first.
     // Search immediate children first.
     for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
     for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
     {
     {
@@ -297,7 +316,7 @@ unsigned int Node::findNodes(const char* id, std::vector<Node*>& nodes, bool rec
     {
     {
         for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
         for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
         {
         {
-            count += child->findNodes(id, nodes, true, exactMatch);
+            count += child->findNodes(id, nodes, recursive, exactMatch, skipSkin);
         }
         }
     }
     }
 
 

+ 33 - 0
gameplay/src/Node.h

@@ -665,6 +665,39 @@ protected:
      */
      */
     void setBoundsDirty();
     void setBoundsDirty();
 
 
+    /**
+     * Returns the first child node that matches the given ID.
+     *
+     * This method checks the specified ID against its immediate child nodes
+     * but does not check the ID against itself.
+     * If recursive is true, it also traverses the Node's hierarchy with a breadth first search.
+     *
+     * @param id The ID of the child to find.
+     * @param recursive True to search recursively all the node's children, false for only direct children.
+     * @param exactMatch true if only nodes whose ID exactly matches the specified ID are returned,
+     *        or false if nodes that start with the given ID are returned.
+     * @param skipSkin Set true to skip skin hierarchy, initial find may set false to include skin hierarchy.
+     *
+     * @return The Node found or NULL if not found.
+     */
+    Node* findNode(const char* id, bool recursive, bool exactMatch, bool skipSkin) const;
+
+
+    /**
+     * Returns all child nodes that match the given ID.
+     *
+     * @param id The ID of the node to find.
+     * @param nodes A vector of nodes to be populated with matches.
+     * @param recursive true if a recursive search should be performed, false otherwise.
+     * @param exactMatch true if only nodes whose ID exactly matches the specified ID are returned,
+     *        or false if nodes that start with the given ID are returned.
+     * @param skipSkin Set true to skip skin hierarchy, initial find may set false to include skin hierarchy.
+     * 
+     * @return The number of matches found.
+     * @script{ignore}
+     */
+    unsigned int findNodes(const char* id, std::vector<Node*>& nodes, bool recursive, bool exactMatch, bool skipSkin) const;
+
 private:
 private:
 
 
     /**
     /**

+ 12 - 11
gameplay/src/Properties.h

@@ -524,11 +524,13 @@ private:
     Properties();
     Properties();
 
 
     /**
     /**
-     * Constructs the Properties class from a file.
-     *
-     * @param stream The stream used for reading the properties from file.
+     * Constructor.
      */
      */
     Properties(Stream* stream);
     Properties(Stream* stream);
+
+    /**
+     * Constructor.
+     */
     Properties(const Properties& copy);
     Properties(const Properties& copy);
 
 
     /**
     /**
@@ -538,21 +540,20 @@ private:
 
 
     void readProperties(Stream* stream);
     void readProperties(Stream* stream);
 
 
+    void setDirectoryPath(const std::string* path);
+
+    void setDirectoryPath(const std::string& path);
+
     void skipWhiteSpace(Stream* stream);
     void skipWhiteSpace(Stream* stream);
 
 
     char* trimWhiteSpace(char* str);
     char* trimWhiteSpace(char* str);
 
 
-    // Called after create(); copies info from parents into derived namespaces.
-    void resolveInheritance(const char* id = NULL);
+    Properties* clone();
 
 
-    // Called by resolveInheritance().
     void mergeWith(Properties* overrides);
     void mergeWith(Properties* overrides);
 
 
-    // Clones the Properties object.
-    Properties* clone();
-
-    void setDirectoryPath(const std::string* path);
-    void setDirectoryPath(const std::string& path);
+    // Called after create(); copies info from parents into derived namespaces.
+    void resolveInheritance(const char* id = NULL);
 
 
     std::string _namespace;
     std::string _namespace;
     std::string _id;
     std::string _id;

+ 4 - 2
samples/browser/sample-browser.pro

@@ -8,6 +8,7 @@ TARGET = sample-browser
 TEMPLATE = app
 TEMPLATE = app
 CONFIG += c++11
 CONFIG += c++11
 CONFIG -= qt
 CONFIG -= qt
+CONFIG(debug, debug|release): DEFINES += _DEBUG
 
 
 SOURCES += src/Audio3DSample.cpp \
 SOURCES += src/Audio3DSample.cpp \
     src/AudioSample.cpp \
     src/AudioSample.cpp \
@@ -89,8 +90,7 @@ linux: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ..
 linux: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 
 
-macx: QMAKE_CXXFLAGS += -x c++ -stdlib=libc++ -w -arch x86_64
-macx: QMAKE_OBJECTIVE_CFLAGS += -x objective-c++ -stdlib=libc++ -w -arch x86_64
+macx: QMAKE_CXXFLAGS += -x c++ -x objective-c++ -stdlib=libc++ -w -arch x86_64
 macx: LIBS += -L$$PWD/../../gameplay/Debug/ -lgameplay
 macx: LIBS += -L$$PWD/../../gameplay/Debug/ -lgameplay
 macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
 macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
@@ -99,6 +99,7 @@ macx: LIBS += -F/System/Library/Frameworks -framework QuartzCore
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
+macx: LIBS += -F/System/Library/Frameworks -framework Foundation
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
@@ -128,6 +129,7 @@ win32: LIBS += -L$$(DXSDK_DIR)Lib\x64 -lXInput
 win32: INCLUDEPATH += $$(DXSDK_DIR)Include
 win32: INCLUDEPATH += $$(DXSDK_DIR)Include
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w4302
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\shaders res\shaders\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\shaders res\shaders\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\ui res\ui\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\ui res\ui\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(copy ..\..\..\gameplay\res\logo_powered_white.png res$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(copy ..\..\..\gameplay\res\logo_powered_white.png res$$escape_expand(\n\t))

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

@@ -60,7 +60,7 @@ void GestureSample::initialize()
         registerGesture(Gesture::GESTURE_DROP);
         registerGesture(Gesture::GESTURE_DROP);
         GP_ASSERT(isGestureRegistered(Gesture::GESTURE_DROP));
         GP_ASSERT(isGestureRegistered(Gesture::GESTURE_DROP));
 	}
 	}
-    GP_ASSERT(anySupported == isGestureSupported(Gesture::GESTURE_ANY_SUPPORTED));
+    //GP_ASSERT(anySupported == isGestureSupported(Gesture::GESTURE_ANY_SUPPORTED));
 }
 }
 
 
 void GestureSample::finalize()
 void GestureSample::finalize()

+ 5 - 3
samples/character/sample-character.pro

@@ -8,6 +8,7 @@ TARGET = sample-character
 TEMPLATE = app
 TEMPLATE = app
 CONFIG += c++11
 CONFIG += c++11
 CONFIG -= qt
 CONFIG -= qt
+CONFIG(debug, debug|release): DEFINES += _DEBUG
 
 
 SOURCES += src/CharacterGame.cpp
 SOURCES += src/CharacterGame.cpp
 
 
@@ -40,8 +41,7 @@ linux: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/game.dxt.config game.config$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/game.dxt.config game.config$$escape_expand(\n\t))
 
 
-macx: QMAKE_CXXFLAGS += -x c++ -stdlib=libc++ -w -arch x86_64
-macx: QMAKE_OBJECTIVE_CFLAGS += -x objective-c++ -stdlib=libc++ -w -arch x86_64
+macx: QMAKE_CXXFLAGS += -x c++  -x objective-c++ -stdlib=libc++ -w -arch x86_64
 macx: LIBS += -L$$PWD/../../gameplay/Debug/ -lgameplay
 macx: LIBS += -L$$PWD/../../gameplay/Debug/ -lgameplay
 macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
 macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
@@ -50,7 +50,8 @@ macx: LIBS += -F/System/Library/Frameworks -framework QuartzCore
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
-macx: QMAKE_ += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ../res$$escape_expand(\n\t))
+macx: LIBS += -F/System/Library/Frameworks -framework Foundation
+macx: QMAKE_POST_LINK  += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 macx
 macx
@@ -78,6 +79,7 @@ win32: LIBS += -L$$(DXSDK_DIR)Lib\x64 -lXInput
 win32: INCLUDEPATH += $$(DXSDK_DIR)Include
 win32: INCLUDEPATH += $$(DXSDK_DIR)Include
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w4302
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\shaders res\shaders\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\shaders res\shaders\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\ui res\ui\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\ui res\ui\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(copy ..\..\..\gameplay\res\logo_powered_white.png res$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(copy ..\..\..\gameplay\res\logo_powered_white.png res$$escape_expand(\n\t))

+ 4 - 2
samples/racer/sample-racer.pro

@@ -8,6 +8,7 @@ TARGET = sample-racer
 TEMPLATE = app
 TEMPLATE = app
 CONFIG += c++11
 CONFIG += c++11
 CONFIG -= qt
 CONFIG -= qt
+CONFIG(debug, debug|release): DEFINES += _DEBUG
 
 
 SOURCES += src/RacerGame.cpp
 SOURCES += src/RacerGame.cpp
 
 
@@ -40,8 +41,7 @@ linux: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/game.dxt.config game.config$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/game.dxt.config game.config$$escape_expand(\n\t))
 
 
-macx: QMAKE_CXXFLAGS += -x c++ -stdlib=libc++ -w -arch x86_64
-macx: QMAKE_OBJECTIVE_CFLAGS += -x objective-c++ -stdlib=libc++ -w -arch x86_64
+macx: QMAKE_CXXFLAGS += -x c++ -x objective-c++ -stdlib=libc++ -w -arch x86_64
 macx: LIBS += -L$$PWD/../../gameplay/Debug/ -lgameplay
 macx: LIBS += -L$$PWD/../../gameplay/Debug/ -lgameplay
 macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
 macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
@@ -50,6 +50,7 @@ macx: LIBS += -F/System/Library/Frameworks -framework QuartzCore
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
+macx: LIBS += -F/System/Library/Frameworks -framework Foundation
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
@@ -78,6 +79,7 @@ win32: LIBS += -L$$(DXSDK_DIR)Lib\x64 -lXInput
 win32: INCLUDEPATH += $$(DXSDK_DIR)Include
 win32: INCLUDEPATH += $$(DXSDK_DIR)Include
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w4302
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\shaders res\shaders\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\shaders res\shaders\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\ui res\ui\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\ui res\ui\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(copy ..\..\..\gameplay\res\logo_powered_white.png res$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(copy ..\..\..\gameplay\res\logo_powered_white.png res$$escape_expand(\n\t))

+ 4 - 2
samples/spaceship/sample-spaceship.pro

@@ -8,6 +8,7 @@ TARGET = sample-spaceship
 TEMPLATE = app
 TEMPLATE = app
 CONFIG += c++11
 CONFIG += c++11
 CONFIG -= qt
 CONFIG -= qt
+CONFIG(debug, debug|release): DEFINES += _DEBUG
 
 
 SOURCES += src/SpaceshipGame.cpp
 SOURCES += src/SpaceshipGame.cpp
 
 
@@ -39,8 +40,7 @@ linux: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ..
 linux: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 linux: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 
 
-macx: QMAKE_CXXFLAGS += -x c++ -stdlib=libc++ -w -arch x86_64
-macx: QMAKE_OBJECTIVE_CFLAGS += -x objective-c++ -stdlib=libc++ -w -arch x86_64
+macx: QMAKE_CXXFLAGS += -x c++  -x objective-c++ -stdlib=libc++ -w -arch x86_64
 macx: LIBS += -L$$PWD/../../gameplay/Debug/ -lgameplay
 macx: LIBS += -L$$PWD/../../gameplay/Debug/ -lgameplay
 macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
 macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
 macx: LIBS += -F/System/Library/Frameworks -framework GameKit
@@ -49,6 +49,7 @@ macx: LIBS += -F/System/Library/Frameworks -framework QuartzCore
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenAL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework OpenGL
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
 macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
+macx: LIBS += -F/System/Library/Frameworks -framework Foundation
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/shaders ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(rsync -rau $$PWD/../../gameplay/res/ui ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
 macx: QMAKE_POST_LINK += $$quote(cp -rf $$PWD/../../gameplay/res/logo_powered_white.png ../res$$escape_expand(\n\t))
@@ -77,6 +78,7 @@ win32: LIBS += -L$$(DXSDK_DIR)Lib\x64 -lXInput
 win32: INCLUDEPATH += $$(DXSDK_DIR)Include
 win32: INCLUDEPATH += $$(DXSDK_DIR)Include
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
 win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w4302
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\shaders res\shaders\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\shaders res\shaders\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\ui res\ui\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(xcopy ..\..\..\gameplay\res\ui res\ui\* /s /y /d$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(copy ..\..\..\gameplay\res\logo_powered_white.png res$$escape_expand(\n\t))
 win32: QMAKE_POST_LINK += $$quote(copy ..\..\..\gameplay\res\logo_powered_white.png res$$escape_expand(\n\t))

+ 5 - 5
template/template.vcxproj

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="DebugMem|x64">
     <ProjectConfiguration Include="DebugMem|x64">
       <Configuration>DebugMem</Configuration>
       <Configuration>DebugMem</Configuration>
@@ -24,20 +24,20 @@
     <ConfigurationType>Application</ConfigurationType>
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <UseDebugLibraries>true</UseDebugLibraries>
     <CharacterSet>Unicode</CharacterSet>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v120</PlatformToolset>
+    <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|x64'" Label="Configuration">
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>true</UseDebugLibraries>
     <UseDebugLibraries>true</UseDebugLibraries>
     <CharacterSet>Unicode</CharacterSet>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v120</PlatformToolset>
+    <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
     <ConfigurationType>Application</ConfigurationType>
     <ConfigurationType>Application</ConfigurationType>
     <UseDebugLibraries>false</UseDebugLibraries>
     <UseDebugLibraries>false</UseDebugLibraries>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <WholeProgramOptimization>true</WholeProgramOptimization>
     <CharacterSet>Unicode</CharacterSet>
     <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>v120</PlatformToolset>
+    <PlatformToolset>v140</PlatformToolset>
   </PropertyGroup>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
   <ImportGroup Label="ExtensionSettings">
@@ -193,4 +193,4 @@ xcopy GAMEPLAY_PATH\gameplay\res\ui res\ui\* /s /y /d</Command>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 29 - 17
tools/encoder/gameplay-encoder.pro

@@ -3,12 +3,11 @@
 # Project created by QtCreator
 # Project created by QtCreator
 #
 #
 #-------------------------------------------------
 #-------------------------------------------------
-
 QT       -= core gui
 QT       -= core gui
-
 TARGET = gameplay-encoder
 TARGET = gameplay-encoder
 CONFIG   += console
 CONFIG   += console
 CONFIG   -= app_bundle
 CONFIG   -= app_bundle
+CONFIG(debug, debug|release): DEFINES += _DEBUG
 
 
 TEMPLATE = app
 TEMPLATE = app
 
 
@@ -53,6 +52,8 @@ SOURCES += src/Mesh.cpp \
     src/StringUtil.cpp \
     src/StringUtil.cpp \
     src/Transform.cpp \
     src/Transform.cpp \
     src/TTFFontEncoder.cpp \
     src/TTFFontEncoder.cpp \
+    src/TMXSceneEncoder.cpp \
+    src/TMXTypes.cpp \
     src/Vector2.cpp \
     src/Vector2.cpp \
     src/Vector3.cpp \
     src/Vector3.cpp \
     src/Vector4.cpp \
     src/Vector4.cpp \
@@ -103,6 +104,8 @@ HEADERS += src/AnimationChannel.h \
     src/Thread.h \
     src/Thread.h \
     src/Transform.h \
     src/Transform.h \
     src/TTFFontEncoder.h \
     src/TTFFontEncoder.h \
+    src/TMXSceneEncoder.h \
+    src/TMXTypes.h \
     src/Vector2.h \
     src/Vector2.h \
     src/Vector2.inl \
     src/Vector2.inl \
     src/Vector3.h \
     src/Vector3.h \
@@ -112,23 +115,32 @@ HEADERS += src/AnimationChannel.h \
     src/VertexElement.h \
     src/VertexElement.h \
     src/Vertex.h
     src/Vertex.h
 
 
+DEFINES += USE_FBX
 INCLUDEPATH += $$PWD/../../external-deps/include
 INCLUDEPATH += $$PWD/../../external-deps/include
-linux:!android: INCLUDEPATH += /usr/include/fbxsdk
-linux:!android: INCLUDEPATH += /usr/include
-
-DEPENDPATH += INCLUDEPATH
 
 
-linux:!android: DEFINES += USE_FBX
-linux:!android: DEFINES += __linux__
 
 
-linux:!android: QMAKE_CXXFLAGS += -std=c++11 -lstdc++ -pthread -w
+linux: DEFINES += __linux__
+linux: QMAKE_CXXFLAGS += -std=c++11 -lstdc++ -pthread -w
+linux: INCLUDEPATH += /usr/include/fbxsdk
+linux: INCLUDEPATH += /usr/include
+linux: LIBS += -L$$PWD/../../external-deps/lib/linux/x86_64/ -lgameplay-deps -lfreetype
+linux: LIBS += -L/usr/lib/gcc4/x64/release -lfbxsdk
+linux: LIBS += -lstdc++ -ldl -lpthread
 
 
-linux:!android: LIBS += -L$$PWD/../../external-deps/lib/linux/x86_64/ -lgameplay-deps -lfreetype
-linux:!android: LIBS += -L/usr/lib/gcc4/x64/release -lfbxsdk
-linux:!android: LIBS += -lstdc++
-linux:!android: LIBS += -ldl
-linux:!android: LIBS += -lpthread
+macx: QMAKE_CXXFLAGS += -x c++ -stdlib=libc++ -w -arch x86_64
+macx: INCLUDEPATH += "/Applications/Autodesk/FBX SDK/2015.1/include"
+macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
+macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lfreetype
+macx: LIBS += -L"/Applications/Autodesk/FBX SDK/2015.1/lib/clang/release/" -lfbxsdk-static
+macx: LIBS += -F/System/Library/Frameworks -framework Cocoa
+macx: LIBS += -F/System/Library/Frameworks -framework SystemConfiguration
+macx: LIBS += -F/System/Library/Frameworks -framework Foundation
+macx: LIBS += -lm -lbz2 -lxml2 -liconv
 
 
-linux:!android: PRE_TARGETDEPS += $$PWD/../../external-deps/lib/linux/x86_64/libgameplay-deps.a
-linux:!android: PRE_TARGETDEPS += $$PWD/../../external-deps/lib/linux/x86_64/libfreetype.a
-linux:!android: PRE_TARGETDEPS += /usr/lib/gcc4/x64/release/libfbxsdk.a
+win32: DEFINES += WIN32 _WINDOWS _UNICODE UNICODE
+win32: CONFIG(debug, debug|release): LIBS += -L$$PWD/../../external-deps/lib/windows/x86_64/Debug/ -lgameplay-deps
+win32: CONFIG(release, debug|release): LIBS += -L$$PWD/../../external-deps/lib/windows/x86_64/Release/ -lgameplay-deps
+win32: LIBS += -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w4302

+ 16 - 12
tools/luagen/gameplay-luagen.pro

@@ -3,12 +3,11 @@
 # Project created by QtCreator
 # Project created by QtCreator
 #
 #
 #-------------------------------------------------
 #-------------------------------------------------
-
 QT       -= core gui
 QT       -= core gui
-
 TARGET = gameplay-luagen
 TARGET = gameplay-luagen
 CONFIG   += console
 CONFIG   += console
 CONFIG   -= app_bundle
 CONFIG   -= app_bundle
+CONFIG(debug, debug|release): DEFINES += _DEBUG
 
 
 TEMPLATE = app
 TEMPLATE = app
 
 
@@ -29,13 +28,18 @@ HEADERS += src/Base.h \
 
 
 INCLUDEPATH += $$PWD/../../external-deps/include
 INCLUDEPATH += $$PWD/../../external-deps/include
 
 
-DEPENDPATH += INCLUDEPATH
-
-linux:!android: DEFINES += __linux__
-
-linux:!android: QMAKE_CXXFLAGS += -std=c++11 -lstdc++ -pthread -w
-
-linux:!android: LIBS += -L$$PWD/../../external-deps/lib/linux/x86_64/ -lgameplay-deps
-linux:!android: LIBS += -lstdc++
-
-linux:!android: PRE_TARGETDEPS += $$PWD/../../external-deps/lib/linux/x86_64/libgameplay-deps.a
+linux: DEFINES += __linux__
+linux: QMAKE_CXXFLAGS += -std=c++11 -lstdc++ -pthread -w
+linux: LIBS += -L$$PWD/../../external-deps/lib/linux/x86_64/ -lgameplay-deps
+linux: LIBS += -lstdc++
+
+macx: QMAKE_CXXFLAGS += -x c++ -stdlib=libc++ -w -arch x86_64
+macx: LIBS += -L$$PWD/../../external-deps/lib/macosx/x86_64/ -lgameplay-deps
+
+win32: DEFINES += WIN32 _WINDOWS _UNICODE UNICODE
+win32: CONFIG(debug, debug|release): LIBS += -L$$PWD/../../external-deps/lib/windows/x86_64/Debug/ -lgameplay-deps
+win32: CONFIG(release, debug|release): LIBS += -L$$PWD/../../external-deps/lib/windows/x86_64/Release/ -lgameplay-deps
+win32: LIBS += -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w34100
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w34189
+win32: QMAKE_CXXFLAGS_WARN_ON -= -w4302