Selaa lähdekoodia

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

setaylor 13 vuotta sitten
vanhempi
sitoutus
b007329a71

+ 12 - 12
gameplay/gameplay.xcodeproj/project.pbxproj

@@ -13,6 +13,10 @@
 		4208DEEA14A4079F00D3C511 /* Image.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEE714A4079F00D3C511 /* Image.h */; };
 		4208DEEC14A407B900D3C511 /* Keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEEB14A407B900D3C511 /* Keyboard.h */; };
 		4208DEEE14A407D500D3C511 /* Touch.h in Headers */ = {isa = PBXBuildFile; fileRef = 4208DEED14A407D500D3C511 /* Touch.h */; };
+		422260D61537790F0011E3AB /* Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 422260D41537790F0011E3AB /* Bundle.cpp */; };
+		422260D71537790F0011E3AB /* Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 422260D41537790F0011E3AB /* Bundle.cpp */; };
+		422260D81537790F0011E3AB /* Bundle.h in Headers */ = {isa = PBXBuildFile; fileRef = 422260D51537790F0011E3AB /* Bundle.h */; };
+		422260D91537790F0011E3AB /* Bundle.h in Headers */ = {isa = PBXBuildFile; fileRef = 422260D51537790F0011E3AB /* Bundle.h */; };
 		4234D99E14686C52003031B3 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4234D99D14686C52003031B3 /* Cocoa.framework */; };
 		4251B131152D049B002F6199 /* ScreenDisplayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4251B12E152D049B002F6199 /* ScreenDisplayer.h */; };
 		4251B132152D049B002F6199 /* ScreenDisplayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4251B12E152D049B002F6199 /* ScreenDisplayer.h */; };
@@ -99,8 +103,6 @@
 		42CD0E88147D8FF60000361E /* Model.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF6147D8FF50000361E /* Model.h */; };
 		42CD0E89147D8FF60000361E /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF7147D8FF50000361E /* Node.cpp */; };
 		42CD0E8A147D8FF60000361E /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF8147D8FF50000361E /* Node.h */; };
-		42CD0E8B147D8FF60000361E /* Package.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF9147D8FF50000361E /* Package.cpp */; };
-		42CD0E8C147D8FF60000361E /* Package.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFA147D8FF50000361E /* Package.h */; };
 		42CD0E8D147D8FF60000361E /* ParticleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */; };
 		42CD0E8E147D8FF60000361E /* ParticleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFC147D8FF50000361E /* ParticleEmitter.h */; };
 		42CD0E8F147D8FF60000361E /* Pass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFD147D8FF50000361E /* Pass.cpp */; };
@@ -192,7 +194,6 @@
 		5B04C54C14BFCFE100EB0071 /* MeshSkin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF3147D8FF50000361E /* MeshSkin.cpp */; };
 		5B04C54D14BFCFE100EB0071 /* Model.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF5147D8FF50000361E /* Model.cpp */; };
 		5B04C54E14BFCFE100EB0071 /* Node.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF7147D8FF50000361E /* Node.cpp */; };
-		5B04C54F14BFCFE100EB0071 /* Package.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DF9147D8FF50000361E /* Package.cpp */; };
 		5B04C55014BFCFE100EB0071 /* ParticleEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */; };
 		5B04C55114BFCFE100EB0071 /* Pass.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFD147D8FF50000361E /* Pass.cpp */; };
 		5B04C55214BFCFE100EB0071 /* PhysicsConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 42CD0DFF147D8FF50000361E /* PhysicsConstraint.cpp */; };
@@ -264,7 +265,6 @@
 		5B04C59F14BFCFE100EB0071 /* MeshSkin.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF4147D8FF50000361E /* MeshSkin.h */; };
 		5B04C5A014BFCFE100EB0071 /* Model.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF6147D8FF50000361E /* Model.h */; };
 		5B04C5A114BFCFE100EB0071 /* Node.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DF8147D8FF50000361E /* Node.h */; };
