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

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

Noel Austin 12 лет назад
Родитель
Сommit
d138bbc74d
100 измененных файлов с 166 добавлено и 123 удалено
  1. 6 0
      gameplay/src/Light.cpp
  2. 26 0
      gameplay/src/Node.cpp
  3. 1 0
      gameplay/src/Node.h
  4. 40 22
      gameplay/src/Texture.cpp
  5. 4 16
      gameplay/src/Texture.h
  6. 1 1
      gameplay/src/Theme.cpp
  7. 0 82
      gameplay/src/lua/lua_Texture.cpp
  8. 0 2
      gameplay/src/lua/lua_Texture.h
  9. 62 0
      install.bat
  10. 26 0
      install.sh
  11. 0 0
      tools/encoder/CMakeLists.txt
  12. 0 0
      tools/encoder/README.md
  13. 0 0
      tools/encoder/gameplay-bundle.txt
  14. 0 0
      tools/encoder/gameplay-encoder.sln
  15. 0 0
      tools/encoder/gameplay-encoder.vcxproj
  16. 0 0
      tools/encoder/gameplay-encoder.vcxproj.filters
  17. 0 0
      tools/encoder/gameplay-encoder.vcxproj.user
  18. 0 0
      tools/encoder/gameplay-encoder.xcodeproj/project.pbxproj
  19. 0 0
      tools/encoder/gameplay-encoder.xcodeproj/xcshareddata/xcschemes/gameplay-encoder.xcscheme
  20. 0 0
      tools/encoder/src/Animation.cpp
  21. 0 0
      tools/encoder/src/Animation.h
  22. 0 0
      tools/encoder/src/AnimationChannel.cpp
  23. 0 0
      tools/encoder/src/AnimationChannel.h
  24. 0 0
      tools/encoder/src/Animations.cpp
  25. 0 0
      tools/encoder/src/Animations.h
  26. 0 0
      tools/encoder/src/Base.cpp
  27. 0 0
      tools/encoder/src/Base.h
  28. 0 0
      tools/encoder/src/BoundingVolume.cpp
  29. 0 0
      tools/encoder/src/BoundingVolume.h
  30. 0 0
      tools/encoder/src/Camera.cpp
  31. 0 0
      tools/encoder/src/Camera.h
  32. 0 0
      tools/encoder/src/Curve.cpp
  33. 0 0
      tools/encoder/src/Curve.h
  34. 0 0
      tools/encoder/src/Curve.inl
  35. 0 0
      tools/encoder/src/Effect.cpp
  36. 0 0
      tools/encoder/src/Effect.h
  37. 0 0
      tools/encoder/src/EncoderArguments.cpp
  38. 0 0
      tools/encoder/src/EncoderArguments.h
  39. 0 0
      tools/encoder/src/FBXSceneEncoder.cpp
  40. 0 0
      tools/encoder/src/FBXSceneEncoder.h
  41. 0 0
      tools/encoder/src/FileIO.cpp
  42. 0 0
      tools/encoder/src/FileIO.h
  43. 0 0
      tools/encoder/src/Font.cpp
  44. 0 0
      tools/encoder/src/Font.h
  45. 0 0
      tools/encoder/src/GPBDecoder.cpp
  46. 0 0
      tools/encoder/src/GPBDecoder.h
  47. 0 0
      tools/encoder/src/GPBFile.cpp
  48. 0 0
      tools/encoder/src/GPBFile.h
  49. 0 0
      tools/encoder/src/Glyph.cpp
  50. 0 0
      tools/encoder/src/Glyph.h
  51. 0 0
      tools/encoder/src/Heightmap.cpp
  52. 0 0
      tools/encoder/src/Heightmap.h
  53. 0 0
      tools/encoder/src/Image.cpp
  54. 0 0
      tools/encoder/src/Image.h
  55. 0 0
      tools/encoder/src/Light.cpp
  56. 0 0
      tools/encoder/src/Light.h
  57. 0 0
      tools/encoder/src/Material.cpp
  58. 0 0
      tools/encoder/src/Material.h
  59. 0 0
      tools/encoder/src/MaterialParameter.cpp
  60. 0 0
      tools/encoder/src/MaterialParameter.h
  61. 0 0
      tools/encoder/src/Matrix.cpp
  62. 0 0
      tools/encoder/src/Matrix.h
  63. 0 0
      tools/encoder/src/Mesh.cpp
  64. 0 0
      tools/encoder/src/Mesh.h
  65. 0 0
      tools/encoder/src/MeshPart.cpp
  66. 0 0
      tools/encoder/src/MeshPart.h
  67. 0 0
      tools/encoder/src/MeshSkin.cpp
  68. 0 0
      tools/encoder/src/MeshSkin.h
  69. 0 0
      tools/encoder/src/MeshSubSet.cpp
  70. 0 0
      tools/encoder/src/MeshSubSet.h
  71. 0 0
      tools/encoder/src/Model.cpp
  72. 0 0
      tools/encoder/src/Model.h
  73. 0 0
      tools/encoder/src/Node.cpp
  74. 0 0
      tools/encoder/src/Node.h
  75. 0 0
      tools/encoder/src/NormalMapGenerator.cpp
  76. 0 0
      tools/encoder/src/NormalMapGenerator.h
  77. 0 0
      tools/encoder/src/Object.cpp
  78. 0 0
      tools/encoder/src/Object.h
  79. 0 0
      tools/encoder/src/Quaternion.cpp
  80. 0 0
      tools/encoder/src/Quaternion.h
  81. 0 0
      tools/encoder/src/Quaternion.inl
  82. 0 0
      tools/encoder/src/Reference.cpp
  83. 0 0
      tools/encoder/src/Reference.h
  84. 0 0
      tools/encoder/src/ReferenceTable.cpp
  85. 0 0
      tools/encoder/src/ReferenceTable.h
  86. 0 0
      tools/encoder/src/Scene.cpp
  87. 0 0
      tools/encoder/src/Scene.h
  88. 0 0
      tools/encoder/src/StringUtil.cpp
  89. 0 0
      tools/encoder/src/StringUtil.h
  90. 0 0
      tools/encoder/src/TTFFontEncoder.cpp
  91. 0 0
      tools/encoder/src/TTFFontEncoder.h
  92. 0 0
      tools/encoder/src/Thread.h
  93. 0 0
      tools/encoder/src/Transform.cpp
  94. 0 0
      tools/encoder/src/Transform.h
  95. 0 0
      tools/encoder/src/Vector2.cpp
  96. 0 0
      tools/encoder/src/Vector2.h
  97. 0 0
      tools/encoder/src/Vector2.inl
  98. 0 0
      tools/encoder/src/Vector3.cpp
  99. 0 0
      tools/encoder/src/Vector3.h
  100. 0 0
      tools/encoder/src/Vector3.inl

