Преглед изворни кода

Generated GamePlay 1.2.0 API.
Updated README.md for GamePlay 1.2.0.
Added GamePlay Dox file for documentation headers.
Moved SpriteVertex to gameplay namespace.

Sean Paul Taylor пре 14 година
родитељ
комит
116f0953d8

+ 16 - 12
README.md

@@ -1,18 +1,23 @@
-## GamePlay v1.1.0
+## GamePlay v1.2.0
 GamePlay is a open-source, cross-platform 3D native gaming framework making it easy to learn and write mobile and desktop games. 
 
-## Supported Platforms
-- BlackBerry PlayBook 1.0/2.0 (using BlackBerry Native SDK 1.0/2.0)
-- Apple MacOS X (using Apple XCode 4.0)
-- Microsoft Windows 7 (using Microsoft Visual Studio 2010 Pro/Express)
-	* Requires OpenAL 1.1 (http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx)
+## Supported Mobile Platforms
+- BlackBerry PlayBook 1/2 (using BlackBerry Native SDK 2)
+- Google Android 4 (using Google Android NDK 7)
+- Apple iOS 4/5 (using Apple XCode 4)
+
+## Supported Desktop Platforms
+- Apple MacOS X (using Apple XCode 4)
+- Microsoft Windows XP/7 (using Microsoft Visual Studio 2010)
+    * Requires [Creative OpenAL 1.1] (http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx)
 
 ## Roadmap for 'next' branch
-- UI Forms with Themed Overlays.
-- Improvements to Lighting.
-- Developer Guide.
-- More Samples and Tutorials.
-- Apple iOS 5 Support.
+- UI Overlays
+- Improvements to Lighting
+- More Samples and Tutorials
+
+## Licence
+The project is open sourced under the Apache 2.0 license.
 
 ## Bug Reporting and Feature Requests
 If you find a bug in a Sample, or have an enhancement request, simply file an 
@@ -27,4 +32,3 @@ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIG
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
 OTHER DEALINGS IN THE SOFTWARE.
-

+ 2 - 2
gameplay.doxyfile

@@ -32,7 +32,7 @@ PROJECT_NAME           = GamePlay
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 1.1.0
+PROJECT_NUMBER         = 1.2.0
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # for a project that appears at the top of each page and should give viewer 
@@ -45,7 +45,7 @@ PROJECT_BRIEF          =
 # exceed 55 pixels and the maximum width should not exceed 200 pixels. 
 # Doxygen will copy the logo to the output directory.
 
-PROJECT_LOGO           = 
+PROJECT_LOGO           = C:/Code/GamePlay/gameplay-logo.png
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 

+ 2 - 0
gameplay/gameplay.vcxproj

@@ -186,11 +186,13 @@
     <None Include="src\BoundingSphere.inl" />
     <None Include="src\Curve.inl" />
     <None Include="src\Game.inl" />
+    <None Include="src\gameplay-main-ios.mm" />
     <None Include="src\gameplay-main-macos.mm" />
     <None Include="src\Image.inl" />
     <None Include="src\Matrix.inl" />
     <None Include="src\MeshBatch.inl" />
     <None Include="src\Plane.inl" />
+    <None Include="src\PlatformiOS.mm" />
     <None Include="src\PlatformMacOS.mm" />
     <None Include="src\Quaternion.inl" />
     <None Include="src\Ray.inl" />

+ 6 - 0
gameplay/gameplay.vcxproj.filters

@@ -526,6 +526,12 @@
     <None Include="src\MeshBatch.inl">
       <Filter>src</Filter>
     </None>
+    <None Include="src\gameplay-main-ios.mm">
+      <Filter>src</Filter>
+    </None>
+    <None Include="src\PlatformiOS.mm">
+      <Filter>src</Filter>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <None Include="src\PhysicsFixedConstraint.inl">

+ 8 - 8
gameplay/src/SpriteBatch.cpp