-		5B04C5A214BFCFE100EB0071 /* Package.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFA147D8FF50000361E /* Package.h */; };
 		5B04C5A314BFCFE100EB0071 /* ParticleEmitter.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFC147D8FF50000361E /* ParticleEmitter.h */; };
 		5B04C5A414BFCFE100EB0071 /* Pass.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0DFE147D8FF50000361E /* Pass.h */; };
 		5B04C5A514BFCFE100EB0071 /* PhysicsConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 42CD0E00147D8FF50000361E /* PhysicsConstraint.h */; };
@@ -391,6 +391,8 @@
 		4208DEE814A4079F00D3C511 /* Image.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Image.inl; path = src/Image.inl; sourceTree = SOURCE_ROOT; };
 		4208DEEB14A407B900D3C511 /* Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Keyboard.h; path = src/Keyboard.h; sourceTree = SOURCE_ROOT; };
 		4208DEED14A407D500D3C511 /* Touch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Touch.h; path = src/Touch.h; sourceTree = SOURCE_ROOT; };
+		422260D41537790F0011E3AB /* Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Bundle.cpp; path = src/Bundle.cpp; sourceTree = SOURCE_ROOT; };
+		422260D51537790F0011E3AB /* Bundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bundle.h; path = src/Bundle.h; sourceTree = SOURCE_ROOT; };
 		4234D99A14686C52003031B3 /* libgameplay.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libgameplay.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		4234D99D14686C52003031B3 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
 		4251B12E152D049B002F6199 /* ScreenDisplayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenDisplayer.h; path = src/ScreenDisplayer.h; sourceTree = SOURCE_ROOT; };
@@ -478,8 +480,6 @@
 		42CD0DF6147D8FF50000361E /* Model.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Model.h; path = src/Model.h; sourceTree = SOURCE_ROOT; };
 		42CD0DF7147D8FF50000361E /* Node.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Node.cpp; path = src/Node.cpp; sourceTree = SOURCE_ROOT; };
 		42CD0DF8147D8FF50000361E /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = src/Node.h; sourceTree = SOURCE_ROOT; };
-		42CD0DF9147D8FF50000361E /* Package.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Package.cpp; path = src/Package.cpp; sourceTree = SOURCE_ROOT; };
-		42CD0DFA147D8FF50000361E /* Package.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Package.h; path = src/Package.h; sourceTree = SOURCE_ROOT; };
 		42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ParticleEmitter.cpp; path = src/ParticleEmitter.cpp; sourceTree = SOURCE_ROOT; };
 		42CD0DFC147D8FF50000361E /* ParticleEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ParticleEmitter.h; path = src/ParticleEmitter.h; sourceTree = SOURCE_ROOT; };
 		42CD0DFD147D8FF50000361E /* Pass.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Pass.cpp; path = src/Pass.cpp; sourceTree = SOURCE_ROOT; };
@@ -707,6 +707,8 @@
 				42CD0DC7147D8FF50000361E /* BoundingSphere.cpp */,
 				42CD0DC8147D8FF50000361E /* BoundingSphere.h */,
 				42CD0DC9147D8FF50000361E /* BoundingSphere.inl */,
+				422260D41537790F0011E3AB /* Bundle.cpp */,
+				422260D51537790F0011E3AB /* Bundle.h */,
 				5BD52636150F822A004C9099 /* Button.cpp */,
 				5BD52637150F822A004C9099 /* Button.h */,
 				42CD0DCA147D8FF50000361E /* Camera.cpp */,
@@ -779,8 +781,6 @@
 				5BB0823C14C6FEC40019975F /* Mouse.h */,
 				42CD0DF7147D8FF50000361E /* Node.cpp */,
 				42CD0DF8147D8FF50000361E /* Node.h */,
-				42CD0DF9147D8FF50000361E /* Package.cpp */,
-				42CD0DFA147D8FF50000361E /* Package.h */,
 				42CD0DFB147D8FF50000361E /* ParticleEmitter.cpp */,
 				42CD0DFC147D8FF50000361E /* ParticleEmitter.h */,
 				42CD0DFD147D8FF50000361E /* Pass.cpp */,
@@ -998,7 +998,6 @@
 				42CD0E86147D8FF60000361E /* MeshSkin.h in Headers */,
 				42CD0E88147D8FF60000361E /* Model.h in Headers */,
 				42CD0E8A147D8FF60000361E /* Node.h in Headers */,
