Add QBoundedCircularBuffer and test

Change-Id: Ied0bd701fa653396b657ea5c2f2097eb7a425953
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
RenderNode using Handles

A RenderNode now holds a handle, a parent handle and handles to its children.
RenderNodesManager sets the handle of a RenderNode when a RenderNode is acquired.

Change-Id: I25f4fbb25b6a512dd815aa8671a2f85443365035
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
RenderQueues of RenderView

RenderQueues class uses a QBounderCircularBuffer to store computed
RenderViews of a subset of the following few frames. This allows
for RenderViewJobs to compute future frames while the current frame
is being rendered. In case the RenderView submission takes too long,
the RenderView jobs will eventually be locked to allow the Renderer
to catch up and not miss any important state change.

This implementation tries to minimize the time needed to synchronize
the job threads with the rendering thread while providing thread safe
access to the queues if used correctly.

In RenderThread, the exec loop is replaced by a rendering loop and
the RenderQueue has been properly added to the Renderer.

Change-Id: I44f1f4065cdc7f39a8957a26114a905ea437834b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
MeshManager reference MeshData by Entity Uuid

That way a RenderNode that has a frontEndPeer of type Entity can
retrieve the MeshData associated.

Change-Id: If95402d9af3a2642bfdf57aef345a84be7fec5a3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
WorldTransform and UpdateBoundingVolume jobs

Corrected and completed UpdateBoundingVolume jobs.
Added WorldTransformJobs and UpdateBoudingVolume jobs in rendereraspect.
Set default localTransform value from Transform component for each
RenderNode that has a Transform property.

Change-Id: I985598dbc0d4c5da4300210ec5f27e7317a6f895
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
RenderCommands fillings

Builds a set of RenderCommand for each RenderView.
The MeshData and worldTransformMatrix are set. The shader and
uniforms bindings aren't set at the moment. This should be done
in a follow up commit once I've properly figured out how to
associate a Shader to a Mesh a Material a RenderPass and an Effect
without relying on a RenderMaterial, RenderShader, RenderTechnique
so as to have a more data driven approach. A default shader and
uniform bindings should be sufficient for now.

Change-Id: I7a69ead2361b18a9d7b2554f090354f54d74303d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
FrameGraphNode appendChild fix

The parent node was not properly set when appending a child FrameGraphNode.

Change-Id: Iebe0a503ecc2e8783f1c4a248cffada9523f5eb0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QGraphicsContext setViewport

Allows to set the viewport independently of the camera. The Viewport
used to be set in the Camera. With the FrameGraph, the Viewport is
now independent of the Camera. This required a few modification the
QGraphicsContext.

Change-Id: I15899a6ba43ab8bd43cc0dc7c1361c9097216129
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Updated simple-qml example

Change-Id: I38abcbfe81bf9fff39863977dc637a060b15a765
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
LoadDataMeshJob fix

MeshData was not properly copied.

Change-Id: I515bb6bf2009bdc5f017453babb6f4606c8fc625
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Basic Rendering using the FrameGraph

Renderer is no longer a QObject. Therefore the RendererAspect can no longer
employ QMetaObject::invoke to call the setSurface method. As setSurface is now
called in the context of the RendererAspect/QAspectManager thread, the
QGraphicsContext instantiation can no longer take place in setSurface.
The QGraphicsContext instantiation is now performed in submit RenderView if it
appears that the Renderer's QGraphicsContext object is null. That ensures that
the QGraphicsContext, the QOpenGLContext and the QGraphicsHelper, which
initializes the GL functions, are now created in the RenderThread.

RenderView objects are now submitted in Renderer which initializes the scene
with the Viewport and Camera.

RenderCommands are submitted in the RenderThread and meshes are rendered using
a default Material and a default Technique.

Change-Id: Ic16833b860270bede25278d02475ff9b559fcaf2
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Nested Viewports

Allows to set up multiple viewports. A child viewport defines
a region relative to the parent viewport. In Qt3D viewports are
defined from the top left unlike OpenGL which defines from lower
left. Viewport values should be in the 0-1 range.
Simple-qml updated with 1 viewport with 2 nested viewports.
Each sub viewport displays the same scene using a different
camera.

Change-Id: I7743c2518d49f0d3d48fe56a6e9f4b133302511b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Camera Fix

The wrong patch was submitted regarding the Camera entity element.
This is what the camera element should be like.
Simple-qml example updated to use it.

Change-Id: I4b21d7d4af62c8f29678769bd59815508a8a8a52
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
MaterialManager

Change-Id: Ic2601b1063bdbe49c574fc7b01ae53529fcde7c4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Categorized logging in Renderer

Logging categories in Renderer :
-Backend
-Frontend
-Framegraph
-Io
-Jobs

Also cleaned up things here and there while going
over various classes.

Change-Id: I8bf1da0769c764621236dc45e954d193c768e2af
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>