Fixed FBO initialization bug, when depth only FBO is requested.
Fixed FBO initialization bug, when depth only FBO is requested.
Added brand new TeraOVR library to Terasology and implemented head tracking support for the Oculus Rift - not fully finished yet but it is working quite nicely! Note: The DLLs have to be placed into the natives folder manually at the moment.

* All those fancy constants needed to setup the stereo projection can now be dynamically retrieved from the Oculus device using TeraOVR
* Did some cleanups here and there
Fix head tracking singularity when "looking behind".
Oculus VR tracking now works in combination with the mouse and keyboard. Works very, very solid now!

* Don't serialize the view roll value together with the player component... Or be prepared for serious motion sickness issues when restarting the game.
* Some minor cleanups and refactoring
Added various improvements for the Oculus VR integration.

* The scene is now rendered to render targets which can be larger than the actual size provided by the Display class - this is currently used to compensate for the lens correction algorithm which needs the final result to be upscaled afterwards. To avoid a loss of quality (and an even more pixelated image in the Rift), the render targets are scaled by the scale factor used for the lense correction algorithm beforehand and get downsampled in the end to the actual display width and height.
* Fixed that rendering the scene multiple times for each eye caused the render queues and the thus the triggered chunk updates to become a bit confused - optimized this while I was at it (don't fill the shadow render queue multiple times, ...).
* Disabled motion blur when Rift support is activated - dear lord... that nearly made me puke on my desk
Merge PR #566 from @skaldarnar - L&S content
Merge PR #565 from @jobernolte - FBO bug
Overhauled screenshot functionality to use one of the scene FBOs being used in the background. Using the recent features added for the Oculus, screenshots are now taken using a much higher resolution (twice the size of full hd).
Adjusted scale factor for the Oculus.
Merge pull request #593 from skaldarnar/lightAndShadow

Updated some textures.
Fixed that the frustum for the second eye was not up-to-date when using the Oculus Rift. Also did some improvements and cleanups in the camera classes...

* Matrices are no longer updated each frame if nothing changes
* The frustum gets updated using the camera matrices, not the currently set OpenGL matrices on the matrix stacks
* The frustum for the camera gets updated if the matrices get updated
Maybe fix for issue #472.
Maybe fix for issues #511 and #522 (eye adaption related - please check).
Some more safety checks for the PBO / eye adaption related issues on some platforms (see issues #495, ...).
Forget my last commit... Misread the issue. Undoing some of my changes that are not necessary.
Adds a lot of safety/null-ptr checks to the Default Rendering Process and some of the specialized Shader Parameters classes if some of the FBOs are not available.

* Adds helper methods for binding FBOs and FBO textures to the Default Rendering Process which check if the FBO is available beforehand
Fixes that the previous view projection matrices were not reset correctly since the recently introduced dirty checks (caused blurry screens without actually moving the camera).

* Adds some minor cleanups in the Camera classes
Tweaks some chunk updating and chunk rendering related things in the World Renderer class.

* Removes "maxChunkVBOs" from the config - keeping a minimum of 512 VBOs on the GPU now
* Changes that all chunk VBOs in the area are kept from now on instead of only those, which are in the current view frustum - removes constantly plopping chunks in distant areas while introducing a performance penalty on systems which are not capable of the selected viewing distance
* Fixes that the shadow frustum could never capture the shadows for the whole area since most of the chunks were either not available or not loaded
* Changes that all chunks in the area get queued for updates - and not only those which are in the view frustum... You don't have to keep looking in all directions all the time just to make sure the whole world is actually being loaded
Fixes typo.