+ 6 - 0
gameplay/src/Light.cpp

@@ -252,6 +252,9 @@ void Light::setRange(float range)
         GP_ERROR("Unsupported light type (%d).", _type);
         GP_ERROR("Unsupported light type (%d).", _type);
         break;
         break;
     }
     }
+
+    if (_node)
+        _node->setBoundsDirty();
 }
 }
 
 
 float Light::getRangeInverse() const
 float Light::getRangeInverse() const
@@ -300,6 +303,9 @@ void Light::setOuterAngle(float outerAngle)
 
 
     _spot->outerAngle = outerAngle;
     _spot->outerAngle = outerAngle;
     _spot->outerAngleCos = cos(outerAngle);
     _spot->outerAngleCos = cos(outerAngle);
+
+    if (_node)
+        _node->setBoundsDirty();
 }
 }
     
     
 float Light::getInnerAngleCos()  const
 float Light::getInnerAngleCos()  const

+ 26 - 0
gameplay/src/Node.cpp

@@ -126,6 +126,8 @@ void Node::addChild(Node* child)
 
 
     ++_childCount;
     ++_childCount;
 
 
+    setBoundsDirty();
+
     if (_notifyHierarchyChanged)
     if (_notifyHierarchyChanged)
     {
     {
         hierarchyChanged();
         hierarchyChanged();
@@ -768,6 +770,8 @@ void Node::setLight(Light* light)
             _light->addRef();
             _light->addRef();
             _light->setNode(this);
             _light->setNode(this);
         }
         }
+
+        setBoundsDirty();
     }
     }
 }
 }
 
 
@@ -818,6 +822,8 @@ void Node::setTerrain(Terrain* terrain)
             _terrain->addRef();
             _terrain->addRef();
             _terrain->setNode(this);
             _terrain->setNode(this);
         }
         }
+
+        setBoundsDirty();
     }
     }
 }
 }
 
 
@@ -874,6 +880,26 @@ const BoundingSphere& Node::getBoundingSphere() const
                 _bounds.merge(_model->getMesh()->getBoundingSphere());
                 _bounds.merge(_model->getMesh()->getBoundingSphere());
             }
             }
         }
         }