-				42CD0E8C147D8FF60000361E /* Package.h in Headers */,
 				42CD0E8E147D8FF60000361E /* ParticleEmitter.h in Headers */,
 				42CD0E90147D8FF60000361E /* Pass.h in Headers */,
 				42CD0E92147D8FF60000361E /* PhysicsConstraint.h in Headers */,
@@ -1055,6 +1054,7 @@
 				42554EA3152BC35C000ED910 /* PhysicsCollisionShape.h in Headers */,
 				4251B131152D049B002F6199 /* ScreenDisplayer.h in Headers */,
 				4251B135152D049B002F6199 /* ThemeStyle.h in Headers */,
+				422260D81537790F0011E3AB /* Bundle.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1095,7 +1095,6 @@
 				5B04C59F14BFCFE100EB0071 /* MeshSkin.h in Headers */,
 				5B04C5A014BFCFE100EB0071 /* Model.h in Headers */,
 				5B04C5A114BFCFE100EB0071 /* Node.h in Headers */,
-				5B04C5A214BFCFE100EB0071 /* Package.h in Headers */,
 				5B04C5A314BFCFE100EB0071 /* ParticleEmitter.h in Headers */,
 				5B04C5A414BFCFE100EB0071 /* Pass.h in Headers */,
 				5B04C5A514BFCFE100EB0071 /* PhysicsConstraint.h in Headers */,
@@ -1151,6 +1150,7 @@
 				42554EA4152BC35C000ED910 /* PhysicsCollisionShape.h in Headers */,
 				4251B132152D049B002F6199 /* ScreenDisplayer.h in Headers */,
 				4251B136152D049B002F6199 /* ThemeStyle.h in Headers */,
+				422260D91537790F0011E3AB /* Bundle.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1254,7 +1254,6 @@
 				42CD0E85147D8FF60000361E /* MeshSkin.cpp in Sources */,
 				42CD0E87147D8FF60000361E /* Model.cpp in Sources */,
 				42CD0E89147D8FF60000361E /* Node.cpp in Sources */,
-				42CD0E8B147D8FF60000361E /* Package.cpp in Sources */,
 				42CD0E8D147D8FF60000361E /* ParticleEmitter.cpp in Sources */,
 				42CD0E8F147D8FF60000361E /* Pass.cpp in Sources */,
 				42CD0E91147D8FF60000361E /* PhysicsConstraint.cpp in Sources */,
@@ -1306,6 +1305,7 @@
 				42554EA1152BC35C000ED910 /* PhysicsCollisionShape.cpp in Sources */,
 				4251B133152D049B002F6199 /* ThemeStyle.cpp in Sources */,
 				4271C08E15337C8200B89DA7 /* Layout.cpp in Sources */,
+				422260D61537790F0011E3AB /* Bundle.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1344,7 +1344,6 @@
 				5B04C54C14BFCFE100EB0071 /* MeshSkin.cpp in Sources */,
 				5B04C54D14BFCFE100EB0071 /* Model.cpp in Sources */,
 				5B04C54E14BFCFE100EB0071 /* Node.cpp in Sources */,
-				5B04C54F14BFCFE100EB0071 /* Package.cpp in Sources */,
 				5B04C55014BFCFE100EB0071 /* ParticleEmitter.cpp in Sources */,
 				5B04C55114BFCFE100EB0071 /* Pass.cpp in Sources */,
 				5B04C55214BFCFE100EB0071 /* PhysicsConstraint.cpp in Sources */,
@@ -1397,6 +1396,7 @@
 				42554EA2152BC35C000ED910 /* PhysicsCollisionShape.cpp in Sources */,
 				4251B134152D049B002F6199 /* ThemeStyle.cpp in Sources */,
 				4271C08F15337C8200B89DA7 /* Layout.cpp in Sources */,
