Re: Deprecated cogl_set_source_color4ub() in pick()
- From: Emmanuele Bassi <ebassi gmail com>
- To: Jiří Techet <techet gmail com>
- Cc: "clutter-list gnome org" <clutter-list gnome org>
- Subject: Re: Deprecated cogl_set_source_color4ub() in pick()
- Date: Mon, 4 Apr 2016 15:23:04 +0100
Hi;
On 4 April 2016 at 13:56, Jiří Techet <techet gmail com> wrote:
What should be used instead of the deprecated call?
You'll likely need the 2.0 experimental Cogl API that Clutter itself uses.
My first question would, on the other hand, be: why are you trying to
define a non-rectangular pick shape?
libchamplain supports various markers displayed on the map. These markers
can be clicked, drag-and-dropped etc. so they have to be pickable and can
have various shapes (one for instance looks like a rounded rectangle with a
tick pointing to the given point on the map).
As I assume the markers are textures, can you not use a texture mask, instead?
Create a pipeline for picking, reusing the texture with a different
blend function and then use the pick color as the combined color.
Something like this:
https://git.gnome.org/browse/clutter/tree/clutter/deprecated/clutter-texture.c#n600
and:
https://git.gnome.org/browse/clutter/tree/clutter/deprecated/clutter-texture.c#n661
It's probably a bit more complicated than drawing the path twice, but
at least it would avoid clobbering the stencil buffer using the path
API.
Ciao,
Emmanuele.
--
https://www.bassi.io
[ ] ebassi [ gmail com]
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]