Browse Source

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

Conflicts:
	gameplay-tests/src/TestsGame.cpp
	samples/browser/src/FormsSample.cpp
ablake 12 years ago
parent
commit
46f490421a
100 changed files with 4668 additions and 929 deletions
  1. 208 207
      .gitignore
  2. 3 0
      CHANGES.md
  3. 1 5
      CMakeLists.txt
  4. 3 0
      api/README.md
  5. 0 0
      api/header.html
  6. 0 0
      codestyle.xml
  7. 0 5
      gameplay-api/gameplay.html
  8. 0 333
      gameplay-template/gameplay-template.vcxproj
  9. 2 2
      gameplay.doxyfile
  10. 8 8
      gameplay.sln
  11. 0 30
      gameplay.workspace
  12. 9 9
      gameplay.xcworkspace/contents.xcworkspacedata
  13. 1 0
      gameplay/.cproject
  14. 4 0
      gameplay/CMakeLists.txt
  15. 2 5
      gameplay/android/build.xml
  16. 1 14
      gameplay/android/jni/Android.mk
  17. 5 7
      gameplay/gameplay.vcxproj
  18. 1 1
      gameplay/gameplay.xcodeproj/xcshareddata/xcschemes/gameplay-ios.xcscheme
  19. 1 1
      gameplay/gameplay.xcodeproj/xcshareddata/xcschemes/gameplay-macosx.xcscheme
  20. 12 1
      gameplay/src/AIStateMachine.cpp
  21. 6 8
      gameplay/src/Form.cpp
  22. 5 0
      gameplay/src/ImageControl.cpp
  23. 4 2
      gameplay/src/ImageControl.h
  24. 6 0
      gameplay/src/Light.cpp
  25. 5 0
      gameplay/src/MaterialParameter.cpp
  26. 14 4
      gameplay/src/MaterialParameter.h
  27. 33 1
      gameplay/src/Node.cpp
  28. 1 0
      gameplay/src/Node.h
  29. 5 4
      gameplay/src/Pass.cpp
  30. 15 8
      gameplay/src/PlatformLinux.cpp
  31. 15 14
      gameplay/src/PlatformMacOSX.mm
  32. 154 68
      gameplay/src/RenderState.cpp
  33. 15 21
      gameplay/src/RenderState.h
  34. 14 1
      gameplay/src/ScriptController.cpp
  35. 1 0
      gameplay/src/Technique.cpp
  36. 40 22
      gameplay/src/Texture.cpp
  37. 4 16
      gameplay/src/Texture.h
  38. 1 1
      gameplay/src/Theme.cpp
  39. 0 82
      gameplay/src/lua/lua_Texture.cpp
  40. 0 2
      gameplay/src/lua/lua_Texture.h
  41. 117 0
      install.bat
  42. 26 0
      install.sh
  43. 23 23
      newproject.bat
  44. 24 24
      newproject.sh
  45. 51 0
      samples/BuildHelpers.CMakeLists.txt
  46. 58 0
      samples/CMakeLists.txt
  47. 663 0
      samples/browser/.cproject
  48. 90 0
      samples/browser/.project
  49. 117 0
      samples/browser/CMakeLists.txt
  50. 0 0
      samples/browser/[email protected]
  51. 31 0
      samples/browser/android/AndroidManifest.xml
  52. 95 0
      samples/browser/android/build.xml
  53. 94 0
      samples/browser/android/jni/Android.mk
  54. 0 0
      samples/browser/android/jni/Application.mk
  55. BIN
      samples/browser/android/res/drawable/icon.png
  56. 4 0
      samples/browser/android/res/values/strings.xml
  57. 106 0
      samples/browser/bar-descriptor.xml
  58. 17 0
      samples/browser/game.config
  59. 0 0
      samples/browser/icon.png
  60. BIN
      samples/browser/res/common/arial14.gpb
  61. BIN
      samples/browser/res/common/arial18.gpb
  62. BIN
      samples/browser/res/common/baroque.gpb
  63. BIN
      samples/browser/res/common/box.gpb
  64. 39 0
      samples/browser/res/common/box.material
  65. 225 0
      samples/browser/res/common/camera.lua
  66. BIN
      samples/browser/res/common/constraints.gpb
  67. 54 0
      samples/browser/res/common/constraints.physics
  68. 67 0
      samples/browser/res/common/constraints.scene
  69. BIN
      samples/browser/res/common/custom.gpb
  70. 368 0
      samples/browser/res/common/default.theme
  71. BIN
      samples/browser/res/common/duck.gpb
  72. 39 0
      samples/browser/res/common/duck.material
  73. BIN
      samples/browser/res/common/dynamic.gpb
  74. BIN
      samples/browser/res/common/footsteps.wav
  75. 116 0
      samples/browser/res/common/forms/formBasicControls.form
  76. 53 0
      samples/browser/res/common/forms/formFlowLayout.form
  77. 117 0
      samples/browser/res/common/forms/formScrolling.form
  78. 45 0
      samples/browser/res/common/forms/formSelect.form
  79. 53 0
      samples/browser/res/common/forms/formVerticalLayout.form
  80. 29 0
      samples/browser/res/common/forms/formZOrder.form
  81. 51 0
      samples/browser/res/common/gamepad.form
  82. 82 0
      samples/browser/res/common/gamepad.theme
  83. 23 0
      samples/browser/res/common/grid.material
  84. 34 0
      samples/browser/res/common/inputs.form
  85. 142 0
      samples/browser/res/common/light.form
  86. 480 0
      samples/browser/res/common/light.material
  87. BIN
      samples/browser/res/common/lightBrickWall.gpb
  88. 33 0
      samples/browser/res/common/physics.form
  89. BIN
      samples/browser/res/common/physics.gpb
  90. 64 0
      samples/browser/res/common/physics.material
  91. 54 0
      samples/browser/res/common/physics.physics
  92. 66 0
      samples/browser/res/common/physics.scene
  93. BIN
      samples/browser/res/common/pirulen.gpb
  94. 70 0
      samples/browser/res/common/postprocess/postprocess.material
  95. 12 0
      samples/browser/res/common/postprocess/postprocess.vert
  96. 28 0
      samples/browser/res/common/postprocess/postprocess_gaussianblur.frag
  97. 17 0
      samples/browser/res/common/postprocess/postprocess_grayscale.frag
  98. 146 0
      samples/browser/res/common/postprocess/postprocess_oldfilm.frag
  99. 15 0
      samples/browser/res/common/postprocess/postprocess_passthrough.frag
  100. 31 0
      samples/browser/res/common/postprocess/postprocess_pixelate.frag

+ 208 - 207
.gitignore

@@ -23,17 +23,9 @@ Thumbs.db
 /Device-Profile
 /Device-Release
 /gameplay-internal
-/gameplay-api/xml
-
-/gameplay-encoder/Debug
-/gameplay-encoder/Release
-/gameplay-encoder/gameplay-encoder.xcodeproj/xcuserdata
-
-/gameplay-luagen/Release
-/gameplay-luagen/Debug
-/gameplay-luagen/doxygen_entrydb_680.tmp
-/gameplay-luagen/doxygen_objdb_680.tmp
-/gameplay-luagen/xml
+/api/xml
+/bin
+/external-deps
 
 /gameplay/Debug
 /gameplay/DebugMem
@@ -45,8 +37,6 @@ Thumbs.db
 /gameplay/Device-Coverage
 /gameplay/Device-Profile
 /gameplay/Device-Release
-/gameplay.xcworkspace/xcuserdata
-/gameplay/gameplay.xcodeproj/xcuserdata
 /gameplay/windows
 /gameplay/android/NUL
 /gameplay/android/proguard.cfg
@@ -54,208 +44,219 @@ Thumbs.db
 /gameplay/android/local.properties
 /gameplay/android/project.properties
 /gameplay/android/obj
+/gameplay.xcworkspace/xcuserdata
+/gameplay/gameplay.xcodeproj/xcuserdata
 
-/gameplay-tests/Debug
-/gameplay-tests/DebugMem
-/gameplay-tests/Release
-/gameplay-tests/Simulator
-/gameplay-tests/Simulator-Coverage
-/gameplay-tests/Simulator-Profile
-/gameplay-tests/Device-Debug
-/gameplay-tests/Device-Coverage
-/gameplay-tests/Device-Profile
-/gameplay-tests/Device-Release
-/gameplay-tests/res/shaders
-/gameplay-tests/res/logo_powered_white.png
-/gameplay-tests/gameplay-tests.xcodeproj/xcuserdata
-/gameplay-tests/android/src
-/gameplay-tests/android/assets
-/gameplay-tests/android/bin
-/gameplay-tests/android/gen
-/gameplay-tests/android/libs
-/gameplay-tests/android/obj
-/gameplay-tests/android/NUL
-/gameplay-tests/android/local.properties
-/gameplay-tests/android/proguard-project.txt
-/gameplay-tests/android/project.properties
+/tools/gameplay-encoder/Debug
+/tools/gameplay-encoder/Release
+/tools/gameplay-encoder/gameplay-encoder.xcodeproj/xcuserdata
 
-/gameplay-samples/sample00-mesh/Debug
-/gameplay-samples/sample00-mesh/DebugMem
-/gameplay-samples/sample00-mesh/Release
-/gameplay-samples/sample00-mesh/Simulator
-/gameplay-samples/sample00-mesh/Simulator-Coverage
-/gameplay-samples/sample00-mesh/Simulator-Profile
-/gameplay-samples/sample00-mesh/Device-Debug
-/gameplay-samples/sample00-mesh/Device-Coverage
-/gameplay-samples/sample00-mesh/Device-Profile
-/gameplay-samples/sample00-mesh/Device-Release
-/gameplay-samples/sample00-mesh/res/shaders
-/gameplay-samples/sample00-mesh/res/logo_powered_white.png
-/gameplay-samples/sample00-mesh/sample00-mesh.xcodeproj/xcuserdata
-/gameplay-samples/sample00-mesh/android/src
-/gameplay-samples/sample00-mesh/android/assets
-/gameplay-samples/sample00-mesh/android/bin
-/gameplay-samples/sample00-mesh/android/gen
-/gameplay-samples/sample00-mesh/android/libs
-/gameplay-samples/sample00-mesh/android/obj
-/gameplay-samples/sample00-mesh/android/NUL
-/gameplay-samples/sample00-mesh/android/local.properties
-/gameplay-samples/sample00-mesh/android/proguard.cfg
-/gameplay-samples/sample00-mesh/android/project.properties
+/tools/gameplay-luagen/Release
+/tools/gameplay-luagen/Debug
+/tools/gameplay-luagen/gameplay-luagen.xcodeproj/xcuserdata
+/tools/gameplay-luagen/doxygen_entrydb_680.tmp
+/tools/gameplay-luagen/doxygen_objdb_680.tmp
+/tools/gameplay-luagen/xml
 
-/gameplay-samples/sample01-longboard/Debug
-/gameplay-samples/sample01-longboard/DebugMem
-/gameplay-samples/sample01-longboard/Release
-/gameplay-samples/sample01-longboard/Simulator
-/gameplay-samples/sample01-longboard/Simulator-Coverage
-/gameplay-samples/sample01-longboard/Simulator-Profile
-/gameplay-samples/sample01-longboard/Device-Debug
-/gameplay-samples/sample01-longboard/Device-Coverage
-/gameplay-samples/sample01-longboard/Device-Profile
-/gameplay-samples/sample01-longboard/Device-Release
-/gameplay-samples/sample01-longboard/res/shaders
-/gameplay-samples/sample01-longboard/res/logo_powered_white.png
-/gameplay-samples/sample01-longboard/sample01-longboard.xcodeproj/xcuserdata
-/gameplay-samples/sample01-longboard/NUL
-/gameplay-samples/sample01-longboard/android/NUL
-/gameplay-samples/sample01-longboard/android/src
-/gameplay-samples/sample01-longboard/android/assets
-/gameplay-samples/sample01-longboard/android/bin
-/gameplay-samples/sample01-longboard/android/gen
-/gameplay-samples/sample01-longboard/android/libs
-/gameplay-samples/sample01-longboard/android/obj
-/gameplay-samples/sample01-longboard/android/proguard.cfg
-/gameplay-samples/sample01-longboard/android/project.properties
-/gameplay-samples/sample01-longboard/android/local.properties
+/samples/browser/Debug
+/samples/browser/DebugMem
+/samples/browser/Release
+/samples/browser/Simulator
+/samples/browser/Simulator-Coverage
+/samples/browser/Simulator-Profile
+/samples/browser/Device-Debug
+/samples/browser/Device-Coverage
+/samples/browser/Device-Profile
+/samples/browser/Device-Release
+/samples/browser/res/shaders
+/samples/browser/res/logo_powered_white.png
+/samples/browser/android/src
+/samples/browser/android/assets
+/samples/browser/android/bin
+/samples/browser/android/gen
+/samples/browser/android/libs
+/samples/browser/android/obj
+/samples/browser/android/NUL
+/samples/browser/android/local.properties
+/samples/browser/android/proguard-project.txt
+/samples/browser/android/project.properties
+/samples/browser/sample-browser.xcodeproj/xcuserdata
 
-/gameplay-samples/sample02-spaceship/Debug
-/gameplay-samples/sample02-spaceship/DebugMem
-/gameplay-samples/sample02-spaceship/Release
-/gameplay-samples/sample02-spaceship/Simulator
-/gameplay-samples/sample02-spaceship/Simulator-Coverage
-/gameplay-samples/sample02-spaceship/Simulator-Profile
-/gameplay-samples/sample02-spaceship/Device-Debug
-/gameplay-samples/sample02-spaceship/Device-Coverage
-/gameplay-samples/sample02-spaceship/Device-Profile
-/gameplay-samples/sample02-spaceship/Device-Release
-/gameplay-samples/sample02-spaceship/res/shaders
-/gameplay-samples/sample02-spaceship/res/logo_powered_white.png
-/gameplay-samples/sample02-spaceship/sample02-spaceship.xcodeproj/xcuserdata
-/gameplay-samples/sample02-spaceship/android/NUL
-/gameplay-samples/sample02-spaceship/android/project.properties
-/gameplay-samples/sample02-spaceship/android/assets
-/gameplay-samples/sample02-spaceship/android/bin
-/gameplay-samples/sample02-spaceship/android/gen
-/gameplay-samples/sample02-spaceship/android/libs
-/gameplay-samples/sample02-spaceship/android/obj
-/gameplay-samples/sample02-spaceship/android/src
-/gameplay-samples/sample02-spaceship/android/proguard.cfg
-/gameplay-samples/sample02-spaceship/android/local.properties
+/samples/character/Debug
+/samples/character/DebugMem
+/samples/character/Release
+/samples/character/Simulator
+/samples/character/Simulator-Coverage
+/samples/character/Simulator-Profile
+/samples/character/Device-Debug
+/samples/character/Device-Coverage
+/samples/character/Device-Profile
+/samples/character/Device-Release
+/samples/character/game.config
+/samples/character/res/shaders
+/samples/character/res/logo_powered_white.png
+/samples/character/android/project.properties
+/samples/character/android/proguard.cfg
+/samples/character/android/local.properties
+/samples/character/android/src
+/samples/character/android/assets
+/samples/character/android/bin
+/samples/character/android/gen
+/samples/character/android/libs
+/samples/character/android/obj
+/samples/character/android/NUL
+/samples/character/res/gamepad.xcf
+/samples/character/sample-character.xcodeproj/xcuserdata
 
-/gameplay-samples/sample03-character/Debug
-/gameplay-samples/sample03-character/DebugMem
-/gameplay-samples/sample03-character/Release
-/gameplay-samples/sample03-character/Simulator
-/gameplay-samples/sample03-character/Simulator-Coverage
-/gameplay-samples/sample03-character/Simulator-Profile
-/gameplay-samples/sample03-character/Device-Debug
-/gameplay-samples/sample03-character/Device-Coverage
-/gameplay-samples/sample03-character/Device-Profile
-/gameplay-samples/sample03-character/Device-Release
-/gameplay-samples/sample03-character/game.config
-/gameplay-samples/sample03-character/res/shaders
-/gameplay-samples/sample03-character/res/logo_powered_white.png
-/gameplay-samples/sample03-character/sample03-character.xcodeproj/xcuserdata
-/gameplay-samples/sample03-character/android/project.properties
-/gameplay-samples/sample03-character/android/proguard.cfg
-/gameplay-samples/sample03-character/android/local.properties
-/gameplay-samples/sample03-character/android/src
-/gameplay-samples/sample03-character/android/assets
-/gameplay-samples/sample03-character/android/bin
-/gameplay-samples/sample03-character/android/gen
-/gameplay-samples/sample03-character/android/libs
-/gameplay-samples/sample03-character/android/obj
-/gameplay-samples/sample03-character/android/NUL
-/gameplay-samples/sample03-character/res/gamepad.xcf
+/samples/longboard/Debug
+/samples/longboard/DebugMem
+/samples/longboard/Release
+/samples/longboard/Simulator
+/samples/longboard/Simulator-Coverage
+/samples/longboard/Simulator-Profile
+/samples/longboard/Device-Debug
+/samples/longboard/Device-Coverage
+/samples/longboard/Device-Profile
+/samples/longboard/Device-Release
+/samples/longboard/res/shaders
+/samples/longboard/res/logo_powered_white.png
+/samples/longboard/NUL
+/samples/longboard/android/NUL
+/samples/longboard/android/src
+/samples/longboard/android/assets
+/samples/longboard/android/bin
+/samples/longboard/android/gen
+/samples/longboard/android/libs
+/samples/longboard/android/obj
+/samples/longboard/android/proguard.cfg
+/samples/longboard/android/project.properties
+/samples/longboard/android/local.properties
+/samples/longboard/sample-longboard.xcodeproj/xcuserdata
 
-/gameplay-samples/sample04-particles/Debug
-/gameplay-samples/sample04-particles/DebugMem
-/gameplay-samples/sample04-particles/Release
-/gameplay-samples/sample04-particles/Simulator
-/gameplay-samples/sample04-particles/Simulator-Coverage
-/gameplay-samples/sample04-particles/Simulator-Profile
-/gameplay-samples/sample04-particles/Device-Debug
-/gameplay-samples/sample04-particles/Device-Coverage
-/gameplay-samples/sample04-particles/Device-Profile
-/gameplay-samples/sample04-particles/Device-Release
-/gameplay-samples/sample04-particles/res/shaders
-/gameplay-samples/sample04-particles/res/logo_powered_white.png
-/gameplay-samples/sample04-particles/sample04-particles.xcodeproj/xcuserdata
-/gameplay-samples/sample04-particles/Device-Debug
-/gameplay-samples/sample04-particles/Debug
-/gameplay-samples/sample04-particles/DebugMem
-/gameplay-samples/sample04-particles/android/src
-/gameplay-samples/sample04-particles/android/assets
-/gameplay-samples/sample04-particles/android/bin
-/gameplay-samples/sample04-particles/android/gen
-/gameplay-samples/sample04-particles/android/libs
-/gameplay-samples/sample04-particles/android/obj
-/gameplay-samples/sample04-particles/android/proguard.cfg
-/gameplay-samples/sample04-particles/android/local.properties
-/gameplay-samples/sample04-particles/android/project.properties
+/samples/lua/Debug
+/samples/lua/DebugMem
+/samples/lua/Release
+/samples/lua/Simulator
+/samples/lua/Simulator-Coverage
+/samples/lua/Simulator-Profile
+/samples/lua/Device-Debug
+/samples/lua/Device-Coverage
+/samples/lua/Device-Profile
+/samples/lua/Device-Release
+/samples/lua/res/shaders
+/samples/lua/res/logo_powered_white.png
+/samples/lua/android/src
+/samples/lua/android/assets
+/samples/lua/android/bin
+/samples/lua/android/gen
+/samples/lua/android/libs
+/samples/lua/android/obj
+/samples/lua/android/NUL
+/samples/lua/android/local.properties
+/samples/lua/android/proguard.cfg
+/samples/lua/android/project.properties
+/samples/lua/sample-lua.xcodeproj/xcuserdata
 
-/gameplay-samples/sample05-lua/Debug
-/gameplay-samples/sample05-lua/DebugMem
-/gameplay-samples/sample05-lua/Release
-/gameplay-samples/sample05-lua/Simulator
-/gameplay-samples/sample05-lua/Simulator-Coverage
-/gameplay-samples/sample05-lua/Simulator-Profile
-/gameplay-samples/sample05-lua/Device-Debug
-/gameplay-samples/sample05-lua/Device-Coverage
-/gameplay-samples/sample05-lua/Device-Profile
-/gameplay-samples/sample05-lua/Device-Release
-/gameplay-samples/sample05-lua/res/shaders
-/gameplay-samples/sample05-lua/res/logo_powered_white.png
-/gameplay-samples/sample05-lua/sample05-lua.xcodeproj/xcuserdata
-/gameplay-samples/sample05-lua/android/src
-/gameplay-samples/sample05-lua/android/assets
-/gameplay-samples/sample05-lua/android/bin
-/gameplay-samples/sample05-lua/android/gen
-/gameplay-samples/sample05-lua/android/libs
-/gameplay-samples/sample05-lua/android/obj
-/gameplay-samples/sample05-lua/android/NUL
-/gameplay-samples/sample05-lua/android/local.properties
-/gameplay-samples/sample05-lua/android/proguard.cfg
-/gameplay-samples/sample05-lua/android/project.properties
+/samples/mesh/Debug
+/samples/mesh/DebugMem
+/samples/mesh/Release
+/samples/mesh/Simulator
+/samples/mesh/Simulator-Coverage
+/samples/mesh/Simulator-Profile
+/samples/mesh/Device-Debug
+/samples/mesh/Device-Coverage
+/samples/mesh/Device-Profile
+/samples/mesh/Device-Release
+/samples/mesh/res/shaders
+/samples/mesh/res/logo_powered_white.png
+/samples/mesh/android/src
+/samples/mesh/android/assets
+/samples/mesh/android/bin
+/samples/mesh/android/gen
+/samples/mesh/android/libs
+/samples/mesh/android/obj
+/samples/mesh/android/NUL
+/samples/mesh/android/local.properties
+/samples/mesh/android/proguard.cfg
+/samples/mesh/android/project.properties
+/samples/mesh/sample-mesh.xcodeproj/xcuserdata
 
-/gameplay-samples/sample06-racer/Debug
-/gameplay-samples/sample06-racer/DebugMem
-/gameplay-samples/sample06-racer/Release
-/gameplay-samples/sample06-racer/Simulator
-/gameplay-samples/sample06-racer/Simulator-Coverage
-/gameplay-samples/sample06-racer/Simulator-Profile
-/gameplay-samples/sample06-racer/Device-Debug
-/gameplay-samples/sample06-racer/Device-Debug-IMG
-/gameplay-samples/sample06-racer/Device-Coverage
-/gameplay-samples/sample06-racer/Device-Profile
-/gameplay-samples/sample06-racer/Device-Release
-/gameplay-samples/sample06-racer/game.config
-/gameplay-samples/sample06-racer/res/shaders
-/gameplay-samples/sample06-racer/res/logo_powered_white.png
-/gameplay-samples/sample06-racer/sample06-racer.xcodeproj/xcuserdata
-/gameplay-samples/sample06-racer/android/project.properties
-/gameplay-samples/sample06-racer/android/proguard.cfg
-/gameplay-samples/sample06-racer/android/local.properties
-/gameplay-samples/sample06-racer/android/src
-/gameplay-samples/sample06-racer/android/assets
-/gameplay-samples/sample06-racer/android/bin
-/gameplay-samples/sample06-racer/android/gen
-/gameplay-samples/sample06-racer/android/libs
-/gameplay-samples/sample06-racer/android/obj
-/gameplay-samples/sample06-racer/android/NUL
-/gameplay-samples/sample06-racer/android/local.properties
-/gameplay-samples/sample06-racer/android/proguard.cfg
-/gameplay-samples/sample06-racer/android/project.properties
+/samples/particles/Debug
+/samples/particles/DebugMem
+/samples/particles/Release
+/samples/particles/Simulator
+/samples/particles/Simulator-Coverage
+/samples/particles/Simulator-Profile
+/samples/particles/Device-Debug
+/samples/particles/Device-Coverage
+/samples/particles/Device-Profile
+/samples/particles/Device-Release
+/samples/particles/res/shaders
+/samples/particles/res/logo_powered_white.png
+/samples/particles/Device-Debug
+/samples/particles/Debug
+/samples/particles/DebugMem
+/samples/particles/android/src
+/samples/particles/android/assets
+/samples/particles/android/bin
+/samples/particles/android/gen
+/samples/particles/android/libs
+/samples/particles/android/obj
+/samples/particles/android/proguard.cfg
+/samples/particles/android/local.properties
+/samples/particles/android/project.properties
+/samples/particles/sample-particles.xcodeproj/xcuserdata
 