+        if (_light)
+        {
+            switch (_light->getLightType())
+            {
+            case Light::POINT:
+                if (empty)
+                {
+                    _bounds.set(Vector3::zero(), _light->getRange());
+                    empty = false;
+                }
+                else
+                {
+                    _bounds.merge(BoundingSphere(Vector3::zero(), _light->getRange()));
+                }
+                break;
+            case Light::SPOT:
+                // TODO: Implement spot light bounds
+                break;
+            }
+        }
         if (empty)
         if (empty)
         {
         {
             // Empty bounding sphere, set the world translation with zero radius
             // Empty bounding sphere, set the world translation with zero radius

+ 1 - 0
gameplay/src/Node.h

@@ -29,6 +29,7 @@ class Node : public Transform, public Ref
     friend class Scene;
     friend class Scene;
     friend class Bundle;
     friend class Bundle;
     friend class MeshSkin;
     friend class MeshSkin;
+    friend class Light;
 
 
 public:
 public:
 
 

+ 40 - 22
gameplay/src/Texture.cpp

@@ -45,7 +45,8 @@ namespace gameplay
 static std::vector<Texture*> __textureCache;
 static std::vector<Texture*> __textureCache;
 static TextureHandle __currentTextureId;
 static TextureHandle __currentTextureId;
 
 
-Texture::Texture() : _handle(0), _format(UNKNOWN), _width(0), _height(0), _mipmapped(false), _cached(false), _compressed(false)
+Texture::Texture() : _handle(0), _format(UNKNOWN), _width(0), _height(0), _mipmapped(false), _cached(false), _compressed(false),
+    _wrapS(Texture::REPEAT), _wrapT(Texture::REPEAT), _minFilter(Texture::NEAREST_MIPMAP_LINEAR), _magFilter(Texture::LINEAR)
 {
 {
 }
 }
 
 
@@ -164,13 +165,15 @@ Texture* Texture::create(Format format, unsigned int width, unsigned int height,
     GL_ASSERT( glTexImage2D(GL_TEXTURE_2D, 0, (GLenum)format, width, height, 0, (GLenum)format, GL_UNSIGNED_BYTE, data) );
     GL_ASSERT( glTexImage2D(GL_TEXTURE_2D, 0, (GLenum)format, width, height, 0, (GLenum)format, GL_UNSIGNED_BYTE, data) );
 
 
     // Set initial minification filter based on whether or not mipmaping was enabled.
     // Set initial minification filter based on whether or not mipmaping was enabled.
-    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, generateMipmaps ? GL_NEAREST_MIPMAP_LINEAR : GL_LINEAR) );
+    Filter minFilter = generateMipmaps ? NEAREST_MIPMAP_LINEAR : LINEAR;
+    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter) );
 
 
     Texture* texture = new Texture();
     Texture* texture = new Texture();
     texture->_handle = textureId;
     texture->_handle = textureId;
     texture->_format = format;
     texture->_format = format;
     texture->_width = width;
     texture->_width = width;
     texture->_height = height;
     texture->_height = height;
+    texture->_minFilter = minFilter;
     if (generateMipmaps)
     if (generateMipmaps)
     {
     {
         texture->generateMipmaps();
         texture->generateMipmaps();
@@ -273,7 +276,9 @@ Texture* Texture::createCompressedPVRTC(const char* path)
     GLuint textureId;
     GLuint textureId;
     GL_ASSERT( glGenTextures(1, &textureId) );
     GL_ASSERT( glGenTextures(1, &textureId) );
     GL_ASSERT( glBindTexture(GL_TEXTURE_2D, textureId) );
     GL_ASSERT( glBindTexture(GL_TEXTURE_2D, textureId) );
-    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, mipMapCount > 1 ? GL_NEAREST_MIPMAP_LINEAR : GL_LINEAR) );
+
+    Filter minFilter = mipMapCount > 1 ? NEAREST_MIPMAP_LINEAR : LINEAR;
+    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter) );
 
 
     Texture* texture = new Texture();
     Texture* texture = new Texture();
     texture->_handle = textureId;
     texture->_handle = textureId;
@@ -281,6 +286,7 @@ Texture* Texture::createCompressedPVRTC(const char* path)
     texture->_height = height;
     texture->_height = height;
     texture->_mipmapped = mipMapCount > 1;
     texture->_mipmapped = mipMapCount > 1;
     texture->_compressed = true;
     texture->_compressed = true;
+    texture->_minFilter = minFilter;
 
 
     // Load the data for each level.
     // Load the data for each level.
     GLubyte* ptr = data;
     GLubyte* ptr = data;
@@ -766,7 +772,9 @@ Texture* Texture::createCompressedDDS(const char* path)
     GLuint textureId;
     GLuint textureId;
     GL_ASSERT( glGenTextures(1, &textureId) );
     GL_ASSERT( glGenTextures(1, &textureId) );
     GL_ASSERT( glBindTexture(GL_TEXTURE_2D, textureId) );
     GL_ASSERT( glBindTexture(GL_TEXTURE_2D, textureId) );
-    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, header.dwMipMapCount > 1 ? GL_NEAREST_MIPMAP_LINEAR : GL_LINEAR ) );
+
+    Filter minFilter = header.dwMipMapCount > 1 ? NEAREST_MIPMAP_LINEAR : LINEAR;
+    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter ) );
 
 
     // Create gameplay texture.
     // Create gameplay texture.
     texture = new Texture();
     texture = new Texture();
@@ -775,6 +783,7 @@ Texture* Texture::createCompressedDDS(const char* path)
     texture->_height = header.dwHeight;
     texture->_height = header.dwHeight;
     texture->_compressed = compressed;
     texture->_compressed = compressed;
     texture->_mipmapped = header.dwMipMapCount > 1;
     texture->_mipmapped = header.dwMipMapCount > 1;
+    texture->_minFilter = minFilter;
 
 
     // Load texture data.
     // Load texture data.
     for (unsigned int i = 0; i < header.dwMipMapCount; ++i)
     for (unsigned int i = 0; i < header.dwMipMapCount; ++i)
@@ -824,20 +833,6 @@ TextureHandle Texture::getHandle() const
     return _handle;
     return _handle;
 }
 }
 
 
