Fix Deadlock issue

The Node has a QReadWriteLock and the QChangeArbiter a QMutex.

In the case where QChangeArbiter->registerObserver is called, the mutex is
locked and the observer Node's QReadWriteLock gets locked.
If at the same moment on the same Node within a different thread
notifyObservers is called, the QReadWriteLock gets locked and a call the
QChangeArbiter->sceneChangeEventWithLock is called which tries to lock the
mutex and eventually waits forever.

This scenario results in a DeadLock. It was fixed by unlocking the Node's QReadWriteLock
right after the QChangeArbiter is retrieved in notifyObserver so that sceneChangeEventWithLock
can be called with the Node's QReadWriteLock unlocked.

Change-Id: Ib3f6f5042239f3ad5a32daa0010aadbfe9fe3604
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Removed unused methods in RenderMaterial

Change-Id: I633000ff763ab8e15e5f463814ad8527044562ec
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
List of Parameters in Effect

Change-Id: I6d3e0d8bb62db412c1a48f98f0323c61904503c8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Quick3DEffect has a QQmlListProperty of Parameters

Change-Id: I2341672fd65682f3323ab0c4046b168d351e0c07
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Removed RenderBin and Drawable

Those were part of an initial work that was replaced by RenderView /
RenderCommand.

Change-Id: I93b832610667b74a136f234fcbfae296ffc68075
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Removed repetition of (void) in Assimp's unzip crypth.h and ioapi.c

This is likely the result of the merge with the Assimp 3.1 upgrade.
gcc doesn't issue any warning at all. On the other hand this causes errors on
Windows.

Change-Id: I7bd4bdd0915ac0c225e85268aa9d8c7834e7a65a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reordering order of creation of Jobs and QGraphicContext

QJobs for the current frame used to be created even if the QGraphicContext
hadn't been enabled. That meant that a few frames worth of RenderCommands were
created before having the QGraphicContext created. With the TechniqueFilter in
RenderView requiring a way to access OpenGL context properties to filter based
on the OpenGL version or extensions, this was reordered.

While the QGraphicContext hasn't been initialized, the Renderer returns no
Jobs to be computed. This ensures that RenderViewJobs will only be created
after the QGraphicContext so that they can access GL properties.

An interface exposing GL properties will be added in follow-up patches.

Change-Id: I3dea5f52fb97803f02c2f066037c999f85e02f74
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Moved out of DrawState all GL calls

Added needed methods to the glHelpers and QGraphicContext.

Change-Id: I60dcdb91cbb72e41cd57cf229df4beb167ebb6db
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QGraphicContext queries shader uniforms and attributes

When a program shader is created, we retrieve the list of uniforms names and
locations and attributes names and locations.
This will allow us to efficiently see if Parameters provided by a Material are
needed/missing in a shader rather than relying on querying their location to
check their presence.

Change-Id: I611332ef2bd1d7c2bda50d30f0ec06cf059c3e3b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Move the bindinds of Uniform out of QUniformPack

QGraphicContext and QUniformValue now handle the bindings of uniforms with a
GL Shader.

A bit confused at the moment where StandardUniform should be defined. Should
we assume a documented name, should that be customizable through the shader.
Lots of pieces that could fit equally well in separated places. Trying to find
the best way to do so. Ideally we should assume that we could switch the
QGraphicContext to work with a different Graphics API. That forces to abstract
Uniforms, Attributes, Buffers, Shaders so that QGraphicContext is the only
class manipulating raw GL context.
Maybe rename QUniformPack to QParameterPack, StandardUniform to
StandardParameter ...

Change-Id: I84f175cf7c613183d70458da034847b9c7c6af83
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Use nicer syntax to lock MeshDataManager

Change-Id: I1621b807d68f4844d67c0e2f7f839610f9bcf45e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Improved Technique selection

RenderTechnique are now index by QAbstractEffect instead of
QAbstractTechnique.
That way we can detect with a RenderEffect and its peer if we have a
RenderTechnique associated or not. Also the technique filtering occurs only
when the RenderTechnique is created. This assumes that the TechniqueFilter
criteria have a constant value.

If we need to monitor TechniqueFilter for criteria updates, that requires
having a way to set the TechniqueFilter to dirty and implementing a locking
mechanism in RenderView to properly access that dirty flag.

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

The goal is to have RenderMaterial, RenderEffect and RenderTechnique contain a
ParameterPack.
Each of the frontend Material, Effect and Technique should post a notification
when a Parameter is added or removed.
Upon reception of that notification in the backend classes should add the
Parameter to the ParameterPack. In turn, ParameterPack will register itself as
an observer of the Parameter and receive notification when the Parameter's
value is updated.

For that to work, Parameter should be converted to a Node so as to be able to
be registered as an observable.

Change-Id: I26373c8dc4006b4e41f2bcde8aec0d9ca751bc8a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Parameter Node instead of QObject

Change-Id: Ie55f671fc079b8983be59f72fa6371ca95a974b5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
ParameterPack monitoring Parameter peers

Change-Id: I8c61d2d0971e436b3a0dabb736fbadfaada8f532
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
ParameterPack observing Parameters

Also corrected Renderer to RendererAspect.

Change-Id: I22a90ddf04f3e6cbeb48e6ea6d9d7729a01a7fb9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Updated RenderMaterial to work with QUniformPack

Change-Id: Id9242a6f23605f4c951edd2a4e70d1c6b6cfc547
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Parameter emits a notification when value is changed

Change-Id: I216ec33b01eed56a93f720b45d8c857b530b3aaa
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Effect emits notification for Parameters

Change-Id: Ie21eb08488b10c90aca81b996289df01f5a9ee3c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Small fix in Material

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