+/samples/racer/Debug
+/samples/racer/DebugMem
+/samples/racer/Release
+/samples/racer/Simulator
+/samples/racer/Simulator-Coverage
+/samples/racer/Simulator-Profile
+/samples/racer/Device-Debug
+/samples/racer/Device-Debug-IMG
+/samples/racer/Device-Coverage
+/samples/racer/Device-Profile
+/samples/racer/Device-Release
+/samples/racer/game.config
+/samples/racer/res/shaders
+/samples/racer/res/logo_powered_white.png
+/samples/racer/android/project.properties
+/samples/racer/android/proguard.cfg
+/samples/racer/android/local.properties
+/samples/racer/android/src
+/samples/racer/android/assets
+/samples/racer/android/bin
+/samples/racer/android/gen
+/samples/racer/android/libs
+/samples/racer/android/obj
+/samples/racer/android/NUL
+/samples/racer/android/local.properties
+/samples/racer/android/proguard.cfg
+/samples/racer/android/project.properties
+/samples/racer/sample-racer.xcodeproj/xcuserdata
 
+/samples/spaceship/Debug
+/samples/spaceship/DebugMem
+/samples/spaceship/Release
+/samples/spaceship/Simulator
+/samples/spaceship/Simulator-Coverage
+/samples/spaceship/Simulator-Profile
+/samples/spaceship/Device-Debug
+/samples/spaceship/Device-Coverage
+/samples/spaceship/Device-Profile
+/samples/spaceship/Device-Release
+/samples/spaceship/res/shaders
+/samples/spaceship/res/logo_powered_white.png
+/samples/spaceship/android/NUL
+/samples/spaceship/android/project.properties
+/samples/spaceship/android/assets
+/samples/spaceship/android/bin
+/samples/spaceship/android/gen
+/samples/spaceship/android/libs
+/samples/spaceship/android/obj
+/samples/spaceship/android/src
+/samples/spaceship/android/proguard.cfg
+/samples/spaceship/android/local.properties
+/samples/spaceship/sample-spaceship.xcodeproj/xcuserdata
 

+ 3 - 0
CHANGES.md

@@ -1,5 +1,8 @@
 ## v1.7.0
+
 - Adds a lua function "convert(object, className)" that will convert a gameplay userdata object to another class type by changing the metatable. (For example: This lets you convert Control to Button in lua)
+- Repo directory restructure dropping gameplay- prefix on many folders and files.
+- Removed pre-compiled api/html docs to reduce repository bloat.
 
 ## v1.6.0
 

+ 1 - 5
CMakeLists.txt

@@ -22,12 +22,8 @@ endif()
 add_subdirectory(gameplay)
 
 # gameplay samples
-add_subdirectory(gameplay-samples)
+add_subdirectory(samples)
 
-# gameplay samples
-add_subdirectory(gameplay-tests)
 
-# gameplay encoder (See gameplay/bin)
-#add_subdirectory(gameplay-encoder)
 
 

+ 3 - 0
api/README.md

@@ -0,0 +1,3 @@
+This folder is used to generate the doxygen api docs.
+
+

+ 0 - 0
gameplay-api/header.html → api/header.html


+ 0 - 0
gameplay-codestyle.xml → codestyle.xml


+ 0 - 5
gameplay-api/gameplay.html

@@ -1,5 +0,0 @@
-<HTML>
-<HEAD>
-<META HTTP-EQUIV="Refresh" CONTENT="0; URL=html/index.html">
-</HEAD>
-</HTML>

+ 0 - 333
gameplay-template/gameplay-template.vcxproj

@@ -1,333 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="DebugMem|Win32">
-      <Configuration>DebugMem</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="DebugMem|x64">
-      <Configuration>DebugMem</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <Keyword>Win32Proj</Keyword>
-    <RootNamespace>TEMPLATE_PROJECT</RootNamespace>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>Unicode</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(Configuration)\</OutDir>
-    <ExecutablePath>$(ExecutablePath)</ExecutablePath>
-    <CustomBuildBeforeTargets>
-    </CustomBuildBeforeTargets>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(Configuration)\</OutDir>
-    <ExecutablePath>$(ExecutablePath)</ExecutablePath>
-    <CustomBuildBeforeTargets />
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(Configuration)\</OutDir>
-    <ExecutablePath>$(ExecutablePath)</ExecutablePath>
-    <CustomBuildBeforeTargets />
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|x64'">
-    <LinkIncremental>true</LinkIncremental>
-    <OutDir>$(Configuration)\</OutDir>
-    <ExecutablePath>$(ExecutablePath)</ExecutablePath>
-    <CustomBuildBeforeTargets />
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(Configuration)\</OutDir>
-    <CustomBuildBeforeTargets>
-    </CustomBuildBeforeTargets>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LinkIncremental>false</LinkIncremental>
-    <OutDir>$(Configuration)\</OutDir>
-    <CustomBuildBeforeTargets />
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>GAMEPLAY_PATH/external-deps/lua/include;GAMEPLAY_PATH/external-deps/bullet/include;GAMEPLAY_PATH/gameplay/src;GAMEPLAY_PATH/external-deps/openal/include/AL;GAMEPLAY_PATH/external-deps/oggvorbis/include;GAMEPLAY_PATH/external-deps/libpng/include;GAMEPLAY_PATH/external-deps/zlib/include;GAMEPLAY_PATH/external-deps/glew/include</AdditionalIncludeDirectories>
-      <RuntimeTypeInfo>true</RuntimeTypeInfo>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>lua.lib;OpenAL32.lib;OpenGL32.lib;GLU32.lib;glew32.lib;libpng14.lib;zlib.lib;gameplay.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>GAMEPLAY_PATH/external-deps/lua/lib/windows/x86;GAMEPLAY_PATH/external-deps/bullet/lib/windows/x86;GAMEPLAY_PATH/external-deps/openal/lib/windows/x86;GAMEPLAY_PATH/external-deps/oggvorbis/lib/windows/x86;GAMEPLAY_PATH/external-deps/glew/lib/windows/x86;GAMEPLAY_PATH/external-deps/libpng/lib/windows/x86;GAMEPLAY_PATH/external-deps/zlib/lib/windows/x86;GAMEPLAY_PATH/gameplay/windows/x86/$(Configuration)</AdditionalLibraryDirectories>
-    </Link>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-      <Message>
-      </Message>
-      <Outputs>
-      </Outputs>
-    </CustomBuildStep>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>GAMEPLAY_PATH/external-deps/lua/include;GAMEPLAY_PATH/external-deps/bullet/include;GAMEPLAY_PATH/gameplay/src;GAMEPLAY_PATH/external-deps/openal/include/AL;GAMEPLAY_PATH/external-deps/oggvorbis/include;GAMEPLAY_PATH/external-deps/libpng/include;GAMEPLAY_PATH/external-deps/zlib/include;GAMEPLAY_PATH/external-deps/glew/include</AdditionalIncludeDirectories>
-      <RuntimeTypeInfo>true</RuntimeTypeInfo>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>lua.lib;OpenAL32.lib;OpenGL32.lib;GLU32.lib;glew32.lib;libpng14.lib;zlib.lib;gameplay.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>GAMEPLAY_PATH/external-deps/lua/lib/windows/x64;GAMEPLAY_PATH/external-deps/bullet/lib/windows/x64;GAMEPLAY_PATH/external-deps/openal/lib/windows/x64;GAMEPLAY_PATH/external-deps/oggvorbis/lib/windows/x64;GAMEPLAY_PATH/external-deps/glew/lib/windows/x64;GAMEPLAY_PATH/external-deps/libpng/lib/windows/x64;GAMEPLAY_PATH/external-deps/zlib/lib/windows/x64;GAMEPLAY_PATH/gameplay/windows/x64/$(Configuration)</AdditionalLibraryDirectories>
-    </Link>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-      <Message>
-      </Message>
-      <Outputs>
-      </Outputs>
-    </CustomBuildStep>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;GAMEPLAY_MEM_LEAK_DETECTION;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>GAMEPLAY_PATH/external-deps/lua/include;GAMEPLAY_PATH/external-deps/bullet/include;GAMEPLAY_PATH/gameplay/src;GAMEPLAY_PATH/external-deps/openal/include/AL;GAMEPLAY_PATH/external-deps/oggvorbis/include;GAMEPLAY_PATH/external-deps/libpng/include;GAMEPLAY_PATH/external-deps/zlib/include;GAMEPLAY_PATH/external-deps/glew/include</AdditionalIncludeDirectories>
-      <RuntimeTypeInfo>true</RuntimeTypeInfo>
-      <ShowIncludes>false</ShowIncludes>
-      <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>lua.lib;OpenAL32.lib;OpenGL32.lib;GLU32.lib;glew32.lib;libpng14.lib;zlib.lib;gameplay.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>GAMEPLAY_PATH/external-deps/lua/lib/windows/x86;GAMEPLAY_PATH/external-deps/bullet/lib/windows/x86;GAMEPLAY_PATH/external-deps/openal/lib/windows/x86;GAMEPLAY_PATH/external-deps/oggvorbis/lib/windows/x86;GAMEPLAY_PATH/external-deps/glew/lib/windows/x86;GAMEPLAY_PATH/external-deps/libpng/lib/windows/x86;GAMEPLAY_PATH/external-deps/zlib/lib/windows/x86;GAMEPLAY_PATH/gameplay/windows/x86/$(Configuration)</AdditionalLibraryDirectories>
-    </Link>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-      <Message>
-      </Message>
-      <Outputs>
-      </Outputs>
-    </CustomBuildStep>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|x64'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;GAMEPLAY_MEM_LEAK_DETECTION;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>GAMEPLAY_PATH/external-deps/lua/include;GAMEPLAY_PATH/external-deps/bullet/include;GAMEPLAY_PATH/gameplay/src;GAMEPLAY_PATH/external-deps/openal/include/AL;GAMEPLAY_PATH/external-deps/oggvorbis/include;GAMEPLAY_PATH/external-deps/libpng/include;GAMEPLAY_PATH/external-deps/zlib/include;GAMEPLAY_PATH/external-deps/glew/include</AdditionalIncludeDirectories>
-      <RuntimeTypeInfo>true</RuntimeTypeInfo>
-      <ShowIncludes>false</ShowIncludes>
-      <PreprocessToFile>false</PreprocessToFile>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>lua.lib;OpenAL32.lib;OpenGL32.lib;GLU32.lib;glew32.lib;libpng14.lib;zlib.lib;gameplay.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>GAMEPLAY_PATH/external-deps/lua/lib/windows/x64;GAMEPLAY_PATH/external-deps/bullet/lib/windows/x64;GAMEPLAY_PATH/external-deps/openal/lib/windows/x64;GAMEPLAY_PATH/external-deps/oggvorbis/lib/windows/x64;GAMEPLAY_PATH/external-deps/glew/lib/windows/x64;GAMEPLAY_PATH/external-deps/libpng/lib/windows/x64;GAMEPLAY_PATH/external-deps/zlib/lib/windows/x64;GAMEPLAY_PATH/gameplay/windows/x64/$(Configuration)</AdditionalLibraryDirectories>
-    </Link>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-      <Message>
-      </Message>
-      <Outputs>
-      </Outputs>
-    </CustomBuildStep>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>GAMEPLAY_PATH/external-deps/lua/include;GAMEPLAY_PATH/external-deps/bullet/include;GAMEPLAY_PATH/gameplay/src;GAMEPLAY_PATH/external-deps/openal/include/AL;GAMEPLAY_PATH/external-deps/oggvorbis/include;GAMEPLAY_PATH/external-deps/libpng/include;GAMEPLAY_PATH/external-deps/zlib/include;GAMEPLAY_PATH/external-deps/glew/include</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>lua.lib;OpenAL32.lib;OpenGL32.lib;GLU32.lib;glew32.lib;libpng14.lib;zlib.lib;gameplay.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>GAMEPLAY_PATH/external-deps/lua/lib/windows/x86;GAMEPLAY_PATH/external-deps/bullet/lib/windows/x86;GAMEPLAY_PATH/external-deps/openal/lib/windows/x86;GAMEPLAY_PATH/external-deps/oggvorbis/lib/windows/x86;GAMEPLAY_PATH/external-deps/glew/lib/windows/x86;GAMEPLAY_PATH/external-deps/libpng/lib/windows/x86;GAMEPLAY_PATH/external-deps/zlib/lib/windows/x86;GAMEPLAY_PATH/gameplay/windows/x86/$(Configuration)</AdditionalLibraryDirectories>
-    </Link>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-      <Message>
-      </Message>
-      <Outputs>
-      </Outputs>
-    </CustomBuildStep>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_ITERATOR_DEBUG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>GAMEPLAY_PATH/external-deps/lua/include;GAMEPLAY_PATH/external-deps/bullet/include;GAMEPLAY_PATH/gameplay/src;GAMEPLAY_PATH/external-deps/openal/include/AL;GAMEPLAY_PATH/external-deps/oggvorbis/include;GAMEPLAY_PATH/external-deps/libpng/include;GAMEPLAY_PATH/external-deps/zlib/include;GAMEPLAY_PATH/external-deps/glew/include</AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>lua.lib;OpenAL32.lib;OpenGL32.lib;GLU32.lib;glew32.lib;libpng14.lib;zlib.lib;gameplay.lib;BulletDynamics.lib;BulletCollision.lib;LinearMath.lib;libogg.lib;libvorbis.lib;libvorbisfile.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>GAMEPLAY_PATH/external-deps/lua/lib/windows/x64;GAMEPLAY_PATH/external-deps/bullet/lib/windows/x64;GAMEPLAY_PATH/external-deps/openal/lib/windows/x64;GAMEPLAY_PATH/external-deps/oggvorbis/lib/windows/x64;GAMEPLAY_PATH/external-deps/glew/lib/windows/x64;GAMEPLAY_PATH/external-deps/libpng/lib/windows/x64;GAMEPLAY_PATH/external-deps/zlib/lib/windows/x64;GAMEPLAY_PATH/gameplay/windows/x64/$(Configuration)</AdditionalLibraryDirectories>
-    </Link>
-    <PostBuildEvent>
-      <Command>
-      </Command>
-    </PostBuildEvent>
-    <CustomBuildStep>
-      <Command>
-      </Command>
-      <Message>
-      </Message>
-      <Outputs>
-      </Outputs>
-    </CustomBuildStep>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <None Include="bar-descriptor.xml">
-      <SubType>Designer</SubType>
-    </None>
-    <None Include="game.config" />
-    <None Include="icon.png" />
-    <None Include="res\box.fbx" />
-    <None Include="res\box.gpb" />
-    <None Include="res\box.material" />
-    <None Include="res\colored.frag" />
-    <None Include="res\colored.vert" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="src\TemplateGame.cpp" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="src\TemplateGame.h" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

+ 2 - 2
gameplay.doxyfile

@@ -52,7 +52,7 @@ PROJECT_LOGO           =
 # If a relative path is entered, it will be relative to the location 
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       = ./gameplay-api
+OUTPUT_DIRECTORY       = ./api
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
 # 4096 sub-directories (in 2 levels) under the output directory of each output 
@@ -883,7 +883,7 @@ HTML_FILE_EXTENSION    = .html
 # have to redo this when upgrading to a newer version of doxygen or when 
 # changing the value of configuration settings such as GENERATE_TREEVIEW!
 
-HTML_HEADER            = gameplay-api/header.html
+HTML_HEADER            = api/header.html
 
 # The HTML_FOOTER tag can be used to specify a personal HTML footer for 
 # each generated HTML page. If it is left blank doxygen will generate a 

+ 8 - 8
gameplay.sln

