Added Terrain support:
- New Terrain class for rendering heightmap based terrains. Terrains can be attached to Nodes, similar to Models.
- Terrain LOD support, multiple surface layers (texture splatting), flexible heightfield sizes, full transform (including scale) support, physics, and more.
- Header files are well documented and additional documentation and samples will be provided later.
- Removed the ability to create heightfield collision shapes from Images as this was error prone and not very accurate. Replaced this with a Terrain::HeightField class that can now be used to construct both heightfield collision shapes, as well as Terrain.
- Added a object-space normal map generation to gameplay-encoder, which is useful for generating terrain normal maps. This option can generate normal maps from PNG, RAW8 and RAW16 heightmap images.

Various other small changes and fixes:
- Added support for setting the depth compare function on render state.
- Added support for texture/sampler arrays being passed to materials.
- Fixed a couple minor memory leaks in the physics code, which were likely to be affecting anyone up to this point.
- Fixed typo in PhysicsRigidBody::Parameters constructor initializer that caused restitution to not get initialized properly, which could lead to erratic behavior for the rigid body.
- Fixed an issue where physics debug drawing for large scenes would cause the internal MeshBatch to grow to an enormous size, using large amounts of memory.
- Added support for preprocessor directive NO_LUA_BINDINGS in the gameplay project to omit inclusion of generated lua bindings in compilation. This does not disable the LUA runtime, but simply prevents all generated lua bindings from being compiled into gameplay. This is mainly a development feature to speed up compile time when making frequent changes to gameplay header files (which otherwise would result in a recompile of all lua bindings). In order for this to work you also need to remove all lua_ files from your project.
Merge branch 'next' of https://github.com/blackberry/GamePlay into next

Conflicts:
	gameplay/gameplay.vcxproj.filters
Merge branch 'next' of https://github.com/blackberry/GamePlay into next
Added support for specifying depth function via the "depthFunc" string in materials.
Added support for defining terrains in .scene files, both inline and through external references.
Added support for defining inline camera's in .scene files.
Added support for defining .scene files without a 'path' (GPB/bundle) file. New nodes can now be created in the .scene file if an ID is used that does not exist in the bundle. This changes scene loading behavior so that it is no longer an error when a node is found that does not exist in the bundle. Instead, a new empty node is created when this occurs.
Added support for setting a light color and light direction on scene. Used to store and bind directional light information for simple lit scenes that have at least one main directional light (i.e. the Sun).
Added material auto binding support for SCENE_AMBIENT_COLOR, SCENE_LIGHT_COLOR and SCENE_LIGHT_DIRECTION.
Updated Lua generator to only write generated files if they differ from existing files. This will reduce both build times and committing of unchanged script binding files.
Added static Scene::getScene(const char*) to query currently active scenes in a game.
Change to allow multiple translate, rotate and scale commands in a single node entity within .scene files. The commands are applied in the order that they are declared.
Added methods to PhysicsCollisionObject to allow conversion to subclass types (i.e. PhysicsRigidBody, PhysicsCharacter, etc) from script.
Merge branch 'next' of https://github.com/blackberry/GamePlay into next
Minor fix in AudioListener to remove camera transform listener in destructor, which sometimes caused an access violation during game shutdown.
Fixed crash that could occur when calling Game::exit() from a script function, due to the order of subsystem finalization and destruction.
Fixed normal vector generation and transformation for terrain.
Completed Terrain::getHeight() and fixed PhysicsRigidBody::getHeight().
Merge branch 'next' of https://github.com/blackberry/GamePlay into next
Big changes to the Gamepad class.
Adding gamepad support to BB10.
Updating the gamepad support in Win32 to work with the new Gamepad API.
Modifying various tests and samples that make use of gamepads so they continue to work.
Adds a little fix to the Lua generator for when Doxygen doesn't put an includeElement in a file's XML.
Clamps a percentage in AnimationClip that was causing crashes when animations were triggered while an app was minimized (e.g. when RacerGame::GamepadEvent was called while on the Bluetooth settings screen in BB10).
Merge branch 'next' of https://github.com/blackberry/GamePlay into next
Minor fix to input test for non-mouse case. Make sure the mouse capture button doesn't show up when it shouldn't.
Polishing the BlackBerry platform's gamepad support by correcting joystick normalization and
adding known devices.
Adding a GamepadTest to the test app.
Merge pull request #681 from ablake/next

Gamepad API changes.
Merge pull request #680 from kwhatmough/next

Minor fix to input test for non-mouse case. Make sure the mouse capture ...
Generate Lua bindings to fix build error.
Merge pull request #683 from kwhatmough/next

Generate Lua bindings to fix build error on Windows (Mac still needs attention...).
Added new source and resources files for terrain feature to all platforms except Mac.

Implemented debug bounds drawing for terrain.

Added support for loading uncompressed DDS textures for the following formats: R8G8B8, A8R8G8B8, A8B8G8R8, X8R8G8B8, X8B8G8R8. Using DDS uncompressed textured rather than PNG files results in both increased texture quality (better mipmap generation, especially on current mobile gpus) and faster load times when using mipmaps. XBGR DDS formats are preferred as they require no color conversion and result in the fastest load times.

Added glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST) to prefer higher quality mipmap generation.

Optimizations to terrain shaders.

Changed default texture minification mode from GL_LINEAR_MIPMAP_LINEAR to GL_NEAREST_MIPMAP_LINEAR for newly created textures with mipmaps, since this is the expected OpenGL default value.
Merge branch 'next' of https://github.com/blackberry/GamePlay into next

Conflicts:
	gameplay/gameplay.vcxproj.filters
	gameplay/src/Game.cpp
	gameplay/src/lua/lua_Global.cpp
Removing GamepadButton by adding _dataBinding member to Button.
Changing Gamepad::ButtonMapping enum values in order to remove getButtonMappingByIndex() which was a clunky and slow way of doing things.
Fixing crash in Game::shutdown() with Steve's fix.  (Thanks for catching that!)
Initializing UI pointers to NULL in Gamepad.
Correcting joystick normalization in Windows.
Updating Lua bindings.