-void Texture::setWrapMode(Wrap wrapS, Wrap wrapT)
-{
-    GL_ASSERT( glBindTexture(GL_TEXTURE_2D, _handle) );
-    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, (GLenum)wrapS) );
-    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, (GLenum)wrapT) );
-}
-
-void Texture::setFilterMode(Filter minificationFilter, Filter magnificationFilter)
-{
-    GL_ASSERT( glBindTexture(GL_TEXTURE_2D, _handle) );
-    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLenum)minificationFilter) );
-    GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLenum)magnificationFilter) );
-}
-
 void Texture::generateMipmaps()
 void Texture::generateMipmaps()
 {
 {
     if (!_mipmapped)
     if (!_mipmapped)
@@ -861,10 +856,11 @@ bool Texture::isCompressed() const
 }
 }
 
 
 Texture::Sampler::Sampler(Texture* texture)
 Texture::Sampler::Sampler(Texture* texture)
-    : _texture(texture), _wrapS(Texture::REPEAT), _wrapT(Texture::REPEAT), _magFilter(Texture::LINEAR)
+    : _texture(texture), _wrapS(Texture::REPEAT), _wrapT(Texture::REPEAT)
 {
 {
     GP_ASSERT(texture);
     GP_ASSERT(texture);
-    _minFilter = texture->isMipmapped() ? Texture::NEAREST_MIPMAP_LINEAR : Texture::LINEAR;
+    _minFilter = texture->_minFilter;
+    _magFilter = texture->_magFilter;
 }
 }
 
 
 Texture::Sampler::~Sampler()
 Texture::Sampler::~Sampler()
@@ -889,14 +885,12 @@ void Texture::Sampler::setWrapMode(Wrap wrapS, Wrap wrapT)
 {
 {
     _wrapS = wrapS;
     _wrapS = wrapS;
     _wrapT = wrapT;
     _wrapT = wrapT;
-    _texture->setWrapMode(wrapS, wrapT);
 }
 }
 
 
 void Texture::Sampler::setFilterMode(Filter minificationFilter, Filter magnificationFilter)
 void Texture::Sampler::setFilterMode(Filter minificationFilter, Filter magnificationFilter)
 {
 {
     _minFilter = minificationFilter;
     _minFilter = minificationFilter;
     _magFilter = magnificationFilter;
     _magFilter = magnificationFilter;
-    _texture->setFilterMode(minificationFilter, magnificationFilter);
 }
 }
 
 
 Texture* Texture::Sampler::getTexture() const
 Texture* Texture::Sampler::getTexture() const
@@ -909,6 +903,30 @@ void Texture::Sampler::bind()
     GP_ASSERT(_texture);
     GP_ASSERT(_texture);
 
 
     GL_ASSERT( glBindTexture(GL_TEXTURE_2D, _texture->_handle) );
     GL_ASSERT( glBindTexture(GL_TEXTURE_2D, _texture->_handle) );
+
+    if (_texture->_minFilter != _minFilter)
+    {
+        _texture->_minFilter = _minFilter;
+        GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLenum)_minFilter) );
+    }
+
+    if (_texture->_magFilter != _magFilter)
+    {
+        _texture->_magFilter = _magFilter;
+        GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLenum)_magFilter) );
+    }
+
+    if (_texture->_wrapS != _wrapS)
+    {
+        _texture->_wrapS = _wrapS;
+        GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, (GLenum)_wrapS) );
+    }
+
+    if (_texture->_wrapT != _wrapT)
+    {
+        _texture->_wrapT = _wrapT;
+        GL_ASSERT( glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, (GLenum)_wrapT) );
+    }
 }
 }
 
 
 }
 }

+ 4 - 16
gameplay/src/Texture.h

@@ -227,22 +227,6 @@ public:
      */
      */
     unsigned int getHeight() const;
     unsigned int getHeight() const;
 
 
-    /**
-     * Sets the wrap mode for this texture.
-     *
-     * @param wrapS Horizontal wrapping mode for the texture.
-     * @param wrapT Vertical wrapping mode for the texture.
-     */
-    void setWrapMode(Wrap wrapS, Wrap wrapT);
-
-    /**
-     * Sets the minification and magnification filter modes for this texture.
-     *
-     * @param minificationFilter New texture minification filter.
-     * @param magnificationFilter New texture magnification filter.
-     */
-    void setFilterMode(Filter minificationFilter, Filter magnificationFilter);
-
     /**
     /**
      * Generates a full mipmap chain for this texture if it isn't already mipmapped.
      * Generates a full mipmap chain for this texture if it isn't already mipmapped.
      */
      */
@@ -307,6 +291,10 @@ private:
     bool _mipmapped;
     bool _mipmapped;
     bool _cached;
     bool _cached;
     bool _compressed;
     bool _compressed;
+    Wrap _wrapS;
+    Wrap _wrapT;
+    Filter _minFilter;
+    Filter _magFilter;
 };
 };
 
 
 }
 }

+ 1 - 1
gameplay/src/Theme.cpp