+				422260D71537790F0011E3AB /* Bundle.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

+ 28 - 28
gameplay/src/Bundle.cpp

@@ -5,26 +5,26 @@
 #include "Scene.h"
 #include "Joint.h"
 
-#define GPB_PACKAGE_VERSION_MAJOR 1
-#define GPB_PACKAGE_VERSION_MINOR 1
-
-#define PACKAGE_TYPE_SCENE 1
-#define PACKAGE_TYPE_NODE 2
-#define PACKAGE_TYPE_ANIMATIONS 3
-#define PACKAGE_TYPE_ANIMATION 4
-#define PACKAGE_TYPE_ANIMATION_CHANNEL 5
-#define PACKAGE_TYPE_MMODEL 10
-#define PACKAGE_TYPE_MATERIAL 16
-#define PACKAGE_TYPE_EFFECT 18
-#define PACKAGE_TYPE_CAMERA 32
-#define PACKAGE_TYPE_LIGHT 33
-#define PACKAGE_TYPE_MESH 34
-#define PACKAGE_TYPE_MESHPART 35
-#define PACKAGE_TYPE_MESHSKIN 36
-#define PACKAGE_TYPE_FONT 128
+#define BUNDLE_VERSION_MAJOR            1
+#define BUNDLE_VERSION_MINOR            1
+
+#define BUNDLE_TYPE_SCENE               1
+#define BUNDLE_TYPE_NODE                2
+#define BUNDLE_TYPE_ANIMATIONS          3
+#define BUNDLE_TYPE_ANIMATION           4
+#define BUNDLE_TYPE_ANIMATION_CHANNEL   5
+#define BUNDLE_TYPE_MODEL               10
+#define BUNDLE_TYPE_MATERIAL            16
+#define BUNDLE_TYPE_EFFECT              18
+#define BUNDLE_TYPE_CAMERA              32
+#define BUNDLE_TYPE_LIGHT               33
+#define BUNDLE_TYPE_MESH                34
+#define BUNDLE_TYPE_MESHPART            35
+#define BUNDLE_TYPE_MESHSKIN            36
+#define BUNDLE_TYPE_FONT                128
 
 // For sanity checking string reads
-#define PACKAGE_MAX_STRING_LENGTH 5000
+#define BUNDLE_MAX_STRING_LENGTH        5000
 
 namespace gameplay
 {
@@ -122,7 +122,7 @@ std::string readString(FILE* fp)
     }
 
     // Sanity check to detect if string length is far too big
-    assert(length < PACKAGE_MAX_STRING_LENGTH);
+    assert(length < BUNDLE_MAX_STRING_LENGTH);
 
     std::string str;
     if (length > 0)
@@ -169,9 +169,9 @@ Bundle* Bundle::create(const char* path)
 
     // Read version
     unsigned char ver[2];
-    if (fread(ver, 1, 2, fp) != 2 || ver[0] != GPB_PACKAGE_VERSION_MAJOR || ver[1] != GPB_PACKAGE_VERSION_MINOR)
+    if (fread(ver, 1, 2, fp) != 2 || ver[0] != BUNDLE_VERSION_MAJOR || ver[1] != BUNDLE_VERSION_MINOR)
     {
-        LOG_ERROR_VARG("Unsupported version (%d.%d) for bundle: %s (expected %d.%d)", (int)ver[0], (int)ver[1], path, GPB_PACKAGE_VERSION_MAJOR, GPB_PACKAGE_VERSION_MINOR);
+        LOG_ERROR_VARG("Unsupported version (%d.%d) for bundle: %s (expected %d.%d)", (int)ver[0], (int)ver[1], path, BUNDLE_VERSION_MAJOR, BUNDLE_VERSION_MINOR);
         fclose(fp);
         return NULL;
     }
@@ -324,11 +324,11 @@ Scene* Bundle::loadScene(const char* id)
     Reference* ref = NULL;
     if (id)
     {
-        ref = seekTo(id, PACKAGE_TYPE_SCENE);
+        ref = seekTo(id, BUNDLE_TYPE_SCENE);
     }
     else
     {
-        ref = seekToFirstType(PACKAGE_TYPE_SCENE);
+        ref = seekToFirstType(BUNDLE_TYPE_SCENE);
     }
     if (!ref)
     {
@@ -393,7 +393,7 @@ Scene* Bundle::loadScene(const char* id)
     for (unsigned int i = 0; i < _referenceCount; ++i)
     {
         Reference* ref = &_references[i];
-        if (ref->type == PACKAGE_TYPE_ANIMATIONS)
+        if (ref->type == BUNDLE_TYPE_ANIMATIONS)
         {
             // Found a match
             if (fseek(_file, ref->offset, SEEK_SET) != 0)
@@ -446,7 +446,7 @@ Node* Bundle::loadNode(const char* id, Scene* sceneContext, Node* nodeContext)
     if (node == NULL)
     {
         // If not yet found, search the ref table and read
-        Reference* ref = seekTo(id, PACKAGE_TYPE_NODE);
+        Reference* ref = seekTo(id, BUNDLE_TYPE_NODE);
         if (ref == NULL)
         {
             return NULL;
@@ -986,7 +986,7 @@ Mesh* Bundle::loadMesh(const char* id, const char* nodeId)
     long position = ftell(_file);
 
     // Seek to the specified Mesh
-    Reference* ref = seekTo(id, PACKAGE_TYPE_MESH);
+    Reference* ref = seekTo(id, BUNDLE_TYPE_MESH);
     if (ref == NULL)
     {
         return NULL;
@@ -1168,7 +1168,7 @@ Bundle::MeshData* Bundle::readMeshData(const char* url)
         return NULL;
 
     // Seek to mesh with specified ID in bundle
-    Reference* ref = pkg->seekTo(id.c_str(), PACKAGE_TYPE_MESH);
+    Reference* ref = pkg->seekTo(id.c_str(), BUNDLE_TYPE_MESH);
     if (ref == NULL)
         return NULL;
 
@@ -1183,7 +1183,7 @@ Bundle::MeshData* Bundle::readMeshData(const char* url)
 Font* Bundle::loadFont(const char* id)
 {
     // Seek to the specified Font
-    Reference* ref = seekTo(id, PACKAGE_TYPE_FONT);
+    Reference* ref = seekTo(id, BUNDLE_TYPE_FONT);
     if (ref == NULL)
     {
         return NULL;

+ 1 - 1
gameplay/src/Bundle.h

@@ -11,7 +11,7 @@ namespace gameplay
 
 /**
  * Represents a gameplay bundle file (.gpb) that contains a
- * collection of game resources that can be loaded.
+ * collection of binary game assets that can be loaded.
  */
 class Bundle : public Ref
 {

+ 2 - 1
gameplay/src/MeshBatch.cpp

@@ -151,7 +151,7 @@ bool MeshBatch::resize(unsigned int capacity)
 
     return true;
 }