@@ -3,42 +3,42 @@ Microsoft Visual Studio Solution File, Format Version 11.00
 # Visual Studio 2010
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gameplay", "gameplay\gameplay.vcxproj", "{1032BA4B-57EB-4348-9E03-29DD63E80E4A}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gameplay-tests", "gameplay-tests\gameplay-tests.vcxproj", "{0F27C8C4-58B2-E367-8D1F-01B714FDBF1B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-browser", "samples\browser\sample-browser.vcxproj", "{0F27C8C4-58B2-E367-8D1F-01B714FDBF1B}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample00-mesh", "gameplay-samples\sample00-mesh\sample00-mesh.vcxproj", "{D672DC66-3CE0-4878-B0D2-813CA731012F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-mesh", "samples\mesh\sample-mesh.vcxproj", "{D672DC66-3CE0-4878-B0D2-813CA731012F}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample01-longboard", "gameplay-samples\sample01-longboard\sample01-longboard.vcxproj", "{9A515C8B-3320-4C5C-9754-211E91206C9D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-lua", "samples\lua\sample-lua.vcxproj", "{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample02-spaceship", "gameplay-samples\sample02-spaceship\sample02-spaceship.vcxproj", "{CC37B8E9-6402-4841-8D6A-5D908A5909B3}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-longboard", "samples\longboard\sample-longboard.vcxproj", "{9A515C8B-3320-4C5C-9754-211E91206C9D}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample03-character", "gameplay-samples\sample03-character\sample03-character.vcxproj", "{87388E8B-F3CF-428F-BC2C-C1886248C111}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-spaceship", "samples\spaceship\sample-spaceship.vcxproj", "{CC37B8E9-6402-4841-8D6A-5D908A5909B3}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample04-particles", "gameplay-samples\sample04-particles\sample04-particles.vcxproj", "{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-character", "samples\character\sample-character.vcxproj", "{87388E8B-F3CF-428F-BC2C-C1886248C111}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample05-lua", "gameplay-samples\sample05-lua\sample05-lua.vcxproj", "{04EAF3E5-0F9E-AF4D-53F9-269CE114211F}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample-particles", "samples\particles\sample-particles.vcxproj", "{CB5ABFAA-EA69-E439-5A4D-3B9359916C71}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample06-racer", "gameplay-samples\sample06-racer\sample06-racer.vcxproj", "{82522888-E09A-ED48-AD7D-247237B37B3A}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample06-racer", "samples\racer\sample-racer.vcxproj", "{82522888-E09A-ED48-AD7D-247237B37B3A}"
 	ProjectSection(ProjectDependencies) = postProject
 		{1032BA4B-57EB-4348-9E03-29DD63E80E4A} = {1032BA4B-57EB-4348-9E03-29DD63E80E4A}
 	EndProjectSection

+ 0 - 30
gameplay.workspace

@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<CodeBlocks_workspace_file>
-	<Workspace title="GamePlay">
-		<Project filename="gameplay/gameplay.cbp" />
-		<Project filename="gameplay-tests/gameplay-tests.cbp">
-			<Depends filename="gameplay/gameplay.cbp" />
-		</Project>
-		<Project filename="gameplay-samples/sample00-mesh/sample00-mesh.cbp">
-			<Depends filename="gameplay/gameplay.cbp" />
-		</Project>
-		<Project filename="gameplay-samples/sample01-longboard/sample01-longboard.cbp">
-			<Depends filename="gameplay/gameplay.cbp" />
-		</Project>
-		<Project filename="gameplay-samples/sample02-spaceship/sample02-spaceship.cbp">
-			<Depends filename="gameplay/gameplay.cbp" />
-		</Project>
-		<Project filename="gameplay-samples/sample03-character/sample03-character.cbp">
-			<Depends filename="gameplay/gameplay.cbp" />
-		</Project>
-		<Project filename="gameplay-samples/sample04-particles/sample04-particles.cbp">
-			<Depends filename="gameplay/gameplay.cbp" />
-		</Project>
-		<Project filename="gameplay-samples/sample05-lua/sample05-lua.cbp">
-			<Depends filename="gameplay/gameplay.cbp" />
-		</Project>
-		<Project filename="gameplay-samples/sample06-racer/sample06-racer.cbp" active="1">
-			<Depends filename="gameplay/gameplay.cbp" />
-		</Project>
-	</Workspace>
-</CodeBlocks_workspace_file>

+ 9 - 9
gameplay.xcworkspace/contents.xcworkspacedata

@@ -5,27 +5,27 @@
       location = "group:gameplay/gameplay.xcodeproj">
    </FileRef>
    <FileRef
-      location = "group:gameplay-tests/gameplay-tests.xcodeproj">
+      location = "group:samples/browser/sample-browser.xcodeproj">
    </FileRef>
    <FileRef
-      location = "group:gameplay-samples/sample00-mesh/sample00-mesh.xcodeproj">
+      location = "group:samples/character/sample-character.xcodeproj">
    </FileRef>
    <FileRef
-      location = "group:gameplay-samples/sample01-longboard/sample01-longboard.xcodeproj">
+      location = "group:samples/longboard/sample-longboard.xcodeproj">
    </FileRef>
    <FileRef
-      location = "group:gameplay-samples/sample02-spaceship/sample02-spaceship.xcodeproj">
-   </FileRef>
+      location = "group:samples/lua/sample-lua.xcodeproj">
+   </FileRef>  
    <FileRef
-      location = "group:gameplay-samples/sample03-character/sample03-character.xcodeproj">
+      location = "group:samples/mesh/sample-mesh.xcodeproj">
    </FileRef>
    <FileRef
-      location = "group:gameplay-samples/sample04-particles/sample04-particles.xcodeproj">
+      location = "group:samples/particles/sample-particles.xcodeproj">
    </FileRef>
    <FileRef
-      location = "group:gameplay-samples/sample05-lua/sample05-lua.xcodeproj">
+      location = "group:samples/racer/sample-racer.xcodeproj">
    </FileRef>
    <FileRef
-      location = "group:gameplay-samples/sample06-racer/sample06-racer.xcodeproj">
+      location = "group:samples/spaceship/sample-spaceship.xcodeproj">
    </FileRef>
 </Workspace>

+ 1 - 0
gameplay/.cproject

@@ -23,6 +23,7 @@
 								<option id="com.qnx.qcc.option.compiler.security.311918799" name="Enhanced Security (-fstack-protector-strong)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
 								<option id="com.qnx.qcc.option.compiler.defines.1481323494" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
 									<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+									<listOptionValue builtIn="false" value="USE_BLACKBERRY_GAMEPAD"/>
 									<listOptionValue builtIn="false" value="BT_USE_NEON"/>
 								</option>
 								<option id="com.qnx.qcc.option.compiler.includePath.2133604142" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">

+ 4 - 0
gameplay/CMakeLists.txt

@@ -352,6 +352,8 @@ set(GAMEPLAY_LUA
     src/lua/lua_HeightField.h
     src/lua/lua_Image.cpp
     src/lua/lua_Image.h
+    src/lua/lua_ImageControl.cpp
+    src/lua/lua_ImageControl.h
     src/lua/lua_ImageFormat.cpp
     src/lua/lua_ImageFormat.h
     src/lua/lua_Joint.cpp
@@ -516,6 +518,8 @@ set(GAMEPLAY_LUA
     src/lua/lua_Terrain.h
     src/lua/lua_TerrainFlags.cpp
     src/lua/lua_TerrainFlags.h
+    src/lua/lua_TerrainListener.cpp
+    src/lua/lua_TerrainListener.h
     src/lua/lua_TextBox.cpp
     src/lua/lua_TextBox.h
     src/lua/lua_Texture.cpp

+ 2 - 5
gameplay/android/build.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project name="gameplay-android" default="help">
+<project name="gameplay" default="help">
 
     <!-- The local.properties file is created and updated by the 'android' tool.
          It contains the path to the SDK. It should *NOT* be checked into
@@ -40,10 +40,7 @@
     <loadproperties srcFile="project.properties" />
 
     <!-- quick check on sdk.dir -->
-    <fail
-            message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
-            unless="sdk.dir"
-    />
+    <fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var" unless="sdk.dir" />
 
 
 <!-- extension targets. Uncomment the ones where you want to do custom work

+ 1 - 14
gameplay/android/jni/Android.mk

@@ -1,17 +1,4 @@
-# Copyright (C) 2009 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
+
 LOCAL_PATH := $(call my-dir)/../../src
 
 include $(CLEAR_VARS)

+ 5 - 7
gameplay/gameplay.vcxproj

@@ -900,7 +900,7 @@
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>__BB10__;_ITERATOR_DEBUG_LEVEL=0;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>USE_BLACKBERRY_GAMEPAD;_ITERATOR_DEBUG_LEVEL=0;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <AdditionalIncludeDirectories>$(ProjectDir)src;..\external-deps\lua\include;..\external-deps\bullet\include;..\external-deps\openal\include\AL;..\external-deps\alut\include\AL;..\external-deps\oggvorbis\include;..\external-deps\glew\include;..\external-deps\libpng\include;..\external-deps\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <RuntimeTypeInfo>
       </RuntimeTypeInfo>
@@ -935,8 +935,8 @@
       </PrecompiledHeader>
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>_ITERATOR_DEBUG_LEVEL=0;WIN32;_DEBUG;_LIB;GAMEPLAY_MEM_LEAK_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>$(ProjectDir)src;..\external-deps\lua\include;..\external-deps\bullet\include;..\external-deps\openal\include\AL;..\external-deps\alut\include\AL;..\external-deps\oggvorbis\include;..\external-deps\glew\include;..\external-deps\libpng\include;..\external-deps\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>USE_XINPUT;_ITERATOR_DEBUG_LEVEL=0;WIN32;_DEBUG;_LIB;GAMEPLAY_MEM_LEAK_DETECTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>$(ProjectDir)src;..\external-deps\lua\include;C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include;..\external-deps\bullet\include;..\external-deps\openal\include\AL;..\external-deps\alut\include\AL;..\external-deps\oggvorbis\include;..\external-deps\glew\include;..\external-deps\libpng\include;..\external-deps\zlib\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <RuntimeTypeInfo>true</RuntimeTypeInfo>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
     </ClCompile>
@@ -947,10 +947,8 @@
     <Lib>
       <Verbose>
       </Verbose>
-      <AdditionalDependencies>
-      </AdditionalDependencies>
-      <AdditionalLibraryDirectories>
-      </AdditionalLibraryDirectories>
+      <AdditionalDependencies>XInput.lib</AdditionalDependencies>
+      <AdditionalLibraryDirectories>C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86</AdditionalLibraryDirectories>
     </Lib>
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMem|x64'">

+ 1 - 1
gameplay/gameplay.xcodeproj/xcshareddata/xcschemes/gameplay-ios.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0450"
+   LastUpgradeVersion = "0460"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 1 - 1
gameplay/gameplay.xcodeproj/xcshareddata/xcschemes/gameplay-macosx.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0450"
+   LastUpgradeVersion = "0460"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"

+ 12 - 1
gameplay/src/AIStateMachine.cpp

@@ -25,7 +25,18 @@ AIStateMachine::~AIStateMachine()
     {
         (*itr)->release();
     }
-    SAFE_RELEASE(AIState::_empty);
+
+    if (AIState::_empty)
+    {
+        if (AIState::_empty->getRefCount() == 1)
+        {
+            SAFE_RELEASE(AIState::_empty);
+        }
+        else
+        {
+            AIState::_empty->release();
+        }
+    }
 }
 
 AIAgent* AIStateMachine::getAgent() const

+ 6 - 8
gameplay/src/Form.cpp

@@ -746,21 +746,19 @@ bool Form::projectPoint(int x, int y, Vector3* point)
     {
         // Get info about the form's position.
         Matrix m = _node->getWorldMatrix();
-        Vector3 min(0, 0, 0);
-        m.transformPoint(&min);
+        Vector3 pointOnPlane(0, 0, 0);
+        m.transformPoint(&pointOnPlane);
 
         // Unproject point into world space.
         Ray ray;
         camera->pickRay(Game::getInstance()->getViewport(), x, y, &ray);
 
         // Find the quad's plane.  We know its normal is the quad's forward vector.
-        Vector3 normal = _node->getForwardVectorWorld();
+        Vector3 normal = _node->getForwardVectorWorld().normalize();
 
-        // To get the plane's distance from the origin, we'll find the distance from the plane defined
-        // by the quad's forward vector and one of its points to the plane defined by the same vector and the origin.
-        const float& a = normal.x; const float& b = normal.y; const float& c = normal.z;
-        const float d = -(a*min.x) - (b*min.y) - (c*min.z);
-        const float distance = fabs(d) /  sqrt(a*a + b*b + c*c);
+        // To get the plane's distance from the origin, we project a point on the
+        // plane onto the plane's normal vector.
+        const float distance = fabs(Vector3::dot(pointOnPlane, normal));
         Plane plane(normal, -distance);
 
         // Check for collision with plane.

+ 5 - 0
gameplay/src/ImageControl.cpp

@@ -113,6 +113,11 @@ const Rectangle& ImageControl::getRegionDst() const
     return _dstRegion;
 }
 
+const char* ImageControl::getType() const
+{
+    return "image";
+}
+
 void ImageControl::drawImages(SpriteBatch* spriteBatch, const Rectangle& clip)
 {
     spriteBatch->finish();

+ 4 - 2
gameplay/src/ImageControl.h

@@ -1,7 +1,7 @@
 #ifndef IMAGECONTROL_H_
 #define IMAGECONTROL_H_
 
-#include "Control.h"
+#include "Button.h"
 #include "Theme.h"
 #include "Image.h"
 #include "SpriteBatch.h"
@@ -33,7 +33,7 @@ namespace gameplay
      }
  @endverbatim
  */
-class ImageControl : public Control
+class ImageControl : public Button
 {
     friend class Container;
 
@@ -109,6 +109,8 @@ public:
      */
     const Rectangle& getRegionDst() const;
 
+    const char* getType() const;
+
 protected:
 
     ImageControl();

+ 6 - 0
gameplay/src/Light.cpp

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

+ 5 - 0
gameplay/src/MaterialParameter.cpp

@@ -668,4 +668,9 @@ void MaterialParameter::cloneInto(MaterialParameter* materialParameter) const
     this->AnimationTarget::cloneInto(materialParameter, context);
 }
 
+MaterialParameter::MethodBinding::MethodBinding(MaterialParameter* param) :
+    _parameter(param), _autoBinding(false)
+{
+}
+
 }

+ 14 - 4
gameplay/src/MaterialParameter.h

@@ -243,10 +243,19 @@ private:
      */
     class MethodBinding : public Ref
     {
+        friend class RenderState;
+
     public:
+
         virtual void setValue(Effect* effect) = 0;
 
     protected:
+
+        /**
+         * Constructor.
+         */
+        MethodBinding(MaterialParameter* param);
+
         /**
          * Destructor.
          */
@@ -256,6 +265,9 @@ private:
          * Hidden copy assignment operator.
          */
         MethodBinding& operator=(const MethodBinding&);
+
+        MaterialParameter* _parameter;
+        bool _autoBinding;
     };
 
     /**
@@ -269,7 +281,6 @@ private:
         MethodValueBinding(MaterialParameter* param, ClassType* instance, ValueMethod valueMethod);
         void setValue(Effect* effect);
     private:
-        MaterialParameter* _parameter;
         ClassType* _instance;
         ValueMethod _valueMethod;
 
@@ -287,7 +298,6 @@ private:
         MethodArrayBinding(MaterialParameter* param, ClassType* instance, ValueMethod valueMethod, CountMethod countMethod);
         void setValue(Effect* effect);
     private:
-        MaterialParameter* _parameter;
         ClassType* _instance;
         ValueMethod _valueMethod;
         CountMethod _countMethod;
@@ -363,7 +373,7 @@ void MaterialParameter::bindValue(ClassType* classInstance, ParameterType (Class
 
 template <class ClassType, class ParameterType>
 MaterialParameter::MethodValueBinding<ClassType, ParameterType>::MethodValueBinding(MaterialParameter* param, ClassType* instance, ValueMethod valueMethod) :
-    _parameter(param), _instance(instance), _valueMethod(valueMethod)
+    MethodBinding(param), _instance(instance), _valueMethod(valueMethod)
 {
 }
 
@@ -375,7 +385,7 @@ void MaterialParameter::MethodValueBinding<ClassType, ParameterType>::setValue(E
 
 template <class ClassType, class ParameterType>
 MaterialParameter::MethodArrayBinding<ClassType, ParameterType>::MethodArrayBinding(MaterialParameter* param, ClassType* instance, ValueMethod valueMethod, CountMethod countMethod) :
-    _parameter(param), _instance(instance), _valueMethod(valueMethod), _countMethod(countMethod)
+    MethodBinding(param), _instance(instance), _valueMethod(valueMethod), _countMethod(countMethod)
 {
 }
 

+ 33 - 1
gameplay/src/Node.cpp

@@ -126,6 +126,8 @@ void Node::addChild(Node* child)
 
     ++_childCount;
 
+    setBoundsDirty();
+
     if (_notifyHierarchyChanged)
     {
         hierarchyChanged();
@@ -768,6 +770,8 @@ void Node::setLight(Light* light)
             _light->addRef();
             _light->setNode(this);
         }
+
+        setBoundsDirty();
     }
 }
 
@@ -818,6 +822,8 @@ void Node::setTerrain(Terrain* terrain)
             _terrain->addRef();
             _terrain->setNode(this);
         }
+
+        setBoundsDirty();
     }
 }
 
@@ -874,6 +880,26 @@ const BoundingSphere& Node::getBoundingSphere() const
                 _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)
         {
             // Empty bounding sphere, set the world translation with zero radius
@@ -954,11 +980,13 @@ Node* Node::cloneRecursive(NodeCloneContext &context) const
     Node* copy = cloneSingleNode(context);
     GP_ASSERT(copy);
 
+    // Find our current last child
     Node* lastChild = NULL;
     for (Node* child = getFirstChild(); child != NULL; child = child->getNextSibling())
     {
         lastChild = child;
     }
+
     // Loop through the nodes backwards because addChild adds the node to the front.
     for (Node* child = lastChild; child != NULL; child = child->getPreviousSibling())
     {
@@ -967,6 +995,7 @@ Node* Node::cloneRecursive(NodeCloneContext &context) const
         copy->addChild(childCopy);
         childCopy->release();
     }
+
     return copy;
 }
 
@@ -1003,7 +1032,10 @@ void Node::cloneInto(Node* node, NodeCloneContext &context) const
     }
     node->_world = _world;
     node->_bounds = _bounds;
-    node->_userData = _userData;
+
+    // Note: Do not clone _userData - we can't make any assumptions about its content and how it's managed,
+    // so it's the caller's responsibility to clone user data if needed.
+
     if (_tags)
     {
         node->_tags = new std::map<std::string, std::string>(_tags->begin(), _tags->end());

+ 1 - 0
gameplay/src/Node.h

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

+ 5 - 4
gameplay/src/Pass.cpp

@@ -54,10 +54,10 @@ void Pass::setVertexAttributeBinding(VertexAttributeBinding* binding)
     }
 }
 
- VertexAttributeBinding* Pass::getVertexAttributeBinding() const
- {
-     return _vaBinding;
- }
+VertexAttributeBinding* Pass::getVertexAttributeBinding() const
+{
+    return _vaBinding;
+}
 
 void Pass::bind()
 {
@@ -92,6 +92,7 @@ Pass* Pass::clone(Technique* technique, NodeCloneContext &context) const
     effect->addRef();
     Pass* pass = new Pass(getId(), technique, effect);
     RenderState::cloneInto(pass, context);
+    pass->_parent = technique;
     return pass;
 }
 

+ 15 - 8
gameplay/src/PlatformLinux.cpp

@@ -1557,10 +1557,12 @@ namespace gameplay
                         long curMappingIndex = -1;
                         if(tryGetGamepadMappedButton(gpInfo, jevent.number, curMappingIndex))
                         {
+                            unsigned int buttons = 0;
                             if (jevent.value)
-                                gamepad->_buttons |= (1 << curMappingIndex);
+                                buttons |= (1 << curMappingIndex);
                             else
-                                gamepad->_buttons &= ~(1 << curMappingIndex);
+                                buttons &= ~(1 << curMappingIndex);
+                            gamepad->setButtons(buttons);
                         }
                         break;
                     }
@@ -1581,27 +1583,32 @@ namespace gameplay
                                     bool not_js_axis = false;
                                     if((jsInfo->flags & GP_AXIS_IS_DPAD))
                                     {
+                                        unsigned int buttons = 0;
                                         if(jevent.value != 0)
-                                            gamepad->_buttons |= (1 << (jevent.value > 0 ? jsInfo->mappedPosArg : jsInfo->mappedNegArg));
+                                            buttons |= (1 << (jevent.value > 0 ? jsInfo->mappedPosArg : jsInfo->mappedNegArg));
                                         else
                                         {
-                                            gamepad->_buttons &= ~(1 << jsInfo->mappedPosArg);
-                                            gamepad->_buttons &= ~(1 << jsInfo->mappedNegArg);
+                                            buttons &= ~(1 << jsInfo->mappedPosArg);
+                                            buttons &= ~(1 << jsInfo->mappedNegArg);
                                         }
+                                        gamepad->setButtons(buttons);
                                         not_js_axis = true;
                                     }
                                     if((jsInfo->flags & GP_AXIS_IS_TRIGGER))
                                     {
-                                        gamepad->_triggers[jsInfo->mappedPosArg] = val;
+                                        gamepad->setTriggerValue(jsInfo->mappedPosArg, val);
                                         not_js_axis = true;
                                     }
 
                                     if(!not_js_axis)
                                     {
+                                        Vector2 jsVals;
+                                        gamepad->getJoystickValues(jsInfo->joystickIndex,&jsVals);
                                         if(jsInfo->flags & GP_AXIS_IS_XAXIS)
-                                            gamepad->_joysticks[jsInfo->joystickIndex].x = val;
+                                            jsVals.x = val;
                                         else
-                                            gamepad->_joysticks[jsInfo->joystickIndex].y = val;
+                                            jsVals.y = val;
+                                        gamepad->setJoystickValue(jsInfo->joystickIndex,jsVals.x,jsVals.y);
                                     }
                                 }
                             }

+ 15 - 14
gameplay/src/PlatformMacOSX.mm

@@ -2046,7 +2046,7 @@ void Platform::pollGamepadState(Gamepad* gamepad)
             }
         }
         
-        gamepad->_buttons = 0;
+        unsigned int buttons = 0;
         for (int i = 0; i < [gp numberOfButtons]; ++i)
         {
             HIDGamepadButton* b = [gp buttonAtIndex: i];
@@ -2056,11 +2056,11 @@ void Platform::pollGamepadState(Gamepad* gamepad)
                 if (mapping)
                 {
                     if (mapping[i] >= 0)
-                        gamepad->_buttons |= (1 << mapping[i]);
+                        buttons |= (1 << mapping[i]);
                 }
                 else
                 {
-                    gamepad->_buttons |= (1 << i);
+                    buttons |= (1 << i);
                 }
             }
         }
@@ -2074,32 +2074,34 @@ void Platform::pollGamepadState(Gamepad* gamepad)
                 case -1:
                     break;
                 case 0:
-                    gamepad->_buttons |= (1 << Gamepad::BUTTON_UP);
+                    buttons |= (1 << Gamepad::BUTTON_UP);
                     break;
                 case 1:
-                    gamepad->_buttons |= (1 << Gamepad::BUTTON_UP) | (1 << Gamepad::BUTTON_RIGHT);
+                    buttons |= (1 << Gamepad::BUTTON_UP) | (1 << Gamepad::BUTTON_RIGHT);
                     break;
                 case 2:
-                    gamepad->_buttons |= (1 << Gamepad::BUTTON_RIGHT);
+                    buttons |= (1 << Gamepad::BUTTON_RIGHT);
                     break;
                 case 3:
-                    gamepad->_buttons |= (1 << Gamepad::BUTTON_RIGHT) | (1 << Gamepad::BUTTON_DOWN);
+                    buttons |= (1 << Gamepad::BUTTON_RIGHT) | (1 << Gamepad::BUTTON_DOWN);
                     break;
                 case 4:
-                    gamepad->_buttons |= (1 << Gamepad::BUTTON_DOWN);
+                    buttons |= (1 << Gamepad::BUTTON_DOWN);
                     break;
                 case 5:
-                    gamepad->_buttons |= (1 << Gamepad::BUTTON_DOWN) | (1 << Gamepad::BUTTON_LEFT);
+                    buttons |= (1 << Gamepad::BUTTON_DOWN) | (1 << Gamepad::BUTTON_LEFT);
                     break;
                 case 6:
-                    gamepad->_buttons |= (1 << Gamepad::BUTTON_LEFT);
+                    buttons |= (1 << Gamepad::BUTTON_LEFT);
                     break;
                 case 7:
-                    gamepad->_buttons |= (1 << Gamepad::BUTTON_LEFT) | (1 << Gamepad::BUTTON_UP);
+                    buttons |= (1 << Gamepad::BUTTON_LEFT) | (1 << Gamepad::BUTTON_UP);
                     break;
             }
         }
         
+        gamepad->setButtons(buttons);
+        
         for (unsigned int i = 0; i < [gp numberOfSticks]; ++i)
         {
             float rawX = [[gp axisAtIndex: i*2] calibratedValue];
@@ -2109,13 +2111,12 @@ void Platform::pollGamepadState(Gamepad* gamepad)
             if (std::fabs(rawY) <= axisDeadZone)
                 rawY = 0;
             
-            gamepad->_joysticks[i].x = rawX;
-            gamepad->_joysticks[i].y = rawY;
+            gamepad->setJoystickValue(i, rawX, rawY);
         }
         
         for (unsigned int i = 0; i < [gp numberOfTriggerButtons]; ++i)
         {
-            gamepad->_triggers[i] = [[gp triggerButtonAtIndex: i] calibratedStateValue];
+            gamepad->setTriggerValue(i, [[gp triggerButtonAtIndex: i] calibratedStateValue]);
         }
     }
 }

+ 154 - 68
gameplay/src/RenderState.cpp

@@ -227,79 +227,148 @@ void RenderState::applyAutoBinding(const char* uniformName, const char* autoBind
     MaterialParameter* param = getParameter(uniformName);
     GP_ASSERT(param);
 
+    bool bound = false;
+
     // First attempt to resolve the binding using custom registered resolvers.
     if (_customAutoBindingResolvers.size() > 0)
     {
         for (size_t i = 0, count = _customAutoBindingResolvers.size(); i < count; ++i)
         {
             if (_customAutoBindingResolvers[i](autoBinding, _nodeBinding, param))
-                return; // handled by custom resolver
+            {
+                // Handled by custom auto binding resolver
+                bound = true;
+                break;
+            }
         }
     }
 
     // Perform built-in resolution
-    if (strcmp(autoBinding, "WORLD_MATRIX") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getWorldMatrix);
-    }
-    else if (strcmp(autoBinding, "VIEW_MATRIX") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getViewMatrix);
-    }
-    else if (strcmp(autoBinding, "PROJECTION_MATRIX") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getProjectionMatrix);
-    }
-    else if (strcmp(autoBinding, "WORLD_VIEW_MATRIX") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getWorldViewMatrix);
-    }
-    else if (strcmp(autoBinding, "VIEW_PROJECTION_MATRIX") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getViewProjectionMatrix);
-    }
-    else if (strcmp(autoBinding, "WORLD_VIEW_PROJECTION_MATRIX") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getWorldViewProjectionMatrix);
-    }
-    else if (strcmp(autoBinding, "INVERSE_TRANSPOSE_WORLD_MATRIX") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getInverseTransposeWorldMatrix);
-    }
-    else if (strcmp(autoBinding, "INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getInverseTransposeWorldViewMatrix);
-    }
-    else if (strcmp(autoBinding, "CAMERA_WORLD_POSITION") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getActiveCameraTranslationWorld);
-    }
-    else if (strcmp(autoBinding, "CAMERA_VIEW_POSITION") == 0)
-    {
-        param->bindValue(_nodeBinding, &Node::getActiveCameraTranslationView);
-    }
-    else if (strcmp(autoBinding, "MATRIX_PALETTE") == 0)
-    {
-        param->bindValue(this, &RenderState::autoBindingGetMatrixPalette, &RenderState::autoBindingGetMatrixPaletteSize);
-    }
-    else if (strcmp(autoBinding, "SCENE_AMBIENT_COLOR") == 0)
-    {
-        param->bindValue(this, &RenderState::autoBindingGetAmbientColor);
-    }
-    else if (strcmp(autoBinding, "SCENE_LIGHT_COLOR") == 0)
-    {
-        param->bindValue(this, &RenderState::autoBindingGetLightColor);
-    }
-    else if (strcmp(autoBinding, "SCENE_LIGHT_DIRECTION") == 0)
+    if (!bound)
     {
-        param->bindValue(this, &RenderState::autoBindingGetLightDirection);
+        bound = true;
+
+        if (strcmp(autoBinding, "WORLD_MATRIX") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetWorldMatrix);
+        }
+        else if (strcmp(autoBinding, "VIEW_MATRIX") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetViewMatrix);
+        }
+        else if (strcmp(autoBinding, "PROJECTION_MATRIX") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetProjectionMatrix);
+        }
+        else if (strcmp(autoBinding, "WORLD_VIEW_MATRIX") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetWorldViewMatrix);
+        }
+        else if (strcmp(autoBinding, "VIEW_PROJECTION_MATRIX") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetViewProjectionMatrix);
+        }
+        else if (strcmp(autoBinding, "WORLD_VIEW_PROJECTION_MATRIX") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetWorldViewProjectionMatrix);
+        }
+        else if (strcmp(autoBinding, "INVERSE_TRANSPOSE_WORLD_MATRIX") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetInverseTransposeWorldMatrix);
+        }
+        else if (strcmp(autoBinding, "INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetInverseTransposeWorldViewMatrix);
+        }
+        else if (strcmp(autoBinding, "CAMERA_WORLD_POSITION") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetCameraWorldPosition);
+        }
+        else if (strcmp(autoBinding, "CAMERA_VIEW_POSITION") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetCameraViewPosition);
+        }
+        else if (strcmp(autoBinding, "MATRIX_PALETTE") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetMatrixPalette, &RenderState::autoBindingGetMatrixPaletteSize);
+        }
+        else if (strcmp(autoBinding, "SCENE_AMBIENT_COLOR") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetAmbientColor);
+        }
+        else if (strcmp(autoBinding, "SCENE_LIGHT_COLOR") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetLightColor);
+        }
+        else if (strcmp(autoBinding, "SCENE_LIGHT_DIRECTION") == 0)
+        {
+            param->bindValue(this, &RenderState::autoBindingGetLightDirection);
+        }
+        else
+        {
+            bound = false;
+            GP_WARN("Unsupported auto binding type (%d).", autoBinding);
+        }
     }
-    else
+
+    if (bound)
     {
-        GP_WARN("Unsupported auto binding type (%d).", autoBinding);
+        // Mark parameter as an auto binding
+        if (param->_type == MaterialParameter::METHOD && param->_value.method)
+            param->_value.method->_autoBinding = true;
     }
 }
 
+const Matrix& RenderState::autoBindingGetWorldMatrix() const
+{
+    return _nodeBinding ? _nodeBinding->getWorldMatrix() : Matrix::identity();
+}
+
+const Matrix& RenderState::autoBindingGetViewMatrix() const
+{
+    return _nodeBinding ? _nodeBinding->getViewMatrix() : Matrix::identity();
+}
+
+const Matrix& RenderState::autoBindingGetProjectionMatrix() const
+{
+    return _nodeBinding ? _nodeBinding->getProjectionMatrix() : Matrix::identity();
+}
+
+const Matrix& RenderState::autoBindingGetWorldViewMatrix() const
+{
+    return _nodeBinding ? _nodeBinding->getWorldViewMatrix() : Matrix::identity();
+}
+
+const Matrix& RenderState::autoBindingGetViewProjectionMatrix() const
+{
+    return _nodeBinding ? _nodeBinding->getViewProjectionMatrix() : Matrix::identity();
+}
+
+const Matrix& RenderState::autoBindingGetWorldViewProjectionMatrix() const
+{
+    return _nodeBinding ? _nodeBinding->getWorldViewProjectionMatrix() : Matrix::identity();
+}
+
+const Matrix& RenderState::autoBindingGetInverseTransposeWorldMatrix() const
+{
+    return _nodeBinding ? _nodeBinding->getInverseTransposeWorldMatrix() : Matrix::identity();
+}
+
+const Matrix& RenderState::autoBindingGetInverseTransposeWorldViewMatrix() const
+{
+    return _nodeBinding ? _nodeBinding->getInverseTransposeWorldViewMatrix() : Matrix::identity();
+}
+
+Vector3 RenderState::autoBindingGetCameraWorldPosition() const
+{
+    return _nodeBinding ? _nodeBinding->getActiveCameraTranslationWorld() : Vector3::zero();
+}
+
+Vector3 RenderState::autoBindingGetCameraViewPosition() const
+{
+    return _nodeBinding ? _nodeBinding->getActiveCameraTranslationView() : Vector3::zero();
+}
+
 const Vector4* RenderState::autoBindingGetMatrixPalette() const
 {
     Model* model = _nodeBinding ? _nodeBinding->getModel() : NULL;
@@ -307,6 +376,13 @@ const Vector4* RenderState::autoBindingGetMatrixPalette() const
     return skin ? skin->getMatrixPalette() : NULL;
 }
 
+unsigned int RenderState::autoBindingGetMatrixPaletteSize() const
+{
+    Model* model = _nodeBinding ? _nodeBinding->getModel() : NULL;
+    MeshSkin* skin = model ? model->getSkin() : NULL;
+    return skin ? skin->getMatrixPaletteSize() : 0;
+}
+
 const Vector3& RenderState::autoBindingGetAmbientColor() const
 {
     Scene* scene = _nodeBinding ? _nodeBinding->getScene() : NULL;
@@ -326,13 +402,6 @@ const Vector3& RenderState::autoBindingGetLightDirection() const
     return scene ? scene->getLightDirection() : down;
 }
 
-unsigned int RenderState::autoBindingGetMatrixPaletteSize() const
-{
-    Model* model = _nodeBinding ? _nodeBinding->getModel() : NULL;
-    MeshSkin* skin = model ? model->getSkin() : NULL;
-    return skin ? skin->getMatrixPaletteSize() : 0;
-}
-
 void RenderState::bind(Pass* pass)
 {
     GP_ASSERT(pass);
@@ -406,6 +475,11 @@ void RenderState::cloneInto(RenderState* renderState, NodeCloneContext& context)
         const MaterialParameter* param = *it;
         GP_ASSERT(param);
 
+        // If this parameter is a method binding auto binding, don't clone it - it will get setup automatically
+        // via the cloned auto bindings instead.
+        if (param->_type == MaterialParameter::METHOD && param->_value.method && param->_value.method->_autoBinding)
+            continue;
+
         MaterialParameter* paramCopy = new MaterialParameter(param->getName());
         param->cloneInto(paramCopy);
 
@@ -415,11 +489,9 @@ void RenderState::cloneInto(RenderState* renderState, NodeCloneContext& context)
     // Clone our state block
     if (_state)
     {
-        // StateBlock contains only simple primitive data, so use the default assignment
-        // operator to do a memberwise copy.
-        *renderState->getStateBlock() = *_state;
+        _state->cloneInto(renderState->getStateBlock());
     }
-    
+
     // Notes:
     // 1. _nodeBinding should not be set here, it should be set by the caller.
     // 2. _parent should not be set here, since it's set in the constructor of Technique and Pass.
@@ -572,6 +644,20 @@ void RenderState::StateBlock::enableDepthWrite()
     }
 }
 
+void RenderState::StateBlock::cloneInto(StateBlock* state)
+{
+    GP_ASSERT(state);
+
+    state->_cullFaceEnabled = _cullFaceEnabled;
+    state->_depthTestEnabled = _depthTestEnabled;
+    state->_depthWriteEnabled = _depthWriteEnabled;
+    state->_depthFunction = _depthFunction;
+    state->_blendEnabled = _blendEnabled;
+    state->_blendSrc = _blendSrc;
+    state->_blendDst = _blendDst;
+    state->_bits = _bits;
+}
+
 static bool parseBoolean(const char* value)
 {
     GP_ASSERT(value);

+ 15 - 21
gameplay/src/RenderState.h

@@ -287,6 +287,8 @@ public:
 
         static void enableDepthWrite();
 
+        void cloneInto(StateBlock* state);
+
         // States
         bool _cullFaceEnabled;
         bool _depthTestEnabled;
@@ -476,31 +478,23 @@ private:
      */
     RenderState& operator=(const RenderState&);
 
-    /**
-     * Internal auto binding handler.
-     */
+    // Internal auto binding handler methods.
+    const Matrix& autoBindingGetWorldMatrix() const;
+    const Matrix& autoBindingGetViewMatrix() const;
+    const Matrix& autoBindingGetProjectionMatrix() const;
+    const Matrix& autoBindingGetWorldViewMatrix() const;
+    const Matrix& autoBindingGetViewProjectionMatrix() const;
+    const Matrix& autoBindingGetWorldViewProjectionMatrix() const;
+    const Matrix& autoBindingGetInverseTransposeWorldMatrix() const;
+    const Matrix& autoBindingGetInverseTransposeWorldViewMatrix() const;
+    Vector3 autoBindingGetCameraWorldPosition() const;
+    Vector3 autoBindingGetCameraViewPosition() const;
+    const Vector4* autoBindingGetMatrixPalette() const;
+    unsigned int autoBindingGetMatrixPaletteSize() const;
     const Vector3& autoBindingGetAmbientColor() const;
-
-    /**
-     * Internal auto binding handler.
-     */
     const Vector3& autoBindingGetLightColor() const;
-
-    /**
-     * Internal auto binding handler.
-     */
     const Vector3& autoBindingGetLightDirection() const;
 
-    /**
-     * Internal auto binding handler.
-     */
-    const Vector4* autoBindingGetMatrixPalette() const;
-
-    /**
-     * Internal auto binding handler.
-     */
-    unsigned int autoBindingGetMatrixPaletteSize() const;
-
 protected:
 
     /**

+ 14 - 1
gameplay/src/ScriptController.cpp

@@ -426,20 +426,33 @@ bool ScriptUtil::luaCheckBool(lua_State* state, int n)
 
 void ScriptController::loadScript(const char* path, bool forceReload)
 {
+    GP_ASSERT(path);
     std::set<std::string>::iterator iter = _loadedScripts.find(path);
     if (iter == _loadedScripts.end() || forceReload)
     {
 #ifdef __ANDROID__
         const char* scriptContents = FileSystem::readAll(path);
         if (luaL_dostring(_lua, scriptContents))
+        {
             GP_WARN("Failed to run Lua script with error: '%s'.", lua_tostring(_lua, -1));
+        }
         SAFE_DELETE_ARRAY(scriptContents);
 #else
-        if (luaL_dofile(_lua, path))
+        std::string fullPath;
+        if (!FileSystem::isAbsolutePath(path))
+        {
+            fullPath.append(FileSystem::getResourcePath());
+        }
+        fullPath.append(path);
+        if (luaL_dofile(_lua, fullPath.c_str()))
+        {
             GP_WARN("Failed to run Lua script with error: '%s'.", lua_tostring(_lua, -1));
+        }
 #endif
         if (iter == _loadedScripts.end())
+        {
             _loadedScripts.insert(path);
+        }
     }
 }
 

+ 1 - 0
gameplay/src/Technique.cpp

@@ -65,6 +65,7 @@ Technique* Technique::clone(Material* material, NodeCloneContext &context) const
         technique->_passes.push_back(passCopy);
     }
     RenderState::cloneInto(technique, context);
+    technique->_parent = material;
     return technique;
 }
 

+ 40 - 22
gameplay/src/Texture.cpp

@@ -45,7 +45,8 @@ namespace gameplay
 static std::vector<Texture*> __textureCache;
 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) );
 
     // 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->_handle = textureId;
     texture->_format = format;
     texture->_width = width;
     texture->_height = height;
+    texture->_minFilter = minFilter;
     if (generateMipmaps)
     {
         texture->generateMipmaps();
@@ -273,7 +276,9 @@ Texture* Texture::createCompressedPVRTC(const char* path)
     GLuint textureId;
     GL_ASSERT( glGenTextures(1, &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->_handle = textureId;
@@ -281,6 +286,7 @@ Texture* Texture::createCompressedPVRTC(const char* path)
     texture->_height = height;
     texture->_mipmapped = mipMapCount > 1;
     texture->_compressed = true;
+    texture->_minFilter = minFilter;
 
     // Load the data for each level.
     GLubyte* ptr = data;
@@ -766,7 +772,9 @@ Texture* Texture::createCompressedDDS(const char* path)
     GLuint textureId;
     GL_ASSERT( glGenTextures(1, &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.
     texture = new Texture();
@@ -775,6 +783,7 @@ Texture* Texture::createCompressedDDS(const char* path)
     texture->_height = header.dwHeight;
     texture->_compressed = compressed;
     texture->_mipmapped = header.dwMipMapCount > 1;
+    texture->_minFilter = minFilter;
 
     // Load texture data.
     for (unsigned int i = 0; i < header.dwMipMapCount; ++i)
@@ -824,20 +833,6 @@ TextureHandle Texture::getHandle() const
     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()
 {
     if (!_mipmapped)
@@ -861,10 +856,11 @@ bool Texture::isCompressed() const
 }
 
 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);
-    _minFilter = texture->isMipmapped() ? Texture::NEAREST_MIPMAP_LINEAR : Texture::LINEAR;
+    _minFilter = texture->_minFilter;
+    _magFilter = texture->_magFilter;
 }
 
 Texture::Sampler::~Sampler()
@@ -889,14 +885,12 @@ void Texture::Sampler::setWrapMode(Wrap wrapS, Wrap wrapT)
 {
     _wrapS = wrapS;
     _wrapT = wrapT;
-    _texture->setWrapMode(wrapS, wrapT);
 }
 
 void Texture::Sampler::setFilterMode(Filter minificationFilter, Filter magnificationFilter)
 {
     _minFilter = minificationFilter;
     _magFilter = magnificationFilter;
-    _texture->setFilterMode(minificationFilter, magnificationFilter);
 }
 
 Texture* Texture::Sampler::getTexture() const
@@ -909,6 +903,30 @@ void Texture::Sampler::bind()
     GP_ASSERT(_texture);
 
     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;
 
-    /**
-     * 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.
      */
@@ -307,6 +291,10 @@ private:
     bool _mipmapped;
     bool _cached;
     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");
     theme->_texture = Texture::create(textureFile, false);
     GP_ASSERT(theme->_texture);
-    theme->_texture->setFilterMode(Texture::NEAREST, Texture::NEAREST);
     theme->_spriteBatch = SpriteBatch::create(theme->_texture);
     GP_ASSERT(theme->_spriteBatch);
+    theme->_spriteBatch->getSampler()->setFilterMode(Texture::NEAREST, Texture::NEAREST);
 
     float tw = 1.0f / theme->_texture->getWidth();
     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},
         {"isMipmapped", lua_Texture_isMipmapped},
         {"release", lua_Texture_release},
-        {"setFilterMode", lua_Texture_setFilterMode},
-        {"setWrapMode", lua_Texture_setWrapMode},
         {NULL, NULL}
     };
     const luaL_Reg lua_statics[] = 
@@ -473,86 +471,6 @@ int lua_Texture_release(lua_State* state)
     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)
 {
     // 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_isMipmapped(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);
 
 void luaRegister_Texture();

+ 117 - 0
install.bat

@@ -0,0 +1,117 @@
+@echo off
+REM
+REM 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
+> temp.cs ECHO using System;
+>> temp.cs ECHO using System.Net;
+>> temp.cs ECHO using System.ComponentModel;
+>> temp.cs ECHO class Program
+>> temp.cs ECHO {
+>> temp.cs ECHO     static string file = "%filename%.zip";
+>> temp.cs ECHO     static string url = "%prefix%/" + file;
+>> temp.cs ECHO     static bool done = false;
+>> temp.cs ECHO     static void Main(string[] args)
+>> temp.cs ECHO     {
+>> temp.cs ECHO         try
+>> temp.cs ECHO         {
+>> temp.cs ECHO             WebClient client = new WebClient();
+>> temp.cs ECHO             client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressChanged);
+>> temp.cs ECHO             client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadFileCompleted);
+>> temp.cs ECHO             Console.Write("Downloading " + url + ": 0%%    ");
+>> temp.cs ECHO             client.DownloadFileAsync(new Uri(url), file);
+>> temp.cs ECHO             while (!done) System.Threading.Thread.Sleep(1000);
+>> temp.cs ECHO         }
+>> temp.cs ECHO         catch (Exception x)
+>> temp.cs ECHO         {
+>> temp.cs ECHO             Console.WriteLine("Error: " + x.Message);
+>> temp.cs ECHO         }
+>> temp.cs ECHO     }
+>> temp.cs ECHO     static void DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
+>> temp.cs ECHO     {
+>> temp.cs ECHO         Console.Write("\rDownloading " + url + ": " + e.ProgressPercentage + "%%    ");
+>> temp.cs ECHO     }
+>> temp.cs ECHO     static void DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
+>> temp.cs ECHO     {
+>> temp.cs ECHO         Console.WriteLine("\rDownloading " + url + ": Done.    ");
+>> temp.cs ECHO         done = true;
+>> temp.cs ECHO     }
+>> temp.cs ECHO }
+> temp1.vbs ECHO WScript.Echo "Downloading using a fallback method. This might take a few minutes."
+>> 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 WScript.Echo "Sending request..."
+>> temp1.vbs ECHO objXMLHTTP.send()
+>> temp1.vbs ECHO If objXMLHTTP.Status = 200 Then
+>> temp1.vbs ECHO WScript.Echo "Got response. Processing body..."
+>> 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 WScript.Echo "Saving result to a file..."
+>> temp1.vbs ECHO objADOStream.SaveToFile strHDLocation
+>> temp1.vbs ECHO objADOStream.Close
+>> temp1.vbs ECHO Set objADOStream = Nothing
+>> temp1.vbs ECHO WScript.Echo "Success."
+>> temp1.vbs ECHO End if
+>> temp1.vbs ECHO Set objXMLHTTP = Nothing
+
+if exist %windir%\Microsoft.NET\Framework\v2.0.50727\NUL (
+    %windir%\Microsoft.NET\Framework\v2.0.50727\csc temp.cs
+) else (
+if exist %windir%\Microsoft.NET\Framework\v4.0.30319\NUL (
+    %windir%\Microsoft.NET\Framework\v4.0.30319\csc temp.cs
+) else (
+    goto USE_VBS_AS_FALLBACK
+))
+temp.exe
+del temp.exe
+goto :EXTRACT
+
+:USE_VBS_AS_FALLBACK
+cscript temp1.vbs %prefix%/%filename%.zip %filename%.zip
+
+:EXTRACT
+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 temp.cs
+del temp1.vbs
+del temp2.vbs
+del %filename%.zip
+echo Done.

+ 26 - 0
install.sh

@@ -0,0 +1,26 @@
+#!/bin/bash
+#
+# ./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.

+ 23 - 23
gameplay-newproject.bat → newproject.bat

@@ -5,7 +5,7 @@ REM
 REM generate-project.bat
 REM
 REM This windows batch script generates a set of gameplay project files.
-REM The new project will be based of the gameplay-template project and 
+REM The new project will be based of the template project and 
 REM it will be generated with the name and location that is specified
 REM as input parameters.
 REM
@@ -159,44 +159,44 @@ mkdir "%projPath%\src"
 mkdir "%projPath%\res"
 
 REM Copy Microsoft Visual Studio project files
-copy gameplay-template\gameplay-template.vcxproj "%projPath%\%projName%.vcxproj"
+copy template\template.vcxproj "%projPath%\%projName%.vcxproj"
 call:replace "%projPath%\%projName%.vcxproj" TEMPLATE_PROJECT "%projName%"
 call:replace "%projPath%\%projName%.vcxproj" TemplateGame "%className%"
 call:replace "%projPath%\%projName%.vcxproj" GAMEPLAY_PATH "%gpPath%"
 
-copy gameplay-template\gameplay-template.vcxproj.filters "%projPath%\%projName%.vcxproj.filters"
+copy template\template.vcxproj.filters "%projPath%\%projName%.vcxproj.filters"
 call:replace "%projPath%\%projName%.vcxproj.filters" TemplateGame "%className%"
 
-copy gameplay-template\gameplay-template.vcxproj.user "%projPath%\%projName%.vcxproj.user"
+copy template\template.vcxproj.user "%projPath%\%projName%.vcxproj.user"
 call:replace "%projPath%\%projName%.vcxproj.user" GAMEPLAY_PATH "%gpPath%"
 
 REM Copy Apple XCode project files
 mkdir "%projPath%\%projName%.xcodeproj"
-copy gameplay-template\gameplay-template.xcodeproj\project.pbxproj "%projPath%\%projName%.xcodeproj\project.pbxproj"
+copy template\template.xcodeproj\project.pbxproj "%projPath%\%projName%.xcodeproj\project.pbxproj"
 call:replace "%projPath%\%projName%.xcodeproj\project.pbxproj" GAMEPLAY_PATH "%gpPath%"
 call:replace "%projPath%\%projName%.xcodeproj\project.pbxproj" TemplateGame "%className%"
 call:replace "%projPath%\%projName%.xcodeproj\project.pbxproj" TEMPLATE_PROJECT "%projName%"
 
-copy gameplay-template\TEMPLATE_PROJECT-macosx.plist "%projPath%\%projName%-macosx.plist"
+copy template\TEMPLATE_PROJECT-macosx.plist "%projPath%\%projName%-macosx.plist"
 call:replace "%projPath%\%projName%-macosx.plist" TEMPLATE_UUID "%uuid%"
 call:replace "%projPath%\%projName%-macosx.plist" TEMPLATE_AUTHOR "%author%"
 
-copy gameplay-template\TEMPLATE_PROJECT-ios.plist "%projPath%\%projName%-ios.plist"
-copy gameplay-template\[email protected] "%projPath%\[email protected]"
+copy template\TEMPLATE_PROJECT-ios.plist "%projPath%\%projName%-ios.plist"
+copy template\[email protected] "%projPath%\[email protected]"
 call:replace "%projPath%\%projName%-ios.plist" TEMPLATE_TITLE "%title%"
 call:replace "%projPath%\%projName%-ios.plist" TEMPLATE_UUID "%uuid%"
 call:replace "%projPath%\%projName%-ios.plist" TEMPLATE_AUTHOR "%author%"
 
 REM Copy BlackBerry NDK project files
-copy gameplay-template\template.cproject "%projPath%\.cproject"
+copy template\template.cproject "%projPath%\.cproject"
 call:replace "%projPath%\.cproject" TEMPLATE_PROJECT "%projName%"
 call:replace "%projPath%\.cproject" TEMPLATE_UUID "%uuid%"
 call:replace "%projPath%\.cproject" GAMEPLAY_PATH "%gpPath%"
 
-copy gameplay-template\template.project "%projPath%\.project"
+copy template\template.project "%projPath%\.project"
 call:replace "%projPath%\.project" TEMPLATE_PROJECT "%projName%"
 
-copy gameplay-template\template.bar-descriptor.xml "%projPath%\bar-descriptor.xml"
+copy template\template.bar-descriptor.xml "%projPath%\bar-descriptor.xml"
 call:replace "%projPath%\bar-descriptor.xml" TEMPLATE_PROJECT "%projName%"
 call:replace "%projPath%\bar-descriptor.xml" TEMPLATE_TITLE "%title%"
 call:replace "%projPath%\bar-descriptor.xml" TEMPLATE_UUID "%uuid%"
@@ -206,51 +206,51 @@ call:replace "%projPath%\bar-descriptor.xml" TEMPLATE_DESCRIPTION "%desc%"
 REM Copy Android NDK project files
 mkdir "%projPath%\android"
 
-copy gameplay-template\android\template.AndroidManifest.xml "%projPath%\android\AndroidManifest.xml"
+copy template\android\template.AndroidManifest.xml "%projPath%\android\AndroidManifest.xml"
 call:replace "%projPath%\android\AndroidManifest.xml" TEMPLATE_PROJECT "%projName%"
 call:replace "%projPath%\android\AndroidManifest.xml" TEMPLATE_UUID "%uuid%"
 
-copy gameplay-template\android\template.build.xml "%projPath%\android\build.xml"
+copy template\android\template.build.xml "%projPath%\android\build.xml"
 call:replace "%projPath%\android\build.xml" TEMPLATE_PROJECT "%projName%"
 
 mkdir "%projPath%\android\jni"
 
-copy gameplay-template\android\jni\Application.mk "%projPath%\android\jni\Application.mk"
+copy template\android\jni\Application.mk "%projPath%\android\jni\Application.mk"
 
-copy gameplay-template\android\jni\template.Android.mk "%projPath%\android\jni\Android.mk"
+copy template\android\jni\template.Android.mk "%projPath%\android\jni\Android.mk"
 call:replace "%projPath%\android\jni\Android.mk" TemplateGame "%className%"
 call:replace "%projPath%\android\jni\Android.mk" TEMPLATE_PROJECT "%projName%"
 call:replace "%projPath%\android\jni\Android.mk" GAMEPLAY_PATH "%gpPath%"
 
 mkdir "%projPath%\android\res\drawable"
 
-copy gameplay-template\icon.png "%projPath%\android\res\drawable\icon.png"
+copy template\icon.png "%projPath%\android\res\drawable\icon.png"
 
 mkdir "%projPath%\android\res\values"
 
-copy gameplay-template\android\res\values\template.strings.xml "%projPath%\android\res\values\strings.xml"
+copy template\android\res\values\template.strings.xml "%projPath%\android\res\values\strings.xml"
 call:replace "%projPath%\android\res\values\strings.xml" TEMPLATE_TITLE "%title%"
 
 mkdir "%projPath%\build"
-copy "gameplay-template\gameplay-template-CMakeLists.txt" "%projPath%\CMakeLists.txt"
+copy "template\template-CMakeLists.txt" "%projPath%\CMakeLists.txt"
 call:replace "%projPath%\CMakeLists.txt" TEMPLATE_PROJECT %projName%
 call:replace "%projPath%\CMakeLists.txt" TemplateGame %className%
 call:replace "%projPath%\CMakeLists.txt" GAMEPLAY_PATH %gpPath%
 
 REM Copy source files
-copy gameplay-template\src\TemplateGame.h "%projPath%\src\%className%.h"
-copy gameplay-template\src\TemplateGame.cpp "%projPath%\src\%className%.cpp"
+copy template\src\TemplateGame.h "%projPath%\src\%className%.h"
+copy template\src\TemplateGame.cpp "%projPath%\src\%className%.cpp"
 call:replace "%projPath%\src\%className%.h" TemplateGame "%className%"
 call:replace "%projPath%\src\%className%.cpp" TemplateGame "%className%"
 
 REM Copy resource files
-copy gameplay-template\res\* "%projPath%\res\"
+copy template\res\* "%projPath%\res\"
 
 REM Copy icon
-copy gameplay-template\icon.png "%projPath%\icon.png"
+copy template\icon.png "%projPath%\icon.png"
 
 REM Copy config
-copy gameplay-template\game.config "%projPath%\game.config"
+copy template\game.config "%projPath%\game.config"
 call:replace "%projPath%\game.config" TEMPLATE_TITLE "%title%"
 
 REM Open new project folder

+ 24 - 24
gameplay-newproject.sh → newproject.sh

@@ -1,10 +1,10 @@
 #!/bin/bash
 # ********************************************************************
 #
-# generate-project.sh
+# newproject.sh
 #
 # This script generates a set of gameplay project files.
-# The new project will be based of the gameplay-template project and 
+# The new project will be based of the template project and 
 # it will be generated with the name and location that is specified
 # as input parameters.
 #
@@ -172,15 +172,15 @@ fi
 #############################################
 # Copy Microsoft Visual Studio project files
 #############################################
-cp "gameplay-template/gameplay-template.vcxproj" "$projPath/$projName.vcxproj"
+cp "template/template.vcxproj" "$projPath/$projName.vcxproj"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/$projName.vcxproj"
 aliassedinplace "s*TemplateGame*$className*g" "$projPath/$projName.vcxproj"
 aliassedinplace "s*GAMEPLAY_PATH*$gpPath*g" "$projPath/$projName.vcxproj"
 
-cp "gameplay-template/gameplay-template.vcxproj.filters" "$projPath/$projName.vcxproj.filters"
+cp "template/template.vcxproj.filters" "$projPath/$projName.vcxproj.filters"
 aliassedinplace "s*TemplateGame*$className*g" "$projPath/$projName.vcxproj.filters"
 
-cp "gameplay-template/gameplay-template.vcxproj.user" "$projPath/$projName.vcxproj.user"
+cp "template/template.vcxproj.user" "$projPath/$projName.vcxproj.user"
 aliassedinplace "s*GAMEPLAY_PATH*$gpPath*g" "$projPath/$projName.vcxproj.user"
 
 
@@ -188,17 +188,17 @@ aliassedinplace "s*GAMEPLAY_PATH*$gpPath*g" "$projPath/$projName.vcxproj.user"
 # Copy Apple Xcode project files
 #############################################
 mkdir -p "$projPath/$projName.xcodeproj"
-cp "gameplay-template/gameplay-template.xcodeproj/project.pbxproj" "$projPath/$projName.xcodeproj/project.pbxproj"
+cp "template/template.xcodeproj/project.pbxproj" "$projPath/$projName.xcodeproj/project.pbxproj"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/$projName.xcodeproj/project.pbxproj"
 aliassedinplace "s*TemplateGame*$className*g" "$projPath/$projName.xcodeproj/project.pbxproj"
 aliassedinplace "s*GAMEPLAY_PATH*$gpPath*g" "$projPath/$projName.xcodeproj/project.pbxproj"
 
-cp "gameplay-template/TEMPLATE_PROJECT-macosx.plist" "$projPath/$projName-macosx.plist"
+cp "template/TEMPLATE_PROJECT-macosx.plist" "$projPath/$projName-macosx.plist"
 aliassedinplace "s*TEMPLATE_UUID*$uuid*g" "$projPath/$projName-macosx.plist"
 aliassedinplace "s*TEMPLATE_AUTHOR*$author*g" "$projPath/$projName-macosx.plist"
 
-cp "gameplay-template/TEMPLATE_PROJECT-ios.plist" "$projPath/$projName-ios.plist"
-cp "gameplay-template/[email protected]" "$projPath/[email protected]"
+cp "template/TEMPLATE_PROJECT-ios.plist" "$projPath/$projName-ios.plist"
+cp "template/[email protected]" "$projPath/[email protected]"
 aliassedinplace "s*TEMPLATE_TITLE*$title*g" "$projPath/$projName-ios.plist"
 aliassedinplace "s*TEMPLATE_UUID*$uuid*g" "$projPath/$projName-ios.plist"
 aliassedinplace "s*TEMPLATE_AUTHOR*$author*g" "$projPath/$projName-ios.plist"
@@ -206,15 +206,15 @@ aliassedinplace "s*TEMPLATE_AUTHOR*$author*g" "$projPath/$projName-ios.plist"
 #############################################
 # Copy BlackBerry NDK project files
 #############################################
-cp "gameplay-template/template.cproject" "$projPath/.cproject"
+cp "template/template.cproject" "$projPath/.cproject"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/.cproject"
 aliassedinplace "s*TEMPLATE_UUID*$uuid*g" "$projPath/.cproject"
 aliassedinplace "s*GAMEPLAY_PATH*$gpPath*g" "$projPath/.cproject"
 
-cp "gameplay-template/template.project" "$projPath/.project"
+cp "template/template.project" "$projPath/.project"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/.project"
 
-cp "gameplay-template/template.bar-descriptor.xml" "$projPath/bar-descriptor.xml"
+cp "template/template.bar-descriptor.xml" "$projPath/bar-descriptor.xml"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/bar-descriptor.xml"
 aliassedinplace "s*TEMPLATE_TITLE*$title*g" "$projPath/bar-descriptor.xml"
 aliassedinplace "s*TEMPLATE_UUID*$uuid*g" "$projPath/bar-descriptor.xml"
@@ -229,28 +229,28 @@ mkdir -p "$projPath/android/jni"
 mkdir -p "$projPath/android/res/values"
 mkdir -p "$projPath/android/res/drawable"
 
-cp "gameplay-template/android/template.AndroidManifest.xml" "$projPath/android/AndroidManifest.xml"
+cp "template/android/template.AndroidManifest.xml" "$projPath/android/AndroidManifest.xml"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/android/AndroidManifest.xml"
 aliassedinplace "s*TEMPLATE_UUID*$uuid*g" "$projPath/android/AndroidManifest.xml"
 
-cp "gameplay-template/android/template.build.xml" "$projPath/android/build.xml"
+cp "template/android/template.build.xml" "$projPath/android/build.xml"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/android/build.xml"
 
-cp "gameplay-template/android/jni/Application.mk" "$projPath/android/jni/Application.mk"
-cp "gameplay-template/android/jni/template.Android.mk" "$projPath/android/jni/Android.mk"
+cp "template/android/jni/Application.mk" "$projPath/android/jni/Application.mk"
+cp "template/android/jni/template.Android.mk" "$projPath/android/jni/Android.mk"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/android/jni/Android.mk"
 aliassedinplace "s*TemplateGame*$className*g" "$projPath/android/jni/Android.mk"
 aliassedinplace "s*GAMEPLAY_PATH*$gpPath*g" "$projPath/android/jni/Android.mk"
 
-cp "gameplay-template/icon.png" "$projPath/android/res/drawable/icon.png"
-cp "gameplay-template/android/res/values/template.strings.xml" "$projPath/android/res/values/strings.xml"
+cp "template/icon.png" "$projPath/android/res/drawable/icon.png"
+cp "template/android/res/values/template.strings.xml" "$projPath/android/res/values/strings.xml"
 aliassedinplace "s*TEMPLATE_TITLE*$title*g" "$projPath/android/res/values/strings.xml"
 
 #############################################
 # Copy CMake files
 #############################################
 mkdir -p "$projPath/build"
-cp "gameplay-template/gameplay-template-CMakeLists.txt" "$projPath/CMakeLists.txt"
+cp "template/template-CMakeLists.txt" "$projPath/CMakeLists.txt"
 aliassedinplace "s*TEMPLATE_PROJECT*$projName*g" "$projPath/CMakeLists.txt"
 aliassedinplace "s*TemplateGame*$className*g" "$projPath/CMakeLists.txt"
 aliassedinplace "s*GAMEPLAY_PATH*$gpPath*g" "$projPath/CMakeLists.txt"
@@ -258,19 +258,19 @@ aliassedinplace "s*GAMEPLAY_PATH*$gpPath*g" "$projPath/CMakeLists.txt"
 #############################################
 # Copy source files
 #############################################
-cp "gameplay-template/src/TemplateGame.h" "$projPath/src/$className.h"
-cp "gameplay-template/src/TemplateGame.cpp" "$projPath/src/$className.cpp"
+cp "template/src/TemplateGame.h" "$projPath/src/$className.h"
+cp "template/src/TemplateGame.cpp" "$projPath/src/$className.cpp"
 aliassedinplace "s*TemplateGame*$className*g" "$projPath/src/$className.h"
 aliassedinplace "s*TemplateGame*$className*g" "$projPath/src/$className.cpp"
 
 # Copy resource files
-cp "gameplay-template/res/"* "$projPath/res/"
+cp "template/res/"* "$projPath/res/"
 
 # Copy icon
-cp "gameplay-template/icon.png" "$projPath/icon.png"
+cp "template/icon.png" "$projPath/icon.png"
 
 # Copy config
-cp "gameplay-template/game.config" "$projPath/game.config"
+cp "template/game.config" "$projPath/game.config"
 aliassedinplace "s*TEMPLATE_TITLE*$title*g" "$projPath/game.config"
 
 # Open the new project folder, use xdg-open on Linux

+ 51 - 0
samples/BuildHelpers.CMakeLists.txt

@@ -0,0 +1,51 @@
+# Copies files for the given game into the target res directory
+#   GAME_NAME name of the game
+#   REL_DIR to which directory these files are relative
+#   SRC_FILES which files from the REL_DIR to copy (GLOB)
+macro(COPY_RES_FILES GAME_NAME GAME_RES_TARGET REL_DIR SRC_FILES)
+    file( GLOB_RECURSE RES_FILES RELATIVE ${REL_DIR} ${SRC_FILES} )
+    
+    set(ALL_FILES)
+    foreach(SRC_FILE ${RES_FILES})
+        add_custom_command(
+            OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE}"
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different
+                "${REL_DIR}/${SRC_FILE}"
+                "${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE}"
+            COMMENT "Copy ${SRC_FILE}"
+            )
+        list(APPEND ALL_FILES "${CMAKE_CURRENT_BINARY_DIR}/${SRC_FILE}" )
+    endforeach()
+    # create target for copying these files
+    add_custom_target( ${GAME_RES_TARGET} DEPENDS ${ALL_FILES} )
+endmacro()
+
+# convenience to call above with current directory and everything in "res"
+macro(COPY_RES GAME_NAME)
+    # a target for all addition asserts (will be done in default compile, but if you target the executable
+    # it won't be done -- good for testing)
+    add_custom_target( ${GAME_NAME}_ASSETS ALL )
+    
+    # copy entire "res" directory and "game.config" if there is one
+    set(CRG_PATTERN "res/*" "game.config")
+    COPY_RES_FILES( ${GAME_NAME} ${GAME_NAME}_CORE_RES 
+        ${CMAKE_CURRENT_SOURCE_DIR} 
+        "${CRG_PATTERN}"
+        )
+    add_dependencies( ${GAME_NAME}_ASSETS ${GAME_NAME}_CORE_RES )
+endmacro()
+
+# Copies resources from an additional directory
+#   GAME_NAME name of the game
+#   REL_DIR from which directory
+#   ARGN which patterns to copy (should include res/ in name if to be placed in the res/ output)
+macro(COPY_RES_EXTRA GAME_NAME REL_DIR)
+    # convert src's to full paths (based on rel_dir)
+    set(SRC_FILES)
+    foreach(SRC_FILE ${ARGN} )
+        list(APPEND SRC_FILES "${REL_DIR}/${SRC_FILE}")
+    endforeach()
+    
+    COPY_RES_FILES( ${GAME_NAME} ${GAME_NAME}_EXTRA_RES ${REL_DIR} "${SRC_FILES}" )
+    add_dependencies( ${GAME_NAME}_ASSETS ${GAME_NAME}_EXTRA_RES )
+endmacro()