@@ -91,9 +91,9 @@ Theme* Theme::create(const char* url)
     const char* textureFile = themeProperties->getString("texture");
     const char* textureFile = themeProperties->getString("texture");
     theme->_texture = Texture::create(textureFile, false);
     theme->_texture = Texture::create(textureFile, false);
     GP_ASSERT(theme->_texture);
     GP_ASSERT(theme->_texture);
-    theme->_texture->setFilterMode(Texture::NEAREST, Texture::NEAREST);
     theme->_spriteBatch = SpriteBatch::create(theme->_texture);
     theme->_spriteBatch = SpriteBatch::create(theme->_texture);
     GP_ASSERT(theme->_spriteBatch);
     GP_ASSERT(theme->_spriteBatch);
+    theme->_spriteBatch->getSampler()->setFilterMode(Texture::NEAREST, Texture::NEAREST);
 
 
     float tw = 1.0f / theme->_texture->getWidth();
     float tw = 1.0f / theme->_texture->getWidth();
     float th = 1.0f / theme->_texture->getHeight();
     float th = 1.0f / theme->_texture->getHeight();

+ 0 - 82
gameplay/src/lua/lua_Texture.cpp

@@ -29,8 +29,6 @@ void luaRegister_Texture()
         {"isCompressed", lua_Texture_isCompressed},
         {"isCompressed", lua_Texture_isCompressed},
         {"isMipmapped", lua_Texture_isMipmapped},
         {"isMipmapped", lua_Texture_isMipmapped},
         {"release", lua_Texture_release},
         {"release", lua_Texture_release},
-        {"setFilterMode", lua_Texture_setFilterMode},
-        {"setWrapMode", lua_Texture_setWrapMode},
         {NULL, NULL}
         {NULL, NULL}
     };
     };
     const luaL_Reg lua_statics[] = 
     const luaL_Reg lua_statics[] = 
@@ -473,86 +471,6 @@ int lua_Texture_release(lua_State* state)
     return 0;
     return 0;
 }
 }
 
 