@@ -14,14 +14,6 @@
     vtx.u = vu; vtx.v = vv; \
     vtx.r = vr; vtx.g = vg; vtx.b = vb; vtx.a = va
 
-// Sprite vertex structured used for batching
-struct SpriteVertex
-{
-    float x, y, z;
-    float u, v;
-    float r, g, b, a;
-};
-
 // Default sprite vertex shader
 #define SPRITE_VSH \
     "uniform mat4 u_projectionMatrix;\n" \
@@ -53,6 +45,14 @@ struct SpriteVertex
 namespace gameplay
 {
 
+// Sprite vertex structured used for batching
+struct SpriteVertex
+{
+    float x, y, z;
+    float u, v;
+    float r, g, b, a;
+};
+
 // Shared sprite effects
 static Effect* __spriteEffect = NULL;
 

+ 3 - 6
gameplay/src/gameplay-main-ios.mm

@@ -1,6 +1,3 @@
-#ifndef GAMEPLAYMAINIOS_H_
-#define GAMEPLAYMAINIOS_H_
-
 #ifdef __APPLE__
 
 #include "gameplay.h"
@@ -15,9 +12,9 @@ int main(int argc, char** argv)
     Game* game = Game::getInstance();
     assert(game != NULL);
     Platform* platform = Platform::create(game);
-    return platform->enterMessagePump();
+    int result = platform->enterMessagePump();
+	delete platform;
+    return result;
 }
 
 #endif
-
-#endif

+ 3 - 1
gameplay/src/gameplay-main-macos.mm

@@ -12,7 +12,9 @@ int main(int argc, char** argv)
     Game* game = Game::getInstance();
     assert(game != NULL);
     Platform* platform = Platform::create(game);
-    return platform->enterMessagePump();
+    int result = platform->enterMessagePump();
+	delete platform;
+    return result;
 }
 
 #endif

+ 39 - 0
gameplay/src/gameplay.dox

@@ -0,0 +1,39 @@
+/** \mainpage GamePlay - 3D Game Framework
+ *
+ * \section intro Introduction
+ *
+ * GamePlay is a cross-platform, C++, 3D gaming framework that includes a runtime library, tools,
+ * and learning content that allows developers to write games for mobile and desktop platforms
+ * without worrying about platform details.
+ *
+ * \section License
+ *
+ * The project is open sourced under the Apache 2.0 license.
+ *
+ * \section Project Features
+ *
+ * The GamePlay C++ runtime library offers a simple, well-defined, 3D gaming framework that's
+ * designed to get the most out of today's mobile and desktop platforms. Its purpose is to help you
+ * create stunning, world-class, games that harness the power and performance of the platform without
+ * being concerned about the platform details. This is accomplished through a set of C++ classes that
+ * are built on top of the OS, providing access to the hardware, graphics, and audio libraries
+ * (including EGL, OpenGL ES 2.0, and OpenAL 1.1). These classes allow you to:
+ *
+ * <b>Build your game without worrying about platform details</b>
+ * \li Drive your game with application initialization, update, and render callbacks.
+ * \li Control your game with touch screen, keyboard and accelerometer handlers.
+ * \li Manage your game with control over the device's file system.
+ *
+ * <b>Create game components with ease</b>
+ * \li Add visuals with scene, node, camera, light, mesh, texture, sprite, materials, animation, and physics classes.
+ * \li Control and position the game using the viewport, camera, and audio listener.
+ * \li Manage fundamental elements such as fonts, colors, and curves.
+ * \li Update game data with built-in math classes for vectors, matrices, rays, planes, and their associated operations.
+ *
+ * <b>Improve your game and learn</b>
+ * \li Supports TrueType fonts and the Khronos COLLADA and FBX interchange formats to import and binary encode your 3D game assets.
+ * \li Built-in materials and shaders to enhance your game's rendering.
+ * \li Both mobile and desktop platforms are supported for ease of portability.
+ * \li Documentation, tutorials, and code samples are provided.
+ *
+ */