+ 58 - 0
samples/CMakeLists.txt

@@ -0,0 +1,58 @@
+include(BuildHelpers.CMakeLists.txt)
+
+include_directories( 
+    ${CMAKE_SOURCE_DIR}/gameplay/src
+    ${CMAKE_SOURCE_DIR}/external-deps/lua/include
+    ${CMAKE_SOURCE_DIR}/external-deps/bullet/include
+    ${CMAKE_SOURCE_DIR}/external-deps/libpng/include
+    ${CMAKE_SOURCE_DIR}/external-deps/oggvorbis/include
+    ${CMAKE_SOURCE_DIR}/external-deps/zlib/include
+    ${CMAKE_SOURCE_DIR}/external-deps/openal/include
+    ${CMAKE_SOURCE_DIR}/external-deps/glew/include
+)
+
+add_definitions(-D__linux__)
+
+link_directories(
+    ${CMAKE_SOURCE_DIR}/external-deps/lua/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/zlib/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/libpng/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/bullet/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/oggvorbis/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/openal/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/glew/lib/linux/${ARCH_DIR}
+)
+
+
+set(GAMEPLAY_LIBRARIES
+    gameplay
+    m
+    lua
+    png
+    z
+    vorbis
+    ogg
+    BulletDynamics
+    BulletCollision
+    LinearMath
+    openal
+    GLEW
+    GL
+    rt
+    dl
+    X11
+    pthread
+) 
+
+add_definitions(-lstdc++ -lgameplay -lm -llua -lz -lpng -lvorbis -logg -lBulletCollision -lBulletDynamics -lLinearMath -lopenal -LGLEW -lGL -lrt -ldl -lX11 -lpthread)
+
+add_subdirectory(browser)
+add_subdirectory(character)
+add_subdirectory(longboard)
+add_subdirectory(lua)
+add_subdirectory(mesh)
+add_subdirectory(particles)
+add_subdirectory(racer)
+add_subdirectory(spaceship)
+
+

