Since this is not actually executable, don't need it and it apparently
creates some warning when making RPM packages ...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Since we always call swap buffer between a call to draw and
the next call to process(), we don't need it. In the future,
make this an option in case there is some usecase that require
it.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This app is CL 1.1 compatible and so we're forced to use some API
that were deprecated in 2.0, no need to be constantly reminded of
it
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
I originally used 1.5 compatibility because it still allows immediate
mode / fixed pipeline without warning. But Intel Cards on linux and
OSX in general don't implement it.
Using 1.3 works fine since I don't need anything more recent, but
if you display the compilation results, it will for a deprecation
warning.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
GL_MODULATE is required and since it might be used in other mode for
other function, we need to set it explicitely.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Much faster than glTexImage2D since it only updates the data
and doesn't delete/create a new storage space for the data.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
If no data was processed, finished would return 0 and then the gl_refresh
would not be called which would lead to the GL deferred init to not be
executed which can crash the OpenGL driver.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
- Update the GrXXX modules from the GNURadio counter parts
- Remove the included FindGnuradio and rely on the installed one
(force 3.7.3 since previous ones are broken)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Although in theory there is nothing wrong with this and fosphor itself
should support it. However it seems some OpenCL implementation don't
really like having multiple context created in parallell, so we prevent
this manually here.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This has been removed of Gnuradio iteself in 2012 and this seems to
be causing issues for some OOT on some platforms ...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
The basic idea is that we just create normal CL buffers, then whenever
we need to draw, we wait for CL completion, read the buffers into the
main memory and upload them as textures using plain GL.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
When calling the process method several time without drawing, we don't
need to release the GL objects or even calling clFinish. So here we
internally keep track and only do the 'finishing up' of the CL process
when doing a drawing call.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
The OpenCL 1.2 is nicer but we can't always use it and on linux,
even if the CL_VERSION_1_2 exists, we can't trust it because distrib
sometimes have CL 1.2 headers with a CL 1.1 dispatcher.
So instead, we only assume we have 1.1 header and lib at compile time.
Then at run-time we do a dynamic lookup of the 1.2 symbols from the lib.
We also check if the actual selected platform does support 1.2 (you
could have a 1.2 dispatcher with a 1.1 platform implementation).
If both conditions are satisfied, then we dispatch the call to the 1.2
implementation and if not, then we dispatch them to a local fallback
implementation of the functions (but limited to the functions we need)
It's not pretty but it should work and it isolates all the hack magic
inside cl_compat.{c,h} and you just use the CL1.2 API normally outside
of it.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
cl_platform.h will convert any sign of windows to this symbol and this
is also the one use for the include at the top, so use it everywhere.
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>
Without caching, this would cause a problem with headers not being found
if you did the cmake step twice because the FREETYPE2_FOUND var is cached
and so it wouldn't run through that script again and wouldn't set
FREETYPE2_INCLUDE_DIRS.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
'over' variable needs to be an integer or we'll end up shifting stuff
by half a pixel which causes weird render, especially for fonts.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>