Yep, this is another one of my "famous" sweeping rewrites. Expect things to break.
Goals for this are:
- Greatly simplify node connections (particularly with arrays) so the code requires less maintenance/is more stable
- Redesign node structure to address issues where UI would stall for lengthy periods of time
- Less reliance on shared ptrs/greater reliance on QObject system for inheritance/memory management
- General code cleanup and improvements
The macro defined namespaces confused the hell out of lupdate and more or less broke translations permanently. Looks like the only way we can do it is to have a hardcoded namespace, which goes against my instinct, but honestly how likely is it that we'll change the namespace anyway (I guess forks might want to do it, but that's their problem ;) )
- Abstracts all OpenGL functionality including UI objects
- Cleans up several rendering codepaths
- Improves threading functionality
- Removes old code and problematic functions
Implements a very basic GLSL deinterlace that simply halves the vertical
resolution and then interpolates between the fields. This can be toggled
on or off.
The reasons for being so basic is:
- Speed, very quick code running in OpenGL
- It would seem the highest quality deinterlacers are temporally based
which doesn't make much sense for the viewer, particularly since we can't
double the frame rate since our timecode is fixed to the frames.
Higher quality interlacing/deinterlacing will be present in the actual
renderer.
There are now two functions to get the full matrix for the transformed
image. One that returns as is and one that returns with the Y
translation flipped for OpenGL.
Also some minor bug fixing.
Pixel sampler now works with a zoomed/translated image. As usual we
have to flip the y translation as OpenGl stores images upside down.
Need to look at a better way of handling this.
Added a new function that inverts the world transform and applies it to
a point. This allows the gizmo code to work in it's own space and not
need to know is the image has been zoomed or translated.
Viewer init was kind of too late since in many cases the sequence
would start caching and crash the app before the user could even read
the message. Moving to the startup makes it clearer from the beginning.
Original fix was wrong, this sorts it out I think. Delta values had to
be doubled as we're in Clip space (I think) and the matrix
multiplication order had to be swapped around.
Updated one of the signla/slot pairs to be simpler as we no longer need
to pass the zoom percentage back and forth.
If Hand Tool is selected we can now drag with a left click AS WELL AS
middle click. This keeps the view behaviour in line with other widgets
in Olive.
For simplicity it does not use handmovableview.
The translation needs to be scaled relative to the zoom percentage so
we get sensible movement when dragging. Dragging is also disabled when
the image is smaller than the container widget.
Re-orders the initialisation of some variables to stop a compile
warning on Travis.
Had to separate zoom and translate matrices to stop the zoom being
applied to itelf. This also required adding separate get/set functions
for each matrix and a GetcombinedMatrix() funtion.
Added those functions ot other files where needed ut may be wrong. Need
to look at export.cpp
Also changed the mouse move and press events to make translation work.
The nodes now have more control over how their accelerated shaders/sample
functions are run, as well as how items are popped off the value tables.
This allows for various optimizations that we didn't have access to before.
Improves minor issues with frame queue implemented in earlier commit. Also links
ViewerWindow with the queue and a separate timer to make it much smoother.
Rather than have to decode EXRs and display them in the span of one frame,
decode into memory ahead of time so that they're ready for upload. Has the
potential to speed up playback by about 5-6x.