+ 663 - 0
samples/browser/.cproject

@@ -0,0 +1,663 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="com.qnx.qcc.configuration.exe.debug.242437683">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.debug.242437683" moduleId="org.eclipse.cdt.core.settings" name="Device-Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.debug.242437683" name="Device-Debug" parent="com.qnx.qcc.configuration.exe.debug">
+					<folderInfo id="com.qnx.qcc.configuration.exe.debug.242437683." name="/" resourcePath="">
+						<toolChain id="com.qnx.qcc.toolChain.exe.debug.1457920850" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+							<option id="com.qnx.qcc.option.cpu.543140018" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+							<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.284407654" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+							<builder buildPath="${workspace_loc:/samples/browser/Device-Debug}" id="cdt.managedbuild.target.gnu.builder.base.505389028" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+							<tool id="com.qnx.qcc.tool.compiler.208366882" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+								<option id="com.qnx.qcc.option.compile.debug.139715017" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.security.1844270687" name="Enhanced Security (-fstack-protector-strong)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.defines.2033387229" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.includePath.1368017357" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.qccoptions.552975054" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-Wno-psabi"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.compiler.220599794" superClass="com.qnx.qcc.inputType.compiler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.assembler.553483674" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+								<option id="com.qnx.qcc.option.assembler.debug.1729293963" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.assembler.includePath.554649657" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.assembler.1501021992" superClass="com.qnx.qcc.inputType.assembler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.linker.206151014" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+								<option id="com.qnx.qcc.option.linker.debug.1106710686" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.langcpp.1026800223" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.security.971898295" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.libraryPaths.1429533021" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/armle-v7/lib"/>
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/armle-v7/usr/lib"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/${ConfigName}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/lib/blackberry/arm&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/lib/blackberry/arm&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/lib/blackberry/arm&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.libraries.1174766388" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
+									<listOptionValue builtIn="false" value="GLESv2"/>
+									<listOptionValue builtIn="false" value="EGL"/>
+									<listOptionValue builtIn="false" value="screen"/>
+									<listOptionValue builtIn="false" value="m"/>
+									<listOptionValue builtIn="false" value="png14"/>
+									<listOptionValue builtIn="false" value="pps"/>
+									<listOptionValue builtIn="false" value="bps"/>
+									<listOptionValue builtIn="false" value="OpenAL"/>
+									<listOptionValue builtIn="false" value="gestures"/>
+									<listOptionValue builtIn="false" value="asound"/>
+									<listOptionValue builtIn="false" value="gameplay"/>
+									<listOptionValue builtIn="false" value="lua"/>
+									<listOptionValue builtIn="false" value="bullet"/>
+									<listOptionValue builtIn="false" value="vorbis"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.objectFiles.782983295" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
+								<inputType id="com.qnx.qcc.inputType.linker.149610709" superClass="com.qnx.qcc.inputType.linker">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+									<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
+								</inputType>
+							</tool>
+							<tool id="com.qnx.qcc.tool.archiver.1629441407" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="com.qnx.qcc.configuration.exe.release.693953760">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.release.693953760" moduleId="org.eclipse.cdt.core.settings" name="Device-Release">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.release.693953760" name="Device-Release" parent="com.qnx.qcc.configuration.exe.release">
+					<folderInfo id="com.qnx.qcc.configuration.exe.release.693953760." name="/" resourcePath="">
+						<toolChain id="com.qnx.qcc.toolChain.exe.release.980420031" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+							<option id="com.qnx.qcc.option.cpu.1761526343" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+							<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.505505845" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+							<builder buildPath="${workspace_loc:/samples/browser/Device-Release}" id="cdt.managedbuild.target.gnu.builder.base.754548990" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+							<tool id="com.qnx.qcc.tool.compiler.1859104517" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+								<option id="com.qnx.qcc.option.compiler.optlevel.1503352761" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.2" valueType="enumerated"/>
+								<option id="com.qnx.qcc.option.compiler.security.1558473615" name="Enhanced Security (-fstack-protector-strong)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.defines.679430995" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.includePath.1438345058" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.qccoptions.552975054" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-Wno-psabi"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.compiler.145250449" superClass="com.qnx.qcc.inputType.compiler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.assembler.2006281313" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+								<option id="com.qnx.qcc.option.assembler.includePath.502102557" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.assembler.568619293" superClass="com.qnx.qcc.inputType.assembler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.linker.2142228322" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+								<option id="com.qnx.qcc.option.linker.langcpp.626501515" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.security.5968719" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.libraryPaths.1406850381" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/armle-v7/lib"/>
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/armle-v7/usr/lib"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/${ConfigName}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/lib/blackberry/arm&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/lib/blackberry/arm&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/lib/blackberry/arm&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.libraries.380839761" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
+									<listOptionValue builtIn="false" value="GLESv2"/>
+									<listOptionValue builtIn="false" value="EGL"/>
+									<listOptionValue builtIn="false" value="screen"/>
+									<listOptionValue builtIn="false" value="m"/>
+									<listOptionValue builtIn="false" value="png14"/>
+									<listOptionValue builtIn="false" value="pps"/>
+									<listOptionValue builtIn="false" value="bps"/>
+									<listOptionValue builtIn="false" value="OpenAL"/>
+									<listOptionValue builtIn="false" value="gestures"/>
+									<listOptionValue builtIn="false" value="asound"/>
+									<listOptionValue builtIn="false" value="gameplay"/>
+									<listOptionValue builtIn="false" value="lua"/>
+									<listOptionValue builtIn="false" value="bullet"/>
+									<listOptionValue builtIn="false" value="vorbis"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.objectFiles.661413139" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
+								<inputType id="com.qnx.qcc.inputType.linker.1335515313" superClass="com.qnx.qcc.inputType.linker">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+									<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
+								</inputType>
+							</tool>
+							<tool id="com.qnx.qcc.tool.archiver.277430725" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="com.qnx.qcc.configuration.exe.profile.1278883794">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.1278883794" moduleId="org.eclipse.cdt.core.settings" name="Device-Profile">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.profile,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Profiling" id="com.qnx.qcc.configuration.exe.profile.1278883794" name="Device-Profile" parent="com.qnx.qcc.configuration.exe.profile">
+					<folderInfo id="com.qnx.qcc.configuration.exe.profile.1278883794." name="/" resourcePath="">
+						<toolChain id="com.qnx.qcc.toolChain.exe.profile.1845991974" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+							<option id="com.qnx.qcc.option.cpu.841582420" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+							<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.291641862" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+							<builder buildPath="${workspace_loc:/samples/browser/Device-Profile}" id="cdt.managedbuild.target.gnu.builder.base.213445888" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+							<tool id="com.qnx.qcc.tool.compiler.614386334" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+								<option id="com.qnx.qcc.option.compile.debug.2016842657" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.profile2.654771532" name="Build for Profiling (Function Instrumentation) (-finstrument-functions)" superClass="com.qnx.qcc.option.compiler.profile2" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.security.1750208647" name="Enhanced Security (-fstack-protector-strong)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.defines.426444242" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.includePath.2039847498" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.qccoptions.552975054" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-Wno-psabi"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.compiler.1151876862" superClass="com.qnx.qcc.inputType.compiler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.assembler.502016742" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+								<option id="com.qnx.qcc.option.assembler.debug.1770496608" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.assembler.includePath.2105725346" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.assembler.892399553" superClass="com.qnx.qcc.inputType.assembler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.linker.870506839" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+								<option id="com.qnx.qcc.option.linker.debug.159182844" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.profile2.2063219966" name="Build for Profiling (Function Instrumentation) (-lprofiling)" superClass="com.qnx.qcc.option.linker.profile2" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.langcpp.1041029842" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.libraryPaths.855849190" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/armle-v7/lib"/>
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/armle-v7/usr/lib"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/${ConfigName}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/lib/blackberry/arm&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/lib/blackberry/arm&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/lib/blackberry/arm&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.libraries.248496823" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
+									<listOptionValue builtIn="false" value="GLESv2"/>
+									<listOptionValue builtIn="false" value="EGL"/>
+									<listOptionValue builtIn="false" value="screen"/>
+									<listOptionValue builtIn="false" value="m"/>
+									<listOptionValue builtIn="false" value="png14"/>
+									<listOptionValue builtIn="false" value="pps"/>
+									<listOptionValue builtIn="false" value="bps"/>
+									<listOptionValue builtIn="false" value="OpenAL"/>
+									<listOptionValue builtIn="false" value="gestures"/>
+									<listOptionValue builtIn="false" value="asound"/>
+									<listOptionValue builtIn="false" value="gameplay"/>
+									<listOptionValue builtIn="false" value="lua"/>
+									<listOptionValue builtIn="false" value="bullet"/>
+									<listOptionValue builtIn="false" value="vorbis"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.objectFiles.1790354579" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
+								<inputType id="com.qnx.qcc.inputType.linker.321831739" superClass="com.qnx.qcc.inputType.linker">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+									<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
+								</inputType>
+							</tool>
+							<tool id="com.qnx.qcc.tool.archiver.1255321054" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="com.qnx.qcc.configuration.exe.profile.coverage.357266346">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.coverage.357266346" moduleId="org.eclipse.cdt.core.settings" name="Device-Coverage">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.coverage,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Code Coverage" id="com.qnx.qcc.configuration.exe.profile.coverage.357266346" name="Device-Coverage" parent="com.qnx.qcc.configuration.exe.profile.coverage" prebuildStep="">
+					<folderInfo id="com.qnx.qcc.configuration.exe.profile.coverage.357266346." name="/" resourcePath="">
+						<toolChain id="com.qnx.qcc.toolChain.exe.coverage.1058841174" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+							<option id="com.qnx.qcc.option.cpu.1763443935" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
+							<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1557345848" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+							<builder buildPath="${workspace_loc:/samples/browser/Device-Coverage}" id="cdt.managedbuild.target.gnu.builder.base.990549776" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+							<tool id="com.qnx.qcc.tool.compiler.2123563242" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+								<option id="com.qnx.qcc.option.compile.debug.1458020405" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.coverage.2144528412" name="Build for Code Coverage (-Wc,-ftest-coverage -Wc,-fprofile-arcs)" superClass="com.qnx.qcc.option.compiler.coverage" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.security.1880137880" name="Enhanced Security (-fstack-protector-strong)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.defines.418753612" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.includePath.197126708" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.qccoptions.552975054" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-Wno-psabi"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.compiler.383272251" superClass="com.qnx.qcc.inputType.compiler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.assembler.1630912693" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+								<option id="com.qnx.qcc.option.assembler.debug.1688927362" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.assembler.includePath.1590514238" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.assembler.2106145451" superClass="com.qnx.qcc.inputType.assembler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.linker.511201149" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+								<option id="com.qnx.qcc.option.linker.debug.1991187080" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.coverage.1187156961" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.langcpp.2094559243" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.security.206602965" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.libraryPaths.1026501146" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/armle-v7/lib"/>
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/armle-v7/usr/lib"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/${ConfigName}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/lib/blackberry/arm&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/lib/blackberry/arm&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/lib/blackberry/arm&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.libraries.955918617" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
+									<listOptionValue builtIn="false" value="GLESv2"/>
+									<listOptionValue builtIn="false" value="EGL"/>
+									<listOptionValue builtIn="false" value="screen"/>
+									<listOptionValue builtIn="false" value="m"/>
+									<listOptionValue builtIn="false" value="png14"/>
+									<listOptionValue builtIn="false" value="pps"/>
+									<listOptionValue builtIn="false" value="bps"/>
+									<listOptionValue builtIn="false" value="OpenAL"/>
+									<listOptionValue builtIn="false" value="gestures"/>
+									<listOptionValue builtIn="false" value="asound"/>
+									<listOptionValue builtIn="false" value="gameplay"/>
+									<listOptionValue builtIn="false" value="lua"/>
+									<listOptionValue builtIn="false" value="bullet"/>
+									<listOptionValue builtIn="false" value="vorbis"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.objectFiles.1090831811" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
+								<inputType id="com.qnx.qcc.inputType.linker.1922788653" superClass="com.qnx.qcc.inputType.linker">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+									<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
+								</inputType>
+							</tool>
+							<tool id="com.qnx.qcc.tool.archiver.658460952" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="com.qnx.qcc.configuration.exe.debug.882133523">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.debug.882133523" moduleId="org.eclipse.cdt.core.settings" name="Simulator">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.debug.882133523" name="Simulator" parent="com.qnx.qcc.configuration.exe.debug">
+					<folderInfo id="com.qnx.qcc.configuration.exe.debug.882133523." name="/" resourcePath="">
+						<toolChain id="com.qnx.qcc.toolChain.exe.debug.263886238" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+							<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.826917653" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+							<builder buildPath="${workspace_loc:/samples/browser/Simulator}" id="cdt.managedbuild.target.gnu.builder.base.1025219170" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+							<tool id="com.qnx.qcc.tool.compiler.1408625066" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+								<option id="com.qnx.qcc.option.compile.debug.1248630188" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.security.2051337094" name="Enhanced Security (-fstack-protector-strong)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.defines.1669819974" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.includePath.456477750" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.qccoptions.552975054" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-Wno-psabi"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.compiler.2030100054" superClass="com.qnx.qcc.inputType.compiler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.assembler.1374999439" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+								<option id="com.qnx.qcc.option.assembler.debug.1499237946" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.assembler.includePath.1839603063" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.assembler.2093972194" superClass="com.qnx.qcc.inputType.assembler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.linker.280868975" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+								<option id="com.qnx.qcc.option.linker.debug.253431522" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.langcpp.297105836" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.security.926891584" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.libraryPaths.1127080358" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/x86/lib"/>
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/x86/usr/lib"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/${ConfigName}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/lib/blackberry/x86&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/lib/blackberry/x86&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/lib/blackberry/x86&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.libraries.298922406" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
+									<listOptionValue builtIn="false" value="GLESv2"/>
+									<listOptionValue builtIn="false" value="EGL"/>
+									<listOptionValue builtIn="false" value="screen"/>
+									<listOptionValue builtIn="false" value="m"/>
+									<listOptionValue builtIn="false" value="png14"/>
+									<listOptionValue builtIn="false" value="pps"/>
+									<listOptionValue builtIn="false" value="bps"/>
+									<listOptionValue builtIn="false" value="OpenAL"/>
+									<listOptionValue builtIn="false" value="gestures"/>
+									<listOptionValue builtIn="false" value="asound"/>
+									<listOptionValue builtIn="false" value="gameplay"/>
+									<listOptionValue builtIn="false" value="lua"/>
+									<listOptionValue builtIn="false" value="bullet"/>
+									<listOptionValue builtIn="false" value="vorbis"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.objectFiles.901324184" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
+								<inputType id="com.qnx.qcc.inputType.linker.1669353763" superClass="com.qnx.qcc.inputType.linker">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+									<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
+								</inputType>
+							</tool>
+							<tool id="com.qnx.qcc.tool.archiver.152598842" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="com.qnx.qcc.configuration.exe.profile.400335078">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.400335078" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Profile">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.profile,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Profiling" id="com.qnx.qcc.configuration.exe.profile.400335078" name="Simulator-Profile" parent="com.qnx.qcc.configuration.exe.profile">
+					<folderInfo id="com.qnx.qcc.configuration.exe.profile.400335078." name="/" resourcePath="">
+						<toolChain id="com.qnx.qcc.toolChain.exe.profile.339344565" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+							<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.900231101" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+							<builder buildPath="${workspace_loc:/samples/browser/Simulator-Profile}" id="cdt.managedbuild.target.gnu.builder.base.134792332" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+							<tool id="com.qnx.qcc.tool.compiler.1403486104" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+								<option id="com.qnx.qcc.option.compile.debug.505574977" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.profile2.486301444" name="Build for Profiling (Function Instrumentation) (-finstrument-functions)" superClass="com.qnx.qcc.option.compiler.profile2" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.security.1360526671" name="Enhanced Security (-fstack-protector-strong)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.defines.740035068" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.includePath.923690234" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.qccoptions.552975054" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-Wno-psabi"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.compiler.1329574373" superClass="com.qnx.qcc.inputType.compiler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.assembler.1843174104" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+								<option id="com.qnx.qcc.option.assembler.debug.28838627" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.assembler.includePath.1935823127" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.assembler.429310796" superClass="com.qnx.qcc.inputType.assembler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.linker.412411076" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+								<option id="com.qnx.qcc.option.linker.debug.1336651609" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.profile2.1986678601" name="Build for Profiling (Function Instrumentation) (-lprofiling)" superClass="com.qnx.qcc.option.linker.profile2" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.langcpp.634706544" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.security.1149202874" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.libraryPaths.836471121" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/x86/lib"/>
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/x86/usr/lib"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/${ConfigName}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/lib/blackberry/x86&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/lib/blackberry/x86&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/lib/blackberry/x86&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.libraries.1203875316" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
+									<listOptionValue builtIn="false" value="GLESv2"/>
+									<listOptionValue builtIn="false" value="EGL"/>
+									<listOptionValue builtIn="false" value="screen"/>
+									<listOptionValue builtIn="false" value="m"/>
+									<listOptionValue builtIn="false" value="png14"/>
+									<listOptionValue builtIn="false" value="pps"/>
+									<listOptionValue builtIn="false" value="bps"/>
+									<listOptionValue builtIn="false" value="OpenAL"/>
+									<listOptionValue builtIn="false" value="gestures"/>
+									<listOptionValue builtIn="false" value="asound"/>
+									<listOptionValue builtIn="false" value="gameplay"/>
+									<listOptionValue builtIn="false" value="lua"/>
+									<listOptionValue builtIn="false" value="bullet"/>
+									<listOptionValue builtIn="false" value="vorbis"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.objectFiles.182659400" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
+								<inputType id="com.qnx.qcc.inputType.linker.387004436" superClass="com.qnx.qcc.inputType.linker">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+									<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
+								</inputType>
+							</tool>
+							<tool id="com.qnx.qcc.tool.archiver.1976882839" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="com.qnx.qcc.configuration.exe.profile.coverage.48235134">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.coverage.48235134" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Coverage">
+				<externalSettings/>
+				<extensions>
+					<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.coverage,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Code Coverage" id="com.qnx.qcc.configuration.exe.profile.coverage.48235134" name="Simulator-Coverage" parent="com.qnx.qcc.configuration.exe.profile.coverage">
+					<folderInfo id="com.qnx.qcc.configuration.exe.profile.coverage.48235134." name="/" resourcePath="">
+						<toolChain id="com.qnx.qcc.toolChain.exe.coverage.1175317875" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
+							<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.1428636360" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
+							<builder buildPath="${workspace_loc:/samples/browser/Simulator-Coverage}" id="cdt.managedbuild.target.gnu.builder.base.781926995" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+							<tool id="com.qnx.qcc.tool.compiler.1261670176" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
+								<option id="com.qnx.qcc.option.compile.debug.62201864" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.coverage.1226618626" name="Build for Code Coverage (-Wc,-ftest-coverage -Wc,-fprofile-arcs)" superClass="com.qnx.qcc.option.compiler.coverage" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.security.1008693238" name="Enhanced Security (-fstack-protector-strong)" superClass="com.qnx.qcc.option.compiler.security" value="false" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.compiler.defines.2042809726" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
+									<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.includePath.1486948386" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/include&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.compiler.qccoptions.552975054" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions" valueType="stringList">
+									<listOptionValue builtIn="false" value="-Wno-psabi"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.compiler.1418704610" superClass="com.qnx.qcc.inputType.compiler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.assembler.785476179" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
+								<option id="com.qnx.qcc.option.assembler.debug.1374788951" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.assembler.includePath.1019783363" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/src&quot;"/>
+								</option>
+								<inputType id="com.qnx.qcc.inputType.assembler.1637789752" superClass="com.qnx.qcc.inputType.assembler"/>
+							</tool>
+							<tool id="com.qnx.qcc.tool.linker.1825130130" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
+								<option id="com.qnx.qcc.option.linker.debug.773346051" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.coverage.1662322557" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.langcpp.1437332425" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.security.1625644976" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
+								<option id="com.qnx.qcc.option.linker.libraryPaths.1870486762" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/x86/lib"/>
+									<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/x86/usr/lib"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../gameplay/${ConfigName}&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/lua/lib/blackberry/x86&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/bullet/lib/blackberry/x86&quot;"/>
+									<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}}/../../external-deps/oggvorbis/lib/blackberry/x86&quot;"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.libraries.2055007034" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
+									<listOptionValue builtIn="false" value="GLESv2"/>
+									<listOptionValue builtIn="false" value="EGL"/>
+									<listOptionValue builtIn="false" value="screen"/>
+									<listOptionValue builtIn="false" value="m"/>
+									<listOptionValue builtIn="false" value="png14"/>
+									<listOptionValue builtIn="false" value="pps"/>
+									<listOptionValue builtIn="false" value="bps"/>
+									<listOptionValue builtIn="false" value="OpenAL"/>
+									<listOptionValue builtIn="false" value="gestures"/>
+									<listOptionValue builtIn="false" value="asound"/>
+									<listOptionValue builtIn="false" value="gameplay"/>
+									<listOptionValue builtIn="false" value="lua"/>
+									<listOptionValue builtIn="false" value="bullet"/>
+									<listOptionValue builtIn="false" value="vorbis"/>
+								</option>
+								<option id="com.qnx.qcc.option.linker.objectFiles.1305021275" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
+								<inputType id="com.qnx.qcc.inputType.linker.47190931" superClass="com.qnx.qcc.inputType.linker">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+									<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
+								</inputType>
+							</tool>
+							<tool id="com.qnx.qcc.tool.archiver.216978419" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
+						</toolChain>
+					</folderInfo>
+					<sourceEntries>
+						<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+					</sourceEntries>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="org.gameplay3d.sample_browser" name="sample-browser"/>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+		<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.release.693953760">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.400335078">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.coverage.48235134">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.debug.242437683">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.debug.882133523">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.1278883794">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.coverage.357266346">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
+		</scannerConfigBuildInfo>
+	</storageModule>
+	<storageModule moduleId="refreshScope" versionNumber="1">
+		<resource resourceType="PROJECT" workspacePath="/sample-browser"/>
+	</storageModule>
+	<storageModule moduleId="com.qnx.tools.ide.qde.core.QNXProjectProperties"/>
+</cproject>