-
+    
 void MeshBatch::begin()
 {
     _vertexCount = 0;
@@ -193,5 +193,6 @@ void MeshBatch::draw()
         pass->unbind();
     }
 }
+    
 
 }

+ 6 - 6
gameplay/src/MeshBatch.inl

@@ -12,12 +12,12 @@ template <class T>
 void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indices, unsigned int indexCount)
 {
     assert(sizeof(T) == _vertexFormat.getVertexSize());
-
+    
     unsigned int newVertexCount = _vertexCount + vertexCount;
     unsigned int newIndexCount = _indexCount + indexCount;
     if (_primitiveType == Mesh::TRIANGLE_STRIP && _vertexCount > 0)
         newIndexCount += 2; // need an extra 2 indices for connecting strips with degenerate triangles
-
+    
     // Do we need to grow the batch?
     while (newVertexCount > _vertexCapacity || (_indexed && newIndexCount > _indexCapacity))
     {
@@ -26,11 +26,11 @@ void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indic
         if (!resize(_capacity + _growSize))
             return; // failed to grow
     }
-
+    
     // Copy vertex data
     unsigned int vBytes = vertexCount * _vertexFormat.getVertexSize();
     memcpy(_verticesPtr, vertices, vBytes);
-
+    
     // Copy index data
     if (_indexed)
     {
@@ -49,7 +49,7 @@ void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indic
                 _indicesPtr[1] = _vertexCount;
                 _indicesPtr += 2;
             }
-
+            
             // Loop through all indices and insert them, their their value offset by
             // 'vertexCount' so that they are relative to the first newly insertted vertex
             for (unsigned int i = 0; i < indexCount; ++i)
@@ -60,7 +60,7 @@ void MeshBatch::add(T* vertices, unsigned int vertexCount, unsigned short* indic
         _indicesPtr += indexCount;
         _indexCount = newIndexCount;
     }
-
+    
     _verticesPtr += vBytes;
     _vertexCount = newVertexCount;
 }