-int lua_Texture_setFilterMode(lua_State* state)
-{
-    // Get the number of parameters.
-    int paramCount = lua_gettop(state);
-
-    // Attempt to match the parameters to a valid binding.
-    switch (paramCount)
-    {
-        case 3:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
-                (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
-            {
-                // Get parameter 1 off the stack.
-                Texture::Filter param1 = (Texture::Filter)lua_enumFromString_TextureFilter(luaL_checkstring(state, 2));
-
-                // Get parameter 2 off the stack.
-                Texture::Filter param2 = (Texture::Filter)lua_enumFromString_TextureFilter(luaL_checkstring(state, 3));
-
-                Texture* instance = getInstance(state);
-                instance->setFilterMode(param1, param2);
-                
-                return 0;
-            }
-
-            lua_pushstring(state, "lua_Texture_setFilterMode - Failed to match the given parameters to a valid function signature.");
-            lua_error(state);
-            break;
-        }
-        default:
-        {
-            lua_pushstring(state, "Invalid number of parameters (expected 3).");
-            lua_error(state);
-            break;
-        }
-    }
-    return 0;
-}
-
-int lua_Texture_setWrapMode(lua_State* state)
-{
-    // Get the number of parameters.
-    int paramCount = lua_gettop(state);
-
-    // Attempt to match the parameters to a valid binding.
-    switch (paramCount)
-    {
-        case 3:
-        {
-            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
-                (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) &&
-                (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
-            {
-                // Get parameter 1 off the stack.
-                Texture::Wrap param1 = (Texture::Wrap)lua_enumFromString_TextureWrap(luaL_checkstring(state, 2));
-
-                // Get parameter 2 off the stack.
-                Texture::Wrap param2 = (Texture::Wrap)lua_enumFromString_TextureWrap(luaL_checkstring(state, 3));
-
-                Texture* instance = getInstance(state);
-                instance->setWrapMode(param1, param2);
-                
-                return 0;
-            }
-
-            lua_pushstring(state, "lua_Texture_setWrapMode - Failed to match the given parameters to a valid function signature.");
-            lua_error(state);
-            break;
-        }
-        default:
-        {
-            lua_pushstring(state, "Invalid number of parameters (expected 3).");
-            lua_error(state);
-            break;
-        }
-    }
-    return 0;
-}
-
 int lua_Texture_static_create(lua_State* state)
 int lua_Texture_static_create(lua_State* state)
 {
 {
     // Get the number of parameters.
     // Get the number of parameters.

+ 0 - 2
gameplay/src/lua/lua_Texture.h

@@ -17,8 +17,6 @@ int lua_Texture_getWidth(lua_State* state);
 int lua_Texture_isCompressed(lua_State* state);
 int lua_Texture_isCompressed(lua_State* state);
 int lua_Texture_isMipmapped(lua_State* state);
 int lua_Texture_isMipmapped(lua_State* state);
 int lua_Texture_release(lua_State* state);
 int lua_Texture_release(lua_State* state);
-int lua_Texture_setFilterMode(lua_State* state);
-int lua_Texture_setWrapMode(lua_State* state);
 int lua_Texture_static_create(lua_State* state);
 int lua_Texture_static_create(lua_State* state);
 
 
 void luaRegister_Texture();
 void luaRegister_Texture();

+ 62 - 0
install.bat

@@ -0,0 +1,62 @@
+@echo off
+REM
+REM gameplay-install.bat [master | next]
+REM
+REM Download GamePlay resources from HTTP server and extract from ZIP
+REM
+REM Helps prevent repo bloat due to large binary files since they can
+REM be hosted separately.
+REM
+
+REM Production URL
+set prefix=http://www.gameplay3d.org
+
+set branchname=%1
+if "%branchname%" == "" (
+  set branchname=next
+)
+
+set filename=gameplay-deps-%branchname%
+
+echo Downloading %filename%.zip from %prefix%
+%~d0
+cd %~dp0
+> temp1.vbs ECHO Dim strFileURL, strHDLocation
+>> temp1.vbs ECHO strFileURL = WScript.Arguments(0)
+>> temp1.vbs ECHO strHDLocation = WScript.Arguments(1)
+>> temp1.vbs ECHO Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
+>> temp1.vbs ECHO objXMLHTTP.open "GET", strFileURL, false
+>> temp1.vbs ECHO objXMLHTTP.send()
+>> temp1.vbs ECHO If objXMLHTTP.Status = 200 Then
+>> temp1.vbs ECHO Set objADOStream = CreateObject("ADODB.Stream")
+>> temp1.vbs ECHO objADOStream.Open
+>> temp1.vbs ECHO objADOStream.Type = 1
+>> temp1.vbs ECHO objADOStream.Write objXMLHTTP.ResponseBody
+>> temp1.vbs ECHO objADOStream.Position = 0
+>> temp1.vbs ECHO Set objFSO = Createobject("Scripting.FileSystemObject")
+>> temp1.vbs ECHO If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
+>> temp1.vbs ECHO Set objFSO = Nothing
+>> temp1.vbs ECHO objADOStream.SaveToFile strHDLocation
+>> temp1.vbs ECHO objADOStream.Close
+>> temp1.vbs ECHO Set objADOStream = Nothing
+>> temp1.vbs ECHO End if
+>> temp1.vbs ECHO Set objXMLHTTP = Nothing
+cscript temp1.vbs %prefix%/%filename%.zip %filename%.zip
+
+echo Extracting %filename%.zip... please standby...
+%~d0
+cd %~dp0
+> temp2.vbs ECHO Dim fileName, workingDir
+>> temp2.vbs ECHO fileName = WScript.Arguments(0)
+>> temp2.vbs ECHO workingDir = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
+>> temp2.vbs ECHO Set objShell = CreateObject("Shell.Application")
+>> temp2.vbs ECHO Set objSource = objShell.NameSpace(workingDir ^& "\" ^& fileName).Items()
+>> temp2.vbs ECHO Set objTarget = objShell.NameSpace(workingDir ^& "\")
+>> temp2.vbs ECHO intOptions = 256
+>> temp2.vbs ECHO objTarget.CopyHere objSource, intOptions
+cscript temp2.vbs %filename%.zip
+echo Cleaning up...
+del temp1.vbs
+del temp2.vbs
+del %filename%.zip
+echo Done.

+ 26 - 0
install.sh

@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# ./gameplay-install.sh [master | next]
+#
+# Download GamePlay resources from HTTP server and extract from ZIP
+#
+# Helps prevent repo bloat due to large binary files since they can
+# be hosted separately.
+#
+
+prefix=http://www.gameplay3d.org
+
+branchname=$1
+if [[ "$branchname" == "" ]]; then
+  branchname="next"
+fi
+
+filename=gameplay-deps-$branchname
+
+echo Downloading $filename.zip from $prefix...
+curl -# -O $prefix/$filename.zip
+echo Extracting $filename.zip... please standby...
+unzip -q $filename.zip
+echo Cleaning up...
+rm $filename.zip
+echo Done.

+ 0 - 0
tools/gameplay-encoder/CMakeLists.txt → tools/encoder/CMakeLists.txt


+ 0 - 0
tools/gameplay-encoder/README.md → tools/encoder/README.md


+ 0 - 0
tools/gameplay-encoder/gameplay-bundle.txt → tools/encoder/gameplay-bundle.txt


+ 0 - 0
tools/gameplay-encoder/gameplay-encoder.sln → tools/encoder/gameplay-encoder.sln


+ 0 - 0
tools/gameplay-encoder/gameplay-encoder.vcxproj → tools/encoder/gameplay-encoder.vcxproj


+ 0 - 0
tools/gameplay-encoder/gameplay-encoder.vcxproj.filters → tools/encoder/gameplay-encoder.vcxproj.filters


+ 0 - 0
tools/gameplay-encoder/gameplay-encoder.vcxproj.user → tools/encoder/gameplay-encoder.vcxproj.user


+ 0 - 0
tools/gameplay-encoder/gameplay-encoder.xcodeproj/project.pbxproj → tools/encoder/gameplay-encoder.xcodeproj/project.pbxproj


+ 0 - 0
tools/gameplay-encoder/gameplay-encoder.xcodeproj/xcshareddata/xcschemes/gameplay-encoder.xcscheme → tools/encoder/gameplay-encoder.xcodeproj/xcshareddata/xcschemes/gameplay-encoder.xcscheme


+ 0 - 0
tools/gameplay-encoder/src/Animation.cpp → tools/encoder/src/Animation.cpp


+ 0 - 0
tools/gameplay-encoder/src/Animation.h → tools/encoder/src/Animation.h


+ 0 - 0
tools/gameplay-encoder/src/AnimationChannel.cpp → tools/encoder/src/AnimationChannel.cpp


+ 0 - 0
tools/gameplay-encoder/src/AnimationChannel.h → tools/encoder/src/AnimationChannel.h


+ 0 - 0
tools/gameplay-encoder/src/Animations.cpp → tools/encoder/src/Animations.cpp


+ 0 - 0
tools/gameplay-encoder/src/Animations.h → tools/encoder/src/Animations.h


+ 0 - 0
tools/gameplay-encoder/src/Base.cpp → tools/encoder/src/Base.cpp


+ 0 - 0
tools/gameplay-encoder/src/Base.h → tools/encoder/src/Base.h


+ 0 - 0
tools/gameplay-encoder/src/BoundingVolume.cpp → tools/encoder/src/BoundingVolume.cpp


+ 0 - 0
tools/gameplay-encoder/src/BoundingVolume.h → tools/encoder/src/BoundingVolume.h


+ 0 - 0
tools/gameplay-encoder/src/Camera.cpp → tools/encoder/src/Camera.cpp


+ 0 - 0
tools/gameplay-encoder/src/Camera.h → tools/encoder/src/Camera.h


+ 0 - 0
tools/gameplay-encoder/src/Curve.cpp → tools/encoder/src/Curve.cpp


+ 0 - 0
tools/gameplay-encoder/src/Curve.h → tools/encoder/src/Curve.h


+ 0 - 0
tools/gameplay-encoder/src/Curve.inl → tools/encoder/src/Curve.inl


+ 0 - 0
tools/gameplay-encoder/src/Effect.cpp → tools/encoder/src/Effect.cpp


+ 0 - 0
tools/gameplay-encoder/src/Effect.h → tools/encoder/src/Effect.h


+ 0 - 0
tools/gameplay-encoder/src/EncoderArguments.cpp → tools/encoder/src/EncoderArguments.cpp


+ 0 - 0
tools/gameplay-encoder/src/EncoderArguments.h → tools/encoder/src/EncoderArguments.h


+ 0 - 0
tools/gameplay-encoder/src/FBXSceneEncoder.cpp → tools/encoder/src/FBXSceneEncoder.cpp


+ 0 - 0
tools/gameplay-encoder/src/FBXSceneEncoder.h → tools/encoder/src/FBXSceneEncoder.h


+ 0 - 0
tools/gameplay-encoder/src/FileIO.cpp → tools/encoder/src/FileIO.cpp


+ 0 - 0
tools/gameplay-encoder/src/FileIO.h → tools/encoder/src/FileIO.h


+ 0 - 0
tools/gameplay-encoder/src/Font.cpp → tools/encoder/src/Font.cpp


+ 0 - 0
tools/gameplay-encoder/src/Font.h → tools/encoder/src/Font.h


+ 0 - 0
tools/gameplay-encoder/src/GPBDecoder.cpp → tools/encoder/src/GPBDecoder.cpp


+ 0 - 0
tools/gameplay-encoder/src/GPBDecoder.h → tools/encoder/src/GPBDecoder.h


+ 0 - 0
tools/gameplay-encoder/src/GPBFile.cpp → tools/encoder/src/GPBFile.cpp


+ 0 - 0
tools/gameplay-encoder/src/GPBFile.h → tools/encoder/src/GPBFile.h


+ 0 - 0
tools/gameplay-encoder/src/Glyph.cpp → tools/encoder/src/Glyph.cpp


+ 0 - 0
tools/gameplay-encoder/src/Glyph.h → tools/encoder/src/Glyph.h


+ 0 - 0
tools/gameplay-encoder/src/Heightmap.cpp → tools/encoder/src/Heightmap.cpp


+ 0 - 0
tools/gameplay-encoder/src/Heightmap.h → tools/encoder/src/Heightmap.h


+ 0 - 0
tools/gameplay-encoder/src/Image.cpp → tools/encoder/src/Image.cpp


+ 0 - 0
tools/gameplay-encoder/src/Image.h → tools/encoder/src/Image.h


+ 0 - 0
tools/gameplay-encoder/src/Light.cpp → tools/encoder/src/Light.cpp


+ 0 - 0
tools/gameplay-encoder/src/Light.h → tools/encoder/src/Light.h


+ 0 - 0
tools/gameplay-encoder/src/Material.cpp → tools/encoder/src/Material.cpp


+ 0 - 0
tools/gameplay-encoder/src/Material.h → tools/encoder/src/Material.h


+ 0 - 0
tools/gameplay-encoder/src/MaterialParameter.cpp → tools/encoder/src/MaterialParameter.cpp


+ 0 - 0
tools/gameplay-encoder/src/MaterialParameter.h → tools/encoder/src/MaterialParameter.h


+ 0 - 0
tools/gameplay-encoder/src/Matrix.cpp → tools/encoder/src/Matrix.cpp


+ 0 - 0
tools/gameplay-encoder/src/Matrix.h → tools/encoder/src/Matrix.h


+ 0 - 0
tools/gameplay-encoder/src/Mesh.cpp → tools/encoder/src/Mesh.cpp


+ 0 - 0
tools/gameplay-encoder/src/Mesh.h → tools/encoder/src/Mesh.h


+ 0 - 0
tools/gameplay-encoder/src/MeshPart.cpp → tools/encoder/src/MeshPart.cpp


+ 0 - 0
tools/gameplay-encoder/src/MeshPart.h → tools/encoder/src/MeshPart.h


+ 0 - 0
tools/gameplay-encoder/src/MeshSkin.cpp → tools/encoder/src/MeshSkin.cpp


+ 0 - 0
tools/gameplay-encoder/src/MeshSkin.h → tools/encoder/src/MeshSkin.h


+ 0 - 0
tools/gameplay-encoder/src/MeshSubSet.cpp → tools/encoder/src/MeshSubSet.cpp


+ 0 - 0
tools/gameplay-encoder/src/MeshSubSet.h → tools/encoder/src/MeshSubSet.h


+ 0 - 0
tools/gameplay-encoder/src/Model.cpp → tools/encoder/src/Model.cpp


+ 0 - 0
tools/gameplay-encoder/src/Model.h → tools/encoder/src/Model.h


+ 0 - 0
tools/gameplay-encoder/src/Node.cpp → tools/encoder/src/Node.cpp


+ 0 - 0
tools/gameplay-encoder/src/Node.h → tools/encoder/src/Node.h


+ 0 - 0
tools/gameplay-encoder/src/NormalMapGenerator.cpp → tools/encoder/src/NormalMapGenerator.cpp


+ 0 - 0
tools/gameplay-encoder/src/NormalMapGenerator.h → tools/encoder/src/NormalMapGenerator.h


+ 0 - 0
tools/gameplay-encoder/src/Object.cpp → tools/encoder/src/Object.cpp


+ 0 - 0
tools/gameplay-encoder/src/Object.h → tools/encoder/src/Object.h


+ 0 - 0
tools/gameplay-encoder/src/Quaternion.cpp → tools/encoder/src/Quaternion.cpp


+ 0 - 0
tools/gameplay-encoder/src/Quaternion.h → tools/encoder/src/Quaternion.h


+ 0 - 0
tools/gameplay-encoder/src/Quaternion.inl → tools/encoder/src/Quaternion.inl


+ 0 - 0
tools/gameplay-encoder/src/Reference.cpp → tools/encoder/src/Reference.cpp


+ 0 - 0
tools/gameplay-encoder/src/Reference.h → tools/encoder/src/Reference.h


+ 0 - 0
tools/gameplay-encoder/src/ReferenceTable.cpp → tools/encoder/src/ReferenceTable.cpp


+ 0 - 0
tools/gameplay-encoder/src/ReferenceTable.h → tools/encoder/src/ReferenceTable.h


+ 0 - 0
tools/gameplay-encoder/src/Scene.cpp → tools/encoder/src/Scene.cpp


+ 0 - 0
tools/gameplay-encoder/src/Scene.h → tools/encoder/src/Scene.h


+ 0 - 0
tools/gameplay-encoder/src/StringUtil.cpp → tools/encoder/src/StringUtil.cpp


+ 0 - 0
tools/gameplay-encoder/src/StringUtil.h → tools/encoder/src/StringUtil.h


+ 0 - 0
tools/gameplay-encoder/src/TTFFontEncoder.cpp → tools/encoder/src/TTFFontEncoder.cpp


+ 0 - 0
tools/gameplay-encoder/src/TTFFontEncoder.h → tools/encoder/src/TTFFontEncoder.h


+ 0 - 0
tools/gameplay-encoder/src/Thread.h → tools/encoder/src/Thread.h


+ 0 - 0
tools/gameplay-encoder/src/Transform.cpp → tools/encoder/src/Transform.cpp


+ 0 - 0
tools/gameplay-encoder/src/Transform.h → tools/encoder/src/Transform.h


+ 0 - 0
tools/gameplay-encoder/src/Vector2.cpp → tools/encoder/src/Vector2.cpp


+ 0 - 0
tools/gameplay-encoder/src/Vector2.h → tools/encoder/src/Vector2.h


+ 0 - 0
tools/gameplay-encoder/src/Vector2.inl → tools/encoder/src/Vector2.inl


+ 0 - 0
tools/gameplay-encoder/src/Vector3.cpp → tools/encoder/src/Vector3.cpp


+ 0 - 0
tools/gameplay-encoder/src/Vector3.h → tools/encoder/src/Vector3.h


+ 0 - 0
tools/gameplay-encoder/src/Vector3.inl → tools/encoder/src/Vector3.inl


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