+ 90 - 0
samples/browser/.project

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>sample-browser</name>
+	<comment></comment>
+	<projects>
+		<project>gameplay</project>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>?name?</key>
+					<value></value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.append_environment</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildArguments</key>
+					<value></value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildCommand</key>
+					<value>make</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildLocation</key>
+					<value>${workspace_loc:/samples/browser/Device-Debug}</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+					<value>clean</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.contents</key>
+					<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+					<value>all</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.stopOnError</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+					<value>true</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+		<nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+	</natures>
+</projectDescription>

+ 117 - 0
samples/browser/CMakeLists.txt

@@ -0,0 +1,117 @@
+
+include_directories( 
+    ${CMAKE_SOURCE_DIR}/gameplay/src
+    ${CMAKE_SOURCE_DIR}/external-deps/lua/include
+    ${CMAKE_SOURCE_DIR}/external-deps/bullet/include
+    ${CMAKE_SOURCE_DIR}/external-deps/libpng/include
+    ${CMAKE_SOURCE_DIR}/external-deps/oggvorbis/include
+    ${CMAKE_SOURCE_DIR}/external-deps/zlib/include
+    ${CMAKE_SOURCE_DIR}/external-deps/openal/include
+    ${CMAKE_SOURCE_DIR}/external-deps/glew/include
+)
+
+add_definitions(-D__linux__)
+
+link_directories(
+    ${CMAKE_SOURCE_DIR}/external-deps/lua/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/zlib/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/libpng/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/bullet/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/oggvorbis/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/openal/lib/linux/${ARCH_DIR}
+    ${CMAKE_SOURCE_DIR}/external-deps/glew/lib/linux/${ARCH_DIR}
+)
+
+
+set(GAMEPLAY_LIBRARIES
+    gameplay
+    m
+    lua
+    png
+    z
+    vorbis
+    ogg
+    BulletDynamics
+    BulletCollision
+    LinearMath
+    openal
+    GLEW
+    GL
+    rt
+    dl
+    X11
+    pthread
+) 
+
+add_definitions(-lstdc++ -lgameplay -lm -llua -lz -lpng -lvorbis -logg -lBulletCollision -lBulletDynamics -lLinearMath -lopenal -LGLEW -lGL -lrt -ldl -lX11 -lpthread)
+
+set( GAME_NAME sample-browser)
+
+set(GAME_SRC
+    src/Audio3DSample.cpp
+    src/Audio3DSample.h
+    src/BillboardSample.cpp
+    src/BillboardSample.h
+    src/CreateSceneSample.cpp
+    src/CreateSceneSample.h	
+    src/CreateSceneSample.h
+    src/FirstPersonCamera.cpp
+    src/FirstPersonCamera.h
+    src/FormsSample.cpp
+    src/FormsSample.h
+    src/GamepadSample.cpp
+    src/GamepadSample.h
+    src/GestureSample.cpp
+    src/GestureSample.h
+    src/Grid.cpp
+    src/Grid.h
+    src/InputSample.cpp
+    src/InputSample.h
+    src/LightSample.cpp
+    src/LightSample.h
+    src/LoadSceneSample.cpp
+    src/LoadSceneSample.h
+    src/MeshBatchSample.cpp
+    src/MeshBatchSample.h
+    src/MeshPrimitiveSample.cpp
+    src/MeshPrimitiveSample.h
+    src/PhysicsCollisionObjectSample.cpp
+    src/PhysicsCollisionObjectSample.h
+    src/PostProcessSample.cpp
+    src/PostProcessSample.h
+    src/SpriteBatchSample.cpp
+    src/SpriteBatchSample.h
+    src/TerrainSample.cpp
+    src/TerrainSample.h
+    src/Sample.cpp
+    src/Sample.h
+    src/SamplesGame.cpp
+    src/SamplesGame.h
+    src/TextSample.cpp
+    src/TextSample.h
+    src/TextureSample.cpp
+    src/TextureSample.h
+    src/TriangleSample.cpp
+    src/TriangleSample.h
+)
+
+add_executable(${GAME_NAME}
+    ${GAME_SRC}
+)
+
+target_link_libraries(${GAME_NAME} ${GAMEPLAY_LIBRARIES})
+
+set_target_properties(${GAME_NAME} PROPERTIES
+    OUTPUT_NAME "${GAME_NAME}"
+    CLEAN_DIRECT_OUTPUT 1
+)
+
+source_group(res FILES ${GAME_RES} ${GAMEPLAY_RES} ${GAME_RES_SHADERS} ${GAME_RES_SHADERS_LIB})
+source_group(src FILES ${GAME_SRC})
+
+COPY_RES( ${GAME_NAME} )
+COPY_RES_EXTRA( ${GAME_NAME} ${CMAKE_SOURCE_DIR}/gameplay
+    res/logo_powered_white.png 
+    res/shaders/*
+    )
+

+ 0 - 0
gameplay-template/[email protected] → samples/browser/[email protected]


+ 31 - 0
samples/browser/android/AndroidManifest.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="org.gameplay3d.sample_browser"
+        android:versionCode="1"
+        android:versionName="1.0">
+
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+        
+    <!-- This is the platform API where the app was introduced. -->
+    <uses-sdk android:minSdkVersion="9" />
+	<uses-feature android:glEsVersion="0x00020000"/>
+
+    <application android:icon="@drawable/icon" android:label="@string/app_name" android:hasCode="true">
+
+        <!-- Our activity is the built-in NativeActivity framework class.
+             This will take care of integrating with our NDK code. -->
+        <activity android:name="android.app.NativeActivity"
+                android:label="@string/app_name"
+                android:configChanges="orientation|keyboardHidden"
+				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+				android:screenOrientation="landscape">
+            <!-- Tell NativeActivity the name of or .so -->
+            <meta-data android:name="android.app.lib_name" android:value="sample-browser" />
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest> 

+ 95 - 0
samples/browser/android/build.xml

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="sample-browser" default="help">
+
+    <!-- The local.properties file is created and updated by the 'android' tool.
+         It contains the path to the SDK. It should *NOT* be checked into
+         Version Control Systems. -->
+    <property file="local.properties" />
+
+    <!-- The ant.properties file can be created by you. It is only edited by the
+         'android' tool to add properties to it.
+         This is the place to change some Ant specific build properties.
+         Here are some properties you may want to change/update:
+
+         source.dir
+             The name of the source directory. Default is 'src'.
+         out.dir
+             The name of the output directory. Default is 'bin'.
+
+         For other overridable properties, look at the beginning of the rules
+         files in the SDK, at tools/ant/build.xml
+
+         Properties related to the SDK location or the project target should
+         be updated using the 'android' tool with the 'update' action.
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems.
+
+         -->
+    <property file="ant.properties" />
+
+    <!-- The project.properties file is created and updated by the 'android'
+         tool, as well as ADT.
+
+         This contains project specific properties such as project target, and library
+         dependencies. Lower level build properties are stored in ant.properties
+         (or in .classpath for Eclipse projects).
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems. -->
+    <loadproperties srcFile="project.properties" />
+
+    <!-- quick check on sdk.dir -->
+    <fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var" unless="sdk.dir" />
+
+
+<!-- extension targets. Uncomment the ones where you want to do custom work
+     in between standard targets -->
+
+    <target name="-pre-build">
+		<mkdir dir="src"/>
+    </target>
+	
+<!--
+    <target name="-pre-compile">
+    </target>
+
+    /* This is typically used for code obfuscation.
+       Compiled code location: ${out.classes.absolute.dir}
+       If this is not done in place, override ${out.dex.input.absolute.dir} */
+       -->
+    <target name="-post-compile">
+	    <copy file="../game.config" tofile="assets/game.config"/>
+        <copy todir="assets/res/common">
+            <fileset dir="../res/common"/>
+        </copy>
+		<copy todir="assets/res/png">
+            <fileset dir="../res/png"/>
+        </copy>
+		<copy todir="assets/res/shaders">
+            <fileset dir="../../../gameplay/res/shaders"/>
+        </copy>
+    </target>
+
+    <!-- Import the actual build file.
+
+         To customize existing targets, there are two options:
+         - Customize only one target:
+             - copy/paste the target into this file, *before* the
+               <import> task.
+             - customize it to your needs.
+         - Customize the whole content of build.xml
+             - copy/paste the content of the rules files (minus the top node)
+               into this file, replacing the <import> task.
+             - customize to your needs.
+
+         ***********************
+         ****** IMPORTANT ******
+         ***********************
+         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+         in order to avoid having your file be overridden by tools such as "android update project"
+    -->
+    <!-- version-tag: 1 -->
+    <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>

+ 94 - 0
samples/browser/android/jni/Android.mk

@@ -0,0 +1,94 @@
+SAMPLE_PATH := $(call my-dir)/../../src
+
+# external-deps
+LIBPNG_PATH := $(call my-dir)/../../../../external-deps/libpng/lib/android/arm
+ZLIB_PATH := $(call my-dir)/../../../../external-deps/zlib/lib/android/arm
+LUA_PATH := $(call my-dir)/../../../../external-deps/lua/lib/android/arm
+BULLET_PATH := $(call my-dir)/../../../../external-deps/bullet/lib/android/arm
+VORBIS_PATH := $(call my-dir)/../../../../external-deps/oggvorbis/lib/android/arm
+OPENAL_PATH := $(call my-dir)/../../../../external-deps/openal/lib/android/arm
+
+# gameplay
+LOCAL_PATH := $(call my-dir)/../../../../gameplay/android/obj/local/armeabi
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libgameplay
+LOCAL_SRC_FILES := libgameplay.a
+include $(PREBUILT_STATIC_LIBRARY)
+
+# libpng
+LOCAL_PATH := $(LIBPNG_PATH)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libpng 
+LOCAL_SRC_FILES := libpng.a
+include $(PREBUILT_STATIC_LIBRARY)
+
+# libzlib
+LOCAL_PATH := $(ZLIB_PATH)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libzlib
+LOCAL_SRC_FILES := libzlib.a
+include $(PREBUILT_STATIC_LIBRARY)
+
+# liblua
+LOCAL_PATH := $(LUA_PATH)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := liblua
+LOCAL_SRC_FILES := liblua.a
+include $(PREBUILT_STATIC_LIBRARY)
+
+# libbullet
+LOCAL_PATH := $(BULLET_PATH)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libbullet
+LOCAL_SRC_FILES := libbullet.a
+include $(PREBUILT_STATIC_LIBRARY)
+
+# libvorbis
+LOCAL_PATH := $(VORBIS_PATH)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libvorbis
+LOCAL_SRC_FILES := libvorbis.a
+include $(PREBUILT_STATIC_LIBRARY)
+
+# libOpenAL
+LOCAL_PATH := $(OPENAL_PATH)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libOpenAL
+LOCAL_SRC_FILES := libOpenAL.a
+include $(PREBUILT_STATIC_LIBRARY)
+
+# sample-browser
+LOCAL_PATH := $(SAMPLE_PATH)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE    := sample-browser
+LOCAL_SRC_FILES := ../../../gameplay/src/gameplay-main-android.cpp \
+    FirstPersonCamera.cpp \
+    Grid.cpp \
+    Sample.cpp \
+    SamplesGame.cpp \
+    Audio3DSample.cpp \
+    BillboardSample.cpp \
+    CreateSceneSample.cpp \
+    FormsSample.cpp \
+    GestureSample.cpp \
+    GamepadSample.cpp \
+    InputSample.cpp \
+    LightSample.cpp \
+    LoadSceneSample.cpp \
+	MeshBatchSample.cpp \
+    MeshPrimitiveSample.cpp \
+	PhysicsCollisionObjectSample.cpp \
+    PostProcessSample.cpp \
+	SpriteBatchSample.cpp \
+	TerrainSample.cpp \
+    TextSample.cpp \
+    TextureSample.cpp \
+	TriangleSample.cpp
+
+LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
+LOCAL_CFLAGS    := -D__ANDROID__ -Wno-psabi -I"../../../external-deps/lua/include" -I"../../../external-deps/bullet/include" -I"../../../external-deps/libpng/include" -I"../../../external-deps/oggvorbis/include" -I"../../../external-deps/openal/include" -I"../../../gameplay/src"
+LOCAL_STATIC_LIBRARIES := android_native_app_glue libgameplay libpng libzlib liblua libbullet libvorbis libOpenAL
+
+include $(BUILD_SHARED_LIBRARY)
+$(call import-module,android/native_app_glue)

+ 0 - 0
gameplay-template/android/jni/Application.mk → samples/browser/android/jni/Application.mk


BIN
samples/browser/android/res/drawable/icon.png


+ 4 - 0
samples/browser/android/res/values/strings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">Samples</string>
+</resources>

+ 106 - 0
samples/browser/bar-descriptor.xml

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
+
+<!-- BlackBerry OS application descriptor file.
+
+    Specifies parameters for identifying, installing, and launching native applications on BlackBerry OS.
+
+-->
+
+    <!-- A universally unique application identifier. Must be unique across all BlackBerry OS applications.
+         Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
+    <id>org.gameplay3d.sample_browser</id>
+
+    <!-- The name that is displayed in the BlackBerry OS application installer. 
+         May have multiple values for each language. See samples or xsd schema file. Optional. -->
+    <name>Samples</name>
+
+    <!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade. 
+         Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
+         An updated version of application must have a versionNumber value higher than the previous version. Required. -->
+    <versionNumber>1.7.0</versionNumber>
+
+    <!-- Fourth digit segment of the package version. First three segments are taken from the 
+         <versionNumber> element.  Must be an integer from 0 to 2^16-1 -->
+    <buildId>1</buildId>
+
+    <!-- Description, displayed in the BlackBerry OS application installer.
+         May have multiple values for each language. See samples or xsd schema file. Optional. -->
+    <description>Samples</description>
+
+    <!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
+    <author>RIM Canada</author>
+
+    <!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
+    <!-- <authorId>gYAAgPkLP1tZlyYP1wiMaRFFNMw</authorId> -->
+
+    <initialWindow>
+        <aspectRatio>landscape</aspectRatio>
+        <autoOrients>false</autoOrients>
+        <systemChrome>none</systemChrome>
+        <transparent>false</transparent>
+    </initialWindow>
+
+    <category>core.games</category>
+
+    <asset path="icon.png">icon.png</asset>
+	<asset path="game.config">game.config</asset>
+    <asset path="../../gameplay/res/shaders">res/shaders</asset>
+	<asset path="res/common">res/common</asset>
+	<asset path="res/png">res/png</asset>
+
+    <configuration id="com.qnx.qcc.configuration.exe.debug.242437683" name="Device-Debug">
+       <platformArchitecture>armle-v7</platformArchitecture>
+       <asset path="Device-Debug/sample-browser" entry="true" type="Qnx/Elf">sample-browser</asset>
+    </configuration>
+    <configuration id="com.qnx.qcc.configuration.exe.release.693953760" name="Device-Release">
+       <platformArchitecture>armle-v7</platformArchitecture>
+       <asset path="Device-Release/sample-browser" entry="true" type="Qnx/Elf">sample-browser</asset>
+    </configuration>
+    <configuration id="com.qnx.qcc.configuration.exe.profile.1278883794" name="Device-Profile">
+       <platformArchitecture>armle-v7</platformArchitecture>
+       <asset path="Device-Profile/sample-browser" entry="true" type="Qnx/Elf">sample-browser</asset>
+    </configuration>
+    <configuration id="com.qnx.qcc.configuration.exe.profile.coverage.357266346" name="Device-Coverage">
+       <platformArchitecture>armle-v7</platformArchitecture>
+       <asset path="Device-Coverage/sample-browser" entry="true" type="Qnx/Elf">sample-browser</asset>
+    </configuration>
+    <configuration id="com.qnx.qcc.configuration.exe.debug.882133523" name="Simulator">
+        <platformArchitecture>x86</platformArchitecture>
+       <asset path="Simulator/sample-browser" entry="true" type="Qnx/Elf">sample-browser</asset>
+    </configuration>
+    <configuration id="com.qnx.qcc.configuration.exe.profile.400335078" name="Simulator-Profile">
+       <platformArchitecture>x86</platformArchitecture> 
+       <asset path="Simulator-Profile/sample-browser" entry="true" type="Qnx/Elf">sample-browser</asset>
+    </configuration>
+    <configuration id="com.qnx.qcc.configuration.exe.profile.coverage.48235134" name="Simulator-Coverage">
+       <platformArchitecture>x86</platformArchitecture>
+       <asset path="Simulator-Coverage/sample-browser" entry="true" type="Qnx/Elf">sample-browser</asset>
+    </configuration>
+
+    <!-- The icon for the application, which should be 114x114. -->
+    <icon>
+        <image>icon.png</image>
+    </icon>
+
+    <!-- The splash screen that will appear when your application is launching, which should be 1280x768 -->
+    <!-- <splashscreen></splashscreen> -->
+
+    <!-- Request permission to execute native code.  Required for native applications. -->
+    <action system="true">run_native</action>
+
+    <!-- The permissions requested by your application. -->
+    <!--  <action>access_shared</action> -->
+    <!--  <action>record_audio</action> -->
+    <!--  <action>read_geolocation</action> -->
+    <!--  <action>use_camera</action> -->
+    <!--  <action>access_internet</action> -->
+    <!--  <action>play_audio</action> -->
+    <!--  <action>post_notification</action> -->
+    <!--  <action>set_audio_volume</action> -->
+    <!--  <action>read_device_identifying_information</action> -->
+
+    <!-- Ensure that shared libraries in the package are found at run-time. -->
+    <env var="LD_LIBRARY_PATH" value="app/native/lib"/>
+
+</qnx>

+ 17 - 0
samples/browser/game.config

@@ -0,0 +1,17 @@
+window
+{
+    title = Samples
+    width = 1280
+    height = 720
+    fullscreen = false
+}
+
+aliases
+{
+    gamepad = res/png/gamepad.png 
+}
+
+gamepad
+{
+    form = res/common/gamepad.form
+}

+ 0 - 0
gameplay-template/icon.png → samples/browser/icon.png


BIN
samples/browser/res/common/arial14.gpb


BIN
samples/browser/res/common/arial18.gpb


BIN
samples/browser/res/common/baroque.gpb


BIN
samples/browser/res/common/box.gpb


+ 39 - 0
samples/browser/res/common/box.material

@@ -0,0 +1,39 @@
+material box
+{
+    technique
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured.vert
+            fragmentShader = res/shaders/textured.frag
+            defines = SPECULAR
+            
+            // uniforms
+            u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+            u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+            u_cameraPosition = CAMERA_WORLD_POSITION
+            u_ambientColor = 0.2, 0.2, 0.2
+            u_lightColor = 0.75, 0.75, 0.75
+            u_specularExponent = 50
+            
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/box-diffuse.png
+                mipmap = true
+                wrapS = CLAMP
+                wrapT = CLAMP
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+}

+ 225 - 0
samples/browser/res/common/camera.lua

@@ -0,0 +1,225 @@
+
+-- Move speed (m/s)
+MOVE_SPEED_NORMAL = 1
+MOVE_SPEED_FAST = 5
+
+-- Move flags
+MOVE_FORWARD = 1
+MOVE_BACKWARD = 2
+MOVE_RIGHT = 3
+MOVE_LEFT = 4
+
+_useScriptCamera = false
+_forwardSpeed = 0
+_sideSpeed = 0
+_touch = Vector2.new()
+_delta = Vector2.new()
+_move = Vector2.new()
+_moveFlags = { false, false, false, false }
+_yaw = 0
+_pitch = 0
+_moveFast = false
+
+function camera_setActive(flag)
+    _useScriptCamera = flag
+
+    if _useScriptCamera then
+        Game.getInstance():setMultiTouch(true)
+        
+        _scene = Scene.getScene()
+
+        _cameraNode = _scene:getActiveCamera():getNode()
+
+        -- Set initial camera angles
+        local eulers = camera_quatToEuler(_cameraNode:getRotation())
+        _yaw = eulers:y()
+        _pitch = eulers:x()
+    else
+		-- Release scene and camera
+		_scene = nil
+		_cameraNode = nil
+	end
+end
+
+function camera_setSpeed(normal, fast)
+    MOVE_SPEED_NORMAL = normal
+    MOVE_SPEED_FAST = fast
+end
+
+function camera_update(elapsedTime)
+	
+    if not _useScriptCamera then
+        return
+    end
+
+    if USE_PHYSICS_CHARACTER then
+
+        local char = _scene:findNode("camera"):getCollisionObject():asCharacter()
+        local speed = MOVE_SPEED_NORMAL
+        if _moveFast then
+            speed = MOVE_SPEED_FAST
+        end
+
+        -- Forward motion
+        if _moveFlags[MOVE_FORWARD] then
+            char:setForwardVelocity(speed)
+        elseif _moveFlags[MOVE_BACKWARD] then
+            char:setForwardVelocity(-speed)
+        else
+            char:setForwardVelocity(0)
+        end
+
+        -- Strafing
+        if _moveFlags[MOVE_LEFT] then
+            char:setRightVelocity(-speed)
+        elseif _moveFlags[MOVE_RIGHT] then
+            char:setRightVelocity(speed)
+        else
+            char:setRightVelocity(0)
+        end
+
+    else
+
+        -- Manual camera movement
+        local secs = elapsedTime / 1000.0
+
+        _move:set(0,0)
+
+        -- Forward motion
+        if _moveFlags[MOVE_FORWARD] then
+            _move:y(1)
+        elseif _moveFlags[MOVE_BACKWARD] then
+            _move:y(-1)
+        end
+
+        -- Strafing
+        if _moveFlags[MOVE_LEFT] then
+            _move:x(-1)
+        elseif _moveFlags[MOVE_RIGHT] then
+            _move:x(1)
+        end
+
+        if not _move:isZero() then
+            local speed = MOVE_SPEED_NORMAL
+            if _moveFast then
+                speed = MOVE_SPEED_FAST
+            end
+
+            _move:normalize():scale(secs * speed)
+
+            camera_moveForward(_move:y());
+            camera_moveRight(_move:x());
+        end
+
+    end
+end
+
+function camera_keyEvent(evt, key)
+
+    if not _useScriptCamera then
+        return
+    end
+
+    if evt == Keyboard.KEY_PRESS then
+        if key == Keyboard.KEY_W or key == Keyboard.KEY_CAPITAL_W then
+            _moveFlags[MOVE_FORWARD] = true
+        elseif key == Keyboard.KEY_S or key == Keyboard.KEY_CAPITAL_S then
+            _moveFlags[MOVE_BACKWARD] = true
+        elseif key == Keyboard.KEY_A or key == Keyboard.KEY_CAPITAL_A then
+            _moveFlags[MOVE_LEFT] = true
+        elseif key == Keyboard.KEY_D or key == Keyboard.KEY_CAPITAL_D then
+            _moveFlags[MOVE_RIGHT] = true
+        elseif key == Keyboard.KEY_SHIFT then
+            _moveFast = true
+        end
+    elseif evt == Keyboard.KEY_RELEASE then
+        if key == Keyboard.KEY_W or key == Keyboard.KEY_CAPITAL_W then
+            _moveFlags[MOVE_FORWARD] = false
+        elseif key == Keyboard.KEY_S or key == Keyboard.KEY_CAPITAL_S then
+            _moveFlags[MOVE_BACKWARD] = false
+        elseif key == Keyboard.KEY_A or key == Keyboard.KEY_CAPITAL_A then
+            _moveFlags[MOVE_LEFT] = false
+        elseif key == Keyboard.KEY_D or key == Keyboard.KEY_CAPITAL_D then
+            _moveFlags[MOVE_RIGHT] = false
+        elseif key == Keyboard.KEY_SHIFT then
+            _moveFast = false
+        end
+    end
+
+end
+
+function camera_touchEvent(evt, x, y, contactIndex)
+
+    if not _useScriptCamera then
+        return
+    end
+
+    if evt == Touch.TOUCH_PRESS then
+        if contactIndex == 0 then
+            _touch:set(x, y)
+        elseif contactIndex == 1 then
+            _moveFlags[MOVE_FORWARD] = true
+        elseif contactIndex == 2 then
+            _moveFast = true
+        end
+    elseif evt == Touch.TOUCH_RELEASE then
+        if contactIndex == 1 then
+            _moveFlags[MOVE_FORWARD] = false
+        elseif contactIndex == 2 then
+            _moveFast = false
+        end
+    elseif evt == Touch.TOUCH_MOVE then
+    	if contactIndex == 0 then
+	        _delta:set(x - _touch:x(), y - _touch:y())
+	        _touch:set(x, y)
+	        _pitch = _pitch - math.rad(_delta:y() * 0.5)
+	        _yaw = _yaw - math.rad(_delta:x() * 0.5)
+	        _cameraNode:setRotation(Quaternion.identity())
+	        _cameraNode:rotateY(_yaw)
+	        _cameraNode:rotateX(_pitch)
+	    end
+    end
+
+end
+
+function camera_moveForward(by)
+    local v = _cameraNode:getForwardVector()
+    v:normalize():scale(by)
+    _cameraNode:translate(v)
+end
+
+function camera_moveRight(by)
+    local v = _cameraNode:getRightVector()
+    v:normalize():scale(by)
+    _cameraNode:translate(v)
+end
+
+function camera_quatToEuler(quat)
+    local qx = quat:x()
+    local qy = quat:y()
+    local qz = quat:z()
+    local qw = quat:w()
+    local qx2 = qx * qx
+    local qy2 = qy * qy
+    local qz2 = qz * qz
+    local qw2 = qw * qw
+
+    local rotx = 0
+    local roty = 0
+    local rotz = 0
+
+    if (qx*qy + qz*qw) == 0.5 then
+        rotx = 0
+        roty = 2 * math.atan2(qx, qw)
+    elseif (qx*qy + qz*qw) == -0.5 then
+        rotx = 0
+        roty = -2 * math.atan2(qx, qw)
+    else
+        rotx = math.atan2(2*qx*qw-2*qy*qz , 1 - 2*qx2 - 2*qz2)
+        roty = math.atan2(2*qy*qw-2*qx*qz , 1 - 2*qy2 - 2*qz2)
+    end
+
+    rotz = math.asin(2*qx*qy + 2*qz*qw)
+
+    return Vector3.new(rotx, roty, rotz)
+end

BIN
samples/browser/res/common/constraints.gpb


+ 54 - 0
samples/browser/res/common/constraints.physics

@@ -0,0 +1,54 @@
+collisionObject ball
+{
+    type = RIGID_BODY
+    shape = SPHERE
+    mass = 1.0
+    friction = 0.5
+    restitution = 0.5
+    linearDamping = 0.1
+    angularDamping = 0.5
+}
+
+collisionObject box
+{
+    type = RIGID_BODY
+    shape = BOX
+    mass = 5.0
+    friction = 1.0
+    restitution = 0.0
+    linearDamping = 0.5
+    angularDamping = 0.5
+}
+
+collisionObject capsule
+{
+    type = RIGID_BODY
+    shape = CAPSULE
+    mass = 5.0
+    friction = 1.0
+    restitution = 0.0
+    linearDamping = 0.5
+    angularDamping = 0.5
+}
+
+collisionObject mesh
+{
+    type = RIGID_BODY
+    shape = MESH
+    mass = 1.0
+    friction = 1.0
+    restitution = 0.0
+    linearDamping = 0.5
+    angularDamping = 0.5
+}
+
+collisionObject staticBox
+{
+    type = RIGID_BODY
+    shape = BOX
+    mass = 0.0
+    friction = 0.5
+    restitution = 0.75
+    linearDamping = 0.025
+    angularDamping = 0.16
+}

+ 67 - 0
samples/browser/res/common/constraints.scene

@@ -0,0 +1,67 @@
+scene
+{
+	path = res/common/constraints.gpb
+	
+	node floor
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/constraints.physics#staticBox
+	}
+	
+	node wall01
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/constraints.physics#staticBox
+	}
+	
+	node wall02
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/constraints.physics#staticBox
+	}
+	
+	node door01
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/constraints.physics#box
+	}
+	
+	node door02
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/constraints.physics#staticBox
+	}
+	
+	node wall03
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/constraints.physics#staticBox
+	}
+	
+	node wall04
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/constraints.physics#staticBox
+	}
+	
+	node sphere
+	{
+		material = res/common/physics.material#red
+		collisionObject = res/common/constraints.physics#ball
+	}
+	
+	physics
+	{
+		gravity = 0.0, -9.8, 0.0
+		
+		constraint
+        {
+            type = HINGE
+            rigidBodyA = door01
+            //rotationOffsetA = 0.0, 1.0, 0.0, 90.0
+            translationOffsetA = -5.0, 0.0, 0
+            limits = 0.0, 360.0, 0.0
+            //breakingImpulse = 80.0
+        }
+	}
+}

