Previously we were hiding the extrema bin, now we display it "half" on
each side which sort of maps better to the concept of circular spectrum
At the same time we move the zoom spec to {center,span} rather than
{start,stop} since it makes more sense and matches the channel specs
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Apparently needed for mingw build and doesn't affect the MSVC ones.
Thanks to Martin Hauke <mardnh@gmx.de> for reporting
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Since the width/height will be set as part of the initial reshape
callback and this is done in glfw_init, we need to make sure we
do the first init of the render option _before_ that, or we'll
undo what glfw_init did.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Note that the zoom_* vars are kept as double to avoid error build-up
when changing them a lot from the UI.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
There is a lot of parameters that have no influence on the internal
computations but solely affect the rendering call. The height / width
are the only two that were supported previously.
This commit re-structures the drawing code and introduces a lot more
of those parameters. Instead of just passing them all as arguments, a
'struct fosphor_render' is introduced to hold them.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
The CL code keeps its own copy since those values are tweaked to be
applied in the kernel. We may also need the callback in the future if
instead of storing them we reconfigure the kernel at that point.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Originally I wanted the CL/GL part to be as separate as possible and
have no shared data. But it's too inconvenient since a beside the
CL / GL objects there is also configuration data that should be shared
and distributed between the two.
So instead we still have separate gl/cl state that are restricted but
the function act on a shared 'struct fosphor' object that contains
everything that's shared and exposed to both cl.c and gl.c
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>