BIN
samples/browser/res/common/custom.gpb


+ 368 - 0
samples/browser/res/common/default.theme

@@ -0,0 +1,368 @@
+theme mainMenu
+{
+    texture = res/png/default-theme.png
+
+    imageList normalImages
+    {
+        color = #4A8799ff
+
+        image unchecked
+        {
+            region = 78, 1, 46, 46
+        }
+
+        image checked
+        {
+            region = 78, 46, 46, 46
+        }
+
+        image unselected
+        {
+            region = 127, 1, 46, 46
+        }
+
+        image selected
+        {
+            region = 127, 46, 46, 46
+        }
+
+        image minCap
+        {
+            region = 3, 115, 8, 11
+        }
+
+        image maxCap
+        {
+            region = 3, 115, 8, 11
+        }
+
+        image marker
+        {
+            region = 16, 113, 18, 18
+        }
+
+        image track
+        {
+            region = 42, 119, 26, 6
+        }
+
+        image textCaret
+        {
+            region = 5, 149, 11, 25
+            color = #C3D9BFff
+        }
+
+        image scrollBarTopCap
+        {
+            region = 0, 99, 12, 5
+        }
+
+        image verticalScrollBar
+        {
+            region = 0, 104, 12, 19
+        }
+
+        image scrollBarBottomCap
+        {
+            region = 0, 138, 12, 5
+        }
+
+        image scrollBarLeftCap
+        {
+            region = 35, 115, 5, 12
+        }
+
+        image horizontalScrollBar
+        {
+            region = 43, 115, 19, 12
+        }
+
+        image scrollBarRightCap
+        {
+            region = 65, 115, 5, 12
+        }
+    }
+
+    imageList activeImages : normalImages
+    {
+        color = #C3D9BFff
+
+        image unchecked
+        {
+            region = 78, 91, 46, 46
+        }
+
+        image checked
+        {
+            region = 78, 91, 46, 46
+        }
+
+        image unselected
+        {
+            region = 127, 91, 46, 46
+        }
+
+        image selected
+        {
+            region = 127, 91, 46, 46
+        }
+    }
+
+	imageList focusImages : normalImages
+	{
+		color = #2A6779ff
+	}
+
+    skin mainNormal
+    {
+        border
+        {
+            left = 10
+            right = 10
+            top = 10
+            bottom = 10
+        }
+        
+        region = 1, 1, 74, 74
+        color = #4A8799ff
+    }
+
+    skin mainActive : mainNormal
+    {
+        color = #C3D9BFff
+    }
+
+	skin mainFocus : mainNormal
+	{
+		color = #2A6779ff
+	}
+
+    skin formEntry : mainNormal
+    {
+        region = 78, 1, 46, 46
+        color = #35535Cff
+    }
+
+	skin formFocus : formEntry
+	{
+        color = #15333Cff
+	}
+    
+    skin underliner
+    {
+        border
+        {
+            bottom = 10
+        }
+        
+        region = 4, 82, 68, 5
+        color = #ffffffff
+    }
+
+    skin plusNormal
+    {
+        region = 81, 139, 40, 40
+        color = #4A8799ff
+    }
+
+    skin plusActive : plusNormal
+    {
+        color = #C3D9BFff
+    }
+
+    skin minusNormal
+    {
+        region = 81, 184, 40, 40
+        color = #4A8799ff
+    }
+
+    skin minusActive : minusNormal
+    {
+        color = #C3D9BFff
+    }
+
+    style plus
+    {
+        stateNormal
+        {
+            skin = plusNormal
+        }
+
+        stateActive
+        {
+            skin = plusActive
+        }
+    }
+
+    style minus
+    {
+        stateNormal
+        {
+            skin = minusNormal
+        }
+
+        stateActive
+        {
+            skin = minusActive
+        }
+    }
+
+    style underlined
+    {
+        padding
+        {
+            top = 5
+        }
+    
+        stateNormal
+        {
+            skin = underliner
+            textColor = #ffffffff
+            font = res/common/arial18.gpb
+            fontSize = 25
+            textAlignment = ALIGN_BOTTOM_HCENTER
+        }
+    }
+
+    style leftAlignedUnderlined : underlined
+    {
+        stateNormal
+        {
+            textAlignment = ALIGN_TOP_LEFT
+        }
+    }
+
+    style basic
+    {
+        stateNormal
+        {
+            skin = mainNormal
+            imageList = normalImages
+
+            font = res/common/arial18.gpb
+            textColor = #ffffffff
+            fontSize = 18
+            textAlignment = ALIGN_VCENTER_HCENTER
+        }
+		
+        stateActive
+        {
+            imageList = activeImages
+        }
+
+		stateFocus
+		{
+			skin = mainFocus
+			imageList = focusImages
+		}
+		
+		stateDisabled
+		{
+			opacity = 0.6
+		}
+    }
+
+    style topLeftAlignedEntry : basic
+    {
+        stateNormal
+        {
+            skin = formEntry
+            textAlignment = ALIGN_TOP_LEFT
+        }
+
+        stateFocus
+        {
+            skin = formFocus
+        }
+    }
+
+    style buttonStyle : basic
+    {
+        padding
+        {
+            top = -10
+            bottom = -10
+        }
+
+        stateNormal
+        {
+            font = res/common/arial18.gpb
+            fontSize = 20
+        }
+
+        stateActive
+        {
+            skin = mainActive
+        }
+    }
+
+    style noBorder
+    {
+        stateNormal
+        {
+            imageList = normalImages
+            font = res/common/arial18.gpb
+            textColor = #ffffffff
+            fontSize = 14
+            textAlignment = ALIGN_VCENTER_HCENTER
+        }
+		
+		stateFocus
+		{
+			textColor = #aaa000ff
+			imageList = focusImages
+		}
+
+        stateActive
+        {
+            imageList = activeImages
+            textAlignment = ALIGN_VCENTER_HCENTER
+        }
+    }
+
+    style iconNoBorder : noBorder
+    {
+        stateNormal
+        {
+            font = res/common/arial18.gpb
+            fontSize = 20
+            textAlignment = ALIGN_VCENTER_LEFT
+        }
+
+        stateActive
+        {
+            font = res/common/arial18.gpb
+            fontSize = 20
+            textAlignment = ALIGN_VCENTER_LEFT
+        }
+    }
+
+    style topLeftNoBorder : iconNoBorder
+    {
+        stateNormal
+        {
+            textAlignment = ALIGN_TOP_LEFT
+        }
+
+        stateActive
+        {
+            textAlignment = ALIGN_TOP_LEFT
+        }
+    }
+
+    style title
+    {
+        stateNormal
+        {
+            textColor = #ffffffff
+            font = res/common/arial18.gpb
+            fontSize = 26
+            textAlignment = ALIGN_BOTTOM_HCENTER
+        }
+
+        stateActive
+        {
+            textColor = #C3D9BFff
+        }
+    }
+}

BIN
samples/browser/res/common/duck.gpb


+ 39 - 0
samples/browser/res/common/duck.material

@@ -0,0 +1,39 @@
+material duck
+{
+    technique
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured.vert
+            fragmentShader = res/shaders/textured.frag
+            defines = SPECULAR
+            
+            // uniforms
+            u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+            u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+            u_cameraPosition = CAMERA_WORLD_POSITION
+            u_ambientColor = 0.2, 0.2, 0.2
+            u_lightColor = 0.75, 0.75, 0.75
+            u_specularExponent = 50
+            
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/duck-diffuse.png
+                mipmap = true
+                wrapS = CLAMP
+                wrapT = CLAMP
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+}

BIN
samples/browser/res/common/dynamic.gpb


BIN
samples/browser/res/common/footsteps.wav


+ 116 - 0
samples/browser/res/common/forms/formBasicControls.form

@@ -0,0 +1,116 @@
+form basicControls
+{
+    theme = res/common/default.theme
+    layout = LAYOUT_ABSOLUTE
+    style = basic
+    size = 600, 600
+    	
+	label title
+	{
+		style = underlined
+		position = 185, 0
+		size = 200, 50
+		text = This is a label.
+	}
+		
+	button testButton
+	{
+		style = buttonStyle
+		position = 20, 80
+		size = 200, 100
+		text = This is a button.
+	}
+
+	checkbox testCheckbox
+	{
+		style = iconNoBorder
+		position = 20, 220
+		size = 200, 40
+		text = This is a checkbox.
+	}
+	
+	slider testSlider
+	{
+		style = topLeftNoBorder
+		position = 25, 315
+		size = 190, 60
+		orientation = HORIZONTAL
+		min = -100
+		max = 100
+		value = 0
+		//step = 5
+		text = This is a slider.
+		valueTextVisible = true
+	}
+
+    label textBoxLabel
+    {
+        style = iconNoBorder
+        position = 25, 400
+        size = 200, 60
+        text = Label:
+    }
+
+    textBox testTextBox
+    {
+        style = topLeftAlignedEntry
+        position = 20, 450
+        size = 250, 80
+        text = This is a text box.
+    }
+
+	container radioButtonContainer
+	{
+		layout = LAYOUT_VERTICAL
+		style = basic
+		position = 330, 100
+		size = 200, 140
+		
+		radioButton choice1
+		{
+			style = iconNoBorder
+			text = Radio button 1.
+			group = testRadio
+			//position = 350, 80
+			size = 180, 40
+			selected = true
+		}
+
+		radioButton choice2 : choice1
+		{
+			text = Radio button 2.
+			//position = 350, 130
+			selected = false
+		}
+
+		radioButton choice3 : choice2
+		{
+			text = Radio button 3.
+			//position = 350, 180
+		}
+	}
+	
+	image testImage
+	{
+		position = 300, 250
+		style = basic
+		size = 256, 256
+		path = res/png/box-diffuse.png
+		//srcRegion = 20, 20, 100, 100
+		//dstRegion = 20, 20, 100, 100
+	}
+	
+	button alignedButton
+    {
+		margin
+		{
+			right = 50
+			bottom = 100
+		}
+	
+        style = buttonStyle
+        alignment = ALIGN_BOTTOM_RIGHT
+        size = 200, 100
+        text = Alignment: bottom-right. Right margin: 50. Bottom margin: 100.
+    }
+}

+ 53 - 0
samples/browser/res/common/forms/formFlowLayout.form

@@ -0,0 +1,53 @@
+form flowLayout
+{
+    theme = res/common/default.theme
+    layout = LAYOUT_FLOW
+    style = basic
+    size = 600, 600
+    scroll = SCROLL_BOTH
+
+    label label1
+    {
+        style = basic
+        size = 200, 200
+        text = Flow Layout
+    }
+
+    label otherLabel : label1
+    {
+    }
+
+    label otherLabel : label1
+    {
+    }
+
+    label otherLabel : label1
+    {
+    }
+
+    label otherLabel : label1
+    {
+        size = 250, 200
+    }
+
+    label otherLabel : label1
+    {
+    }
+
+    label otherLabel : label1
+    {
+        size = 250, 250
+    }
+
+    label otherLabel : label1
+    {
+    }
+
+    label otherLabel : label1
+    {
+    }
+
+    label otherLabel : label1
+    {
+    }
+}

+ 117 - 0
samples/browser/res/common/forms/formScrolling.form

@@ -0,0 +1,117 @@
+form scrolling
+{
+    theme = res/common/default.theme
+    layout = LAYOUT_VERTICAL
+    style = basic
+    size = 600, 600
+    scroll = SCROLL_BOTH
+    scrollBarsAutoHide = true
+
+    label label1
+    {
+        style = basic
+        width = 4000
+        height = 200
+        text = Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!  Label!
+    }
+
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+    label otherLabel : label1
+    {
+    }
+}

+ 45 - 0
samples/browser/res/common/forms/formSelect.form

@@ -0,0 +1,45 @@
+form formSelect
+{
+    theme = res/common/default.theme
+    layout = LAYOUT_VERTICAL
+    style = basic
+    alignment = ALIGN_TOP_LEFT
+    width = 200
+    autoHeight = true
+
+	radioButton form0
+	{
+		style = basic
+		text = Basic Controls
+		group = formSelection
+		size = 180, 60
+		textAlignment = ALIGN_VCENTER_HCENTER
+		selected = true
+	}
+
+	radioButton form1 : form0
+	{
+		text = Scrolling
+		selected = false
+	}
+
+	radioButton form2 : form1
+	{
+		text = Flow Layout
+	}
+
+	radioButton form3 : form1
+	{
+		text = Vertical Layout
+	}
+
+	radioButton form4 : form1
+	{
+		text = Z-Order
+	}
+
+	radioButton form5 : form1
+	{
+		text = Programmatic
+	}
+}

+ 53 - 0
samples/browser/res/common/forms/formVerticalLayout.form

@@ -0,0 +1,53 @@
+form verticalLayout
+{
+    theme = res/common/default.theme
+    layout = LAYOUT_VERTICAL
+    style = basic
+    size = 600, 600
+    scroll = SCROLL_BOTH
+
+    label label2
+    {
+        style = basic
+        size = 200, 200
+        text = Vertical Layout
+    }
+
+    label otherLabel : label2
+    {
+    }
+
+    label otherLabel : label2
+    {
+    }
+
+    label otherLabel : label2
+    {
+    }
+
+    label otherLabel : label2
+    {
+        size = 250, 200
+    }
+
+    label otherLabel : label2
+    {
+    }
+
+    label otherLabel : label2
+    {
+        size = 250, 250
+    }
+
+    label otherLabel : label2
+    {
+    }
+
+    label otherLabel : label2
+    {
+    }
+
+    label otherLabel : label2
+    {
+    }
+}

+ 29 - 0
samples/browser/res/common/forms/formZOrder.form

@@ -0,0 +1,29 @@
+form zOrder
+{
+    theme = res/common/default.theme
+    style = basic
+    size = 600, 600
+    scroll = SCROLL_BOTH
+
+    label label1
+    {
+        style = basic
+        size = 400, 200
+        text = TOP
+        zIndex = 3
+    }
+
+    label label2 : label1
+    {
+        text = MID
+        position = 20, 50
+        zIndex = 2
+    }
+
+    label label3 : label1
+    {
+        text = BOTTOM
+        position = 40, 100
+        zIndex = 1
+    }
+}

+ 51 - 0
samples/browser/res/common/gamepad.form

@@ -0,0 +1,51 @@
+form VIRTUAL GAMEPAD
+{
+    theme = res/common/gamepad.theme
+    autoWidth = true
+    autoHeight = true
+
+    container left
+    {
+        alignment = ALIGN_BOTTOM_LEFT
+        size = 300, 300
+        consumeEvents = false
+        
+        joystick
+        {
+            style = joystickStyle
+            size = 256, 256
+            alignment = ALIGN_VCENTER_HCENTER
+            radius = 32
+        }
+    }
+
+    container right
+    {
+        alignment = ALIGN_BOTTOM_RIGHT
+        size = 256, 256
+		consumeEvents = false
+		
+        container inner
+        {
+            size = 230, 230
+            alignment = ALIGN_VCENTER_HCENTER
+            consumeEvents = false
+            
+            button A
+            {
+                mapping = BUTTON_A
+                style = buttonAStyle
+                size = 128, 128
+                alignment = ALIGN_BOTTOM_LEFT
+            }
+
+            button B
+            {
+                mapping = BUTTON_B
+                style = buttonBStyle
+                size = 128, 128
+                alignment = ALIGN_TOP_RIGHT
+            }
+        }
+    }
+}

+ 82 - 0
samples/browser/res/common/gamepad.theme

@@ -0,0 +1,82 @@
+theme gamepad
+{
+	texture = @gamepad
+	
+	imageList joystickImages
+	{
+        image outer
+		{
+			region = 0, 0, 256, 256
+		}
+		
+        image inner
+		{
+			region = 256, 0, 256, 256
+		}
+	}
+
+    skin base
+	{
+		border
+		{
+			left = 1
+			right = 1
+			top = 1
+			bottom = 1
+		}
+	}
+
+	skin buttonAActiveSkin : base
+	{
+		region = 0, 304, 160, 160
+	}
+	
+	skin buttonANormalSkin : base
+	{
+		region = 176, 304, 160, 160
+	}
+
+    skin buttonBActiveSkin : base
+	{
+		region = 383, 304, 160, 160
+	}
+	
+	skin buttonBNormalSkin : base
+	{
+		region = 561, 304, 160, 160
+	}
+
+	style joystickStyle
+	{
+		stateNormal
+		{
+			imageList = joystickImages
+		}
+	}
+	
+	style buttonAStyle
+	{
+	    stateNormal
+		{
+			skin = buttonANormalSkin
+		}
+		
+		stateActive
+		{
+			skin = buttonAActiveSkin
+		}
+	}
+
+    style buttonBStyle
+	{
+	    stateNormal
+		{
+			skin = buttonBNormalSkin
+		}
+		
+		stateActive
+		{
+			skin = buttonBActiveSkin
+		}
+	}
+}

+ 23 - 0
samples/browser/res/common/grid.material

@@ -0,0 +1,23 @@
+material grid
+{
+    technique
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/colored-unlit.vert
+            fragmentShader = res/shaders/colored-unlit.frag
+			defines = VERTEX_COLOR
+
+             // uniforms
+            u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+            
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+}

+ 34 - 0
samples/browser/res/common/inputs.form

@@ -0,0 +1,34 @@
+form inputTestControls
+{
+    theme = res/common/default.theme
+    width = 200
+    height = 350
+    alignment = ALIGN_TOP_RIGHT
+    consumeInputEvents = false
+
+    // Show/hide keyboard
+    button showKeyboardButton
+    {
+        style = buttonStyle
+        position = 10, 60
+        size = 160, 100
+        text = Show virtual keyboard
+    }
+
+    // Capture mouse
+    button captureMouseButton
+    {
+        style = buttonStyle
+        position = 10, 180
+        size = 160, 100
+        text = Capture mouse
+    }
+    
+    label restoreMouseLabel
+    {
+        style = underlined
+        position = 10, 290
+        size = 160, 60
+        text = Press space to restore mouse
+    }
+}

+ 142 - 0
samples/browser/res/common/light.form

@@ -0,0 +1,142 @@
+form formLightSelect
+{
+    theme = res/common/default.theme
+    layout = LAYOUT_HORIZONTAL
+    style = noBorder
+    alignment = ALIGN_TOP_HCENTER
+    autoWidth = true
+    autoHeight = true
+
+	container lightingType
+    {
+		style = basic
+        layout = LAYOUT_VERTICAL
+        position = 0, 20
+        size = 230, 210
+		
+        label
+        {
+            style = iconNoBorder
+            size = 210, 20
+            textAlignment = ALIGN_TOP_HCENTER
+            text = Type
+        }
+        
+		radioButton noLighting
+		{
+			style = iconNoBorder
+			imageSize = 35, 35
+			size = 200, 40
+			text = No Light
+			value = true
+		}
+
+	    radioButton directional
+		{
+			style = iconNoBorder
+			imageSize = 35, 35
+			size = 200, 40
+			text = Directional Light
+			value = false
+		}
+
+		radioButton spot
+		{
+			style = iconNoBorder
+			imageSize = 35, 35
+			size = 200, 40
+			text = Spot Light
+			value = false
+		}
+
+		radioButton point
+		{
+			style = iconNoBorder
+			imageSize = 35, 35
+			size = 200, 40
+			text = Point Light
+			value = false
+		}
+	}
+
+	container lightProperties
+    {
+		style = basic
+        layout = LAYOUT_VERTICAL
+        position = 0, 230
+        size = 230, 380
+    
+        label
+        {
+            style = iconNoBorder
+            size = 210, 20
+            textAlignment = ALIGN_TOP_HCENTER
+            text = Properties
+        }
+        
+		slider redSlider
+		{
+			style = iconNoBorder
+			size = 210, 60
+			orientation = HORIZONTAL
+            textAlignment = ALIGN_LEFT
+			min = 0
+			max = 1
+			value = 1.0
+			text = Red
+		}
+	
+		slider greenSlider
+		{
+			style = iconNoBorder
+			size = 210, 60
+			orientation = HORIZONTAL
+            textAlignment = ALIGN_LEFT
+			min = 0
+			max = 1
+			value = 1.0
+			text = Green
+		}
+
+		slider blueSlider
+		{
+			style = iconNoBorder
+			size = 210, 60
+			orientation = HORIZONTAL
+            textAlignment = ALIGN_LEFT
+			min = 0
+			max = 1
+			value = 1.0
+			text = Blue
+		}
+
+		slider specularSlider
+		{
+			style = iconNoBorder
+			size = 210, 60
+			orientation = HORIZONTAL
+            textAlignment = ALIGN_LEFT
+			min = 1
+			max = 500
+			value = 1
+			text = Specular
+		}
+		checkbox specularCheckBox
+		{
+			style = iconNoBorder
+			imageSize = 35, 35
+			size = 200, 40
+			text = Enable Specular
+			value = false
+		}
+
+		checkbox bumpedCheckBox
+		{
+			style = iconNoBorder
+			imageSize = 35, 35
+			size = 200, 40
+			text = Enable BumpMapping
+			value = false
+		}
+	}
+}

+ 480 - 0
samples/browser/res/common/light.material

@@ -0,0 +1,480 @@
+material lighting
+{
+	u_textureRepeat = 1.5, 1.5
+	
+	technique unlit
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured-unlit.vert
+            fragmentShader = res/shaders/textured-unlit.frag
+			defines = TEXTURE_REPEAT
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+ 
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+	
+	technique directional
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured.vert
+            fragmentShader = res/shaders/textured.frag
+			defines = TEXTURE_REPEAT
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+            
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique directionalSpecular
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured.vert
+            fragmentShader = res/shaders/textured.frag
+			defines = TEXTURE_REPEAT; SPECULAR
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+ 			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique directionalBumped
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured-bumped.vert
+            fragmentShader = res/shaders/textured-bumped.frag
+			defines = TEXTURE_REPEAT
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+			
+			sampler u_normalmapTexture
+            {
+                path = res/png/brickn.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique directionalSpecularBumped
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured-bumped.vert
+            fragmentShader = res/shaders/textured-bumped.frag
+			defines = TEXTURE_REPEAT; SPECULAR
+			u_cameraPosition = CAMERA_VIEW_POSITION 
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+			
+			sampler u_normalmapTexture
+            {
+                path = res/png/brickn.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique spot
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured.vert
+            fragmentShader = res/shaders/textured.frag
+			defines = TEXTURE_REPEAT; SPOT_LIGHT
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+ 
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+			
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+    technique spotSpecular
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured.vert
+            fragmentShader = res/shaders/textured.frag
+			defines = TEXTURE_REPEAT; SPOT_LIGHT; SPECULAR
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+ 
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique spotBumped
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured-bumped.vert
+            fragmentShader = res/shaders/textured-bumped.frag
+			defines = TEXTURE_REPEAT; SPOT_LIGHT
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+			
+			sampler u_normalmapTexture
+            {
+                path = res/png/brickn.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique spotSpecularBumped
+    {
+	    pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured-bumped.vert
+            fragmentShader = res/shaders/textured-bumped.frag
+			defines = TEXTURE_REPEAT; SPOT_LIGHT; SPECULAR
+			u_cameraPosition = CAMERA_VIEW_POSITION 
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+            u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+			
+			sampler u_normalmapTexture
+            {
+                path = res/png/brickn.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique point
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured.vert
+            fragmentShader = res/shaders/textured.frag
+			defines = TEXTURE_REPEAT; POINT_LIGHT
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+ 
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+    technique pointSpecular
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured.vert
+            fragmentShader = res/shaders/textured.frag
+			defines = TEXTURE_REPEAT; POINT_LIGHT; SPECULAR
+			u_cameraPosition = CAMERA_VIEW_POSITION 
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+ 
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique pointBumped
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured-bumped.vert
+            fragmentShader = res/shaders/textured-bumped.frag
+			defines = TEXTURE_REPEAT; POINT_LIGHT
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+			
+			sampler u_normalmapTexture
+            {
+                path = res/png/brickn.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+
+	technique pointSpecularBumped
+    {
+        pass 0
+        {
+            // shaders
+            vertexShader = res/shaders/textured-bumped.vert
+            fragmentShader = res/shaders/textured-bumped.frag
+			defines = TEXTURE_REPEAT; POINT_LIGHT; SPECULAR
+			u_cameraPosition = CAMERA_VIEW_POSITION 
+			u_worldViewMatrix = WORLD_VIEW_MATRIX
+			u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+			u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+
+            // samplers
+            sampler u_diffuseTexture
+            {
+                path = res/png/brick.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+			
+			sampler u_normalmapTexture
+            {
+                path = res/png/brickn.png
+                mipmap = true
+                wrapS = REPEAT
+                wrapT = REPEAT
+                minFilter = NEAREST_MIPMAP_LINEAR
+                magFilter = LINEAR
+            }
+
+            // render state
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+}

BIN
samples/browser/res/common/lightBrickWall.gpb


+ 33 - 0
samples/browser/res/common/physics.form

@@ -0,0 +1,33 @@
+form physicsScene
+{
+    theme = res/common/default.theme
+    layout = LAYOUT_VERTICAL
+    style = noBorder
+    width = 200
+    height = 200
+    alignment = ALIGN_BOTTOM_LEFT
+
+    button shapeButton
+    {
+        style = buttonStyle
+        autoWidth = true
+        height = 40
+        text = Sphere
+    }
+    
+    button throwButton : shapeButton
+    {
+        text = Throw
+    }
+    
+    button wireframeButton  : shapeButton
+    {
+        text = Solid
+    }
+
+    button drawDebugButton : shapeButton
+    {
+        text = Normal
+    }
+
+}

BIN
samples/browser/res/common/physics.gpb


+ 64 - 0
samples/browser/res/common/physics.material

@@ -0,0 +1,64 @@
+material colored
+{
+    technique
+    {
+        pass
+        {
+            vertexShader = res/shaders/colored.vert
+            fragmentShader = res/shaders/colored.frag
+
+            u_worldViewProjectionMatrix = WORLD_VIEW_PROJECTION_MATRIX
+            u_inverseTransposeWorldViewMatrix = INVERSE_TRANSPOSE_WORLD_VIEW_MATRIX
+            
+            renderState
+            {
+                cullFace = true
+                depthTest = true
+            }
+        }
+    }
+}
+
+material floor : colored
+{
+    technique
+    {
+        pass
+        {
+            u_diffuseColor = 0.5, 0.5, 0.5, 1
+        }
+    }
+}
+
+material green : colored
+{
+    technique
+    {
+        pass
+        {
+            u_diffuseColor = 0.1, 0.6, 0.1, 1
+        }
+    }
+}
+
+material blue : colored
+{
+    technique
+    {
+        pass
+        {
+            u_diffuseColor = 0, 0, 1, 1
+        }
+    }
+}
+
+material red : colored
+{
+    technique
+    {
+        pass
+        {
+            u_diffuseColor = 1, 0, 0, 1
+        }
+    }
+}

+ 54 - 0
samples/browser/res/common/physics.physics

@@ -0,0 +1,54 @@
+collisionObject ball
+{
+    type = RIGID_BODY
+    shape = SPHERE
+    mass = 1.0
+    friction = 0.5
+    restitution = 0.5
+    linearDamping = 0.1
+    angularDamping = 0.5
+}
+
+collisionObject box
+{
+    type = RIGID_BODY
+    shape = BOX
+    mass = 5.0
+    friction = 1.0
+    restitution = 0.0
+    linearDamping = 0.5
+    angularDamping = 0.5
+}
+
+collisionObject capsule
+{
+    type = RIGID_BODY
+    shape = CAPSULE
+    mass = 5.0
+    friction = 1.0
+    restitution = 0.0
+    linearDamping = 0.5
+    angularDamping = 0.5
+}
+
+collisionObject duck
+{
+    type = RIGID_BODY
+    shape = BOX
+    mass = 1.0
+    friction = 1.0
+    restitution = 0.0
+    linearDamping = 0.5
+    angularDamping = 0.5
+}
+
+collisionObject staticBox
+{
+    type = RIGID_BODY
+    shape = BOX
+    mass = 0.0
+    friction = 0.5
+    restitution = 0.75
+    linearDamping = 0.025
+    angularDamping = 0.16
+}

+ 66 - 0
samples/browser/res/common/physics.scene

@@ -0,0 +1,66 @@
+scene
+{
+	path = res/common/physics.gpb
+	
+	node duck
+	{
+		url = res/common/duck.gpb#duck
+		material = res/common/duck.material
+		translate = -4, 5, 0
+		rotate = 0.0, 1.0, 0.0, 180
+		collisionObject = res/common/physics.physics#duck
+	}
+	
+	node floor
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/physics.physics#staticBox
+	}
+	
+	node wall01
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/physics.physics#staticBox
+	}
+	
+	node wall02
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/physics.physics#staticBox
+	}
+	
+	node wall03
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/physics.physics#staticBox
+	}
+	
+	node wall04
+	{
+		material = res/common/physics.material#floor
+		collisionObject = res/common/physics.physics#staticBox
+	}
+	
+	node box
+	{
+		material = res/common/physics.material#green
+		collisionObject = res/common/physics.physics#box
+	}
+	
+	node sphere
+	{
+		material = res/common/physics.material#red
+		collisionObject = res/common/physics.physics#ball
+	}
+	
+	node capsule
+	{
+		material = res/common/physics.material#blue
+		collisionObject = res/common/physics.physics#capsule
+	}
+	
+	physics
+	{
+		gravity = 0.0, -9.8, 0.0
+	}
+}

BIN
samples/browser/res/common/pirulen.gpb


+ 70 - 0
samples/browser/res/common/postprocess/postprocess.material

@@ -0,0 +1,70 @@
+material postprocess
+{
+    renderState
+    {
+        depthTest = false            
+    }
+
+    technique Passthrough
+    {
+        pass
+        {
+            vertexShader = res/common/postprocess/postprocess.vert
+            fragmentShader = res/common/postprocess/postprocess_passthrough.frag
+        }
+    }
+    technique Grayscale
+    {
+        pass
+        {
+            vertexShader = res/common/postprocess/postprocess.vert
+            fragmentShader = res/common/postprocess/postprocess_grayscale.frag
+        }
+    }
+    
+    technique Sepia
+    {
+        pass
+        {
+            vertexShader = res/common/postprocess/postprocess.vert
+            fragmentShader = res/common/postprocess/postprocess_sepia.frag
+        }
+    }
+    
+    technique Pixelate
+    {
+        pass
+        {
+            vertexShader = res/common/postprocess/postprocess.vert
+            fragmentShader = res/common/postprocess/postprocess_pixelate.frag
+        }
+    }
+    
+    technique Sobel Edge
+    {
+        pass
+        {
+            vertexShader = res/common/postprocess/postprocess.vert
+            fragmentShader = res/common/postprocess/postprocess_sobeledge.frag
+        }
+    }
+    
+    technique Gaussian Blur
+    {
+        pass
+        {
+            vertexShader = res/common/postprocess/postprocess.vert
+            fragmentShader = res/common/postprocess/postprocess_gaussianblur.frag
+        }
+    } 
+    
+    technique Old Film
+    {
+        pass
+        {
+            vertexShader = res/common/postprocess/postprocess.vert
+            fragmentShader = res/common/postprocess/postprocess_oldfilm.frag
+        }
+    }
+}
+

+ 12 - 0
samples/browser/res/common/postprocess/postprocess.vert

@@ -0,0 +1,12 @@
+// Inputs
+attribute vec2 a_position;
+attribute vec2 a_texCoord;
+
+// Varying
+varying vec2 v_texCoord;
+
+void main()
+{
+    gl_Position = vec4(a_position, 0, 1);
+    v_texCoord = a_texCoord;
+}

+ 28 - 0
samples/browser/res/common/postprocess/postprocess_gaussianblur.frag

@@ -0,0 +1,28 @@
+#ifdef OPENGL_ES
+precision mediump float;
+#endif
+
+// Uniforms
+uniform sampler2D u_texture;
+uniform float u_length;
+
+// Inputs
+varying vec2 v_texCoord;
+
+void main()
+{
+    vec4 sum = vec4(0.0);
+ 
+   // blur in y (vertical) take nine samples, with the distance u_length between them
+   sum += texture2D(u_texture, vec2(v_texCoord.x - 4.0 * u_length, v_texCoord.y)) * 0.05;
+   sum += texture2D(u_texture, vec2(v_texCoord.x - 3.0 * u_length, v_texCoord.y)) * 0.09;
+   sum += texture2D(u_texture, vec2(v_texCoord.x - 2.0 * u_length, v_texCoord.y)) * 0.12;
+   sum += texture2D(u_texture, vec2(v_texCoord.x -       u_length, v_texCoord.y)) * 0.15;
+   sum += texture2D(u_texture, vec2(v_texCoord.x, v_texCoord.y)) * 0.16;
+   sum += texture2D(u_texture, vec2(v_texCoord.x +       u_length, v_texCoord.y)) * 0.15;
+   sum += texture2D(u_texture, vec2(v_texCoord.x + 2.0 * u_length, v_texCoord.y)) * 0.12;
+   sum += texture2D(u_texture, vec2(v_texCoord.x + 3.0 * u_length, v_texCoord.y)) * 0.09;
+   sum += texture2D(u_texture, vec2(v_texCoord.x + 4.0 * u_length, v_texCoord.y)) * 0.05;
+ 
+   gl_FragColor = sum;
+}

+ 17 - 0
samples/browser/res/common/postprocess/postprocess_grayscale.frag

@@ -0,0 +1,17 @@
+#ifdef OPENGL_ES
+precision highp float;
+#endif
+
+// Uniforms
+uniform sampler2D u_texture;
+
+// Inputs
+varying vec2 v_texCoord;
+
+void main()
+{
+    // Sample the diffuse texture for base color
+    float gray = dot(texture2D(u_texture, v_texCoord).rgb, vec3(0.299, 0.587, 0.114));
+    
+    gl_FragColor = vec4(gray, gray, gray, 1.0);
+}

+ 146 - 0
samples/browser/res/common/postprocess/postprocess_oldfilm.frag

@@ -0,0 +1,146 @@
+#ifdef OPENGL_ES
+precision mediump float;
+#endif
+
+// Uniforms
+uniform sampler2D u_texture;
+uniform float u_sepiaValue;
+uniform float u_noiseValue;
+uniform float u_scratchValue;
+uniform float u_innerVignetting;
+uniform float u_outerVignetting;
+
+uniform float u_elapsedTime;
+uniform float u_random;
+
+
+// Varying
+varying vec2 v_texCoord;
+
+
+
+// Computes the overlay between the source and destination colours.
+vec3 overlay (vec3 src, vec3 dst)
+{
+    // if (dst <= O) then: 2 * src * dst
+    // if (dst > O) then: 1 - 2 * (1 - dst) * (1 - src)
+    return vec3((dst.x <= 0.5) ? (2.0 * src.x * dst.x) : (1.0 - 2.0 * (1.0 - dst.x) * (1.0 - src.x)),
+                (dst.y <= 0.5) ? (2.0 * src.y * dst.y) : (1.0 - 2.0 * (1.0 - dst.y) * (1.0 - src.y)),
+                (dst.z <= 0.5) ? (2.0 * src.z * dst.z) : (1.0 - 2.0 * (1.0 - dst.z) * (1.0 - src.z)));
+}
+
+vec3 mod289(vec3 x) 
+{ 
+    return x - floor(x * (1.0 / 289.0)) * 289.0; 
+}
+
+vec2 mod289(vec2 x) 
+{ 
+    return x - floor(x * (1.0 / 289.0)) * 289.0; 
+}
+
+vec3 permute(vec3 x) 
+{ 
+    return mod289(((x*34.0)+1.0)*x); 
+}
+
+float snoise (vec2 v)
+{
+    const vec4 C = vec4(0.211324865405187,  // (3.0-sqrt(3.0))/6.0
+                        0.366025403784439,  // 0.5*(sqrt(3.0)-1.0)
+                        -0.577350269189626, // -1.0 + 2.0 * C.x
+                        0.024390243902439); // 1.0 / 41.0
+
+    // First corner
+    vec2 i  = floor(v + dot(v, C.yy) );
+    vec2 x0 = v -   i + dot(i, C.xx);
+
+    // Other corners
+    vec2 i1;
+    i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
+    vec4 x12 = x0.xyxy + C.xxzz;
+    x12.xy -= i1;
+
+    // Permutations
+    i = mod289(i); // Avoid truncation effects in permutation
+    vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))
+        + i.x + vec3(0.0, i1.x, 1.0 ));
+
+    vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);
+    m = m*m ;
+    m = m*m ;
+
+    // Gradients: 41 points uniformly over a line, mapped onto a diamond.
+    // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)
+
+    vec3 x = 2.0 * fract(p * C.www) - 1.0;
+    vec3 h = abs(x) - 0.5;
+    vec3 ox = floor(x + 0.5);
+    vec3 a0 = x - ox;
+
+    // Normalise gradients implicitly by scaling m
+    // Approximation of: m *= inversesqrt( a0*a0 + h*h );
+    m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );
+
+    // Compute final noise value at P
+    vec3 g;
+    g.x  = a0.x  * x0.x  + h.x  * x0.y;
+    g.yz = a0.yz * x12.xz + h.yz * x12.yw;
+    return 130.0 * dot(m, g);
+}
+
+void main ()
+{
+    // Sepia RGB value
+    vec3 sepia = vec3(112.0 / 255.0, 66.0 / 255.0, 20.0 / 255.0);
+
+    // Step 1: Convert to grayscale
+    vec3 colour = texture2D(u_texture, v_texCoord).xyz;
+    float gray = (colour.x + colour.y + colour.z) / 3.0;
+    vec3 grayscale = vec3(gray);
+    
+    // Step 2: Appy sepia overlay
+    vec3 finalColour = overlay(sepia, grayscale);
+    
+    // Step 3: Lerp final sepia colour
+    finalColour = grayscale + u_sepiaValue * (finalColour - grayscale);
+    
+    // Step 4: Add noise
+    float noise = snoise(v_texCoord * vec2(1024.0 + u_random * 512.0, 1024.0 + u_random * 512.0)) * 0.5;
+    finalColour += noise * u_noiseValue;
+    
+    // Optionally add noise as an overlay, simulating ISO on the camera
+    //vec3 noiseOverlay = overlay(finalColour, vec3(noise));
+    //finalColour = finalColour + u_noiseValue * (finalColour - noiseOverlay);
+    
+    // Step 5: Apply scratches
+    if ( u_random < u_scratchValue )
+    {
+        // Pick a random spot to show scratches
+        float dist = 1.0 / u_scratchValue;
+        float d = distance(v_texCoord, vec2(u_random * dist, u_random * dist));
+        if ( d < 0.4 )
+        {
+            // Generate the scratch
+            float xPeriod = 8.0;
+            float yPeriod = 1.0;
+            float pi = 3.141592;
+            float phase = u_elapsedTime;
+            float turbulence = snoise(v_texCoord * 2.5);
+            float vScratch = 0.5 + (sin(((v_texCoord.x * xPeriod + v_texCoord.y * yPeriod + turbulence)) * pi + phase) * 0.5);
+            vScratch = clamp((vScratch * 10000.0) + 0.35, 0.0, 1.0);
+
+            finalColour.xyz *= vScratch;
+        }
+    }
+    
+    // Step 6: Apply vignetting - Max distance from centre to corner is ~0.7. Scale that to 1.0.
+    float d = distance(vec2(0.5, 0.5), v_texCoord) * 1.414213;
+    float vignetting = clamp((u_outerVignetting - d) / (u_outerVignetting - u_innerVignetting), 0.0, 1.0);
+    finalColour.xyz *= vignetting;
+    
+    // Apply colour
+    gl_FragColor.xyz = finalColour;
+    gl_FragColor.w = 1.0;
+}
+      

+ 15 - 0
samples/browser/res/common/postprocess/postprocess_passthrough.frag

@@ -0,0 +1,15 @@
+#ifdef OPENGL_ES
+precision highp float;
+#endif
+
+// Uniforms
+uniform sampler2D u_texture;
+
+// Inputs
+varying vec2 v_texCoord;
+varying vec4 v_color;
+
+void main()
+{
+    gl_FragColor = texture2D(u_texture, v_texCoord);
+}

+ 31 - 0
samples/browser/res/common/postprocess/postprocess_pixelate.frag

@@ -0,0 +1,31 @@
+#ifdef OPENGL_ES
+precision mediump float;
+#endif
+
+// Uniforms
+uniform sampler2D u_texture;
+
+// Inputs
+varying vec2 v_texCoord;
+
+
+float discretize(float f, float d)
+{
+    return floor(f*d + 0.5)/d;
+}
+
+vec2 discretize(vec2 v, float d)
+{
+    return vec2(discretize(v.x, d), discretize(v.y, d));
+}
+
+void main()
+{
+    vec2 texCoord = discretize(v_texCoord, 128.0);
+    gl_FragColor = texture2D(u_texture, texCoord);
+}
+
+ 
+ 
+
+

Some files were not shown because too many files changed in this diff