Re: Deprecated cogl_set_source_color4ub() in pick()





On Mon, Apr 4, 2016 at 2:36 PM, Emmanuele Bassi <ebassi gmail com> wrote:
Hi;

On 2 April 2016 at 12:12, Jiří Techet <techet gmail com> wrote:

> for some time I've been getting the following warning during libchamplain
> compilation:
>
> champlain-point.c: In function 'pick':
> champlain-point.c:151:3: warning: 'cogl_set_source_color4ub' is deprecated
> (declared at /usr/include/cogl/cogl/cogl1-context.h:675)
> [-Wdeprecated-declarations]
>    cogl_set_source_color4ub (color->red,
>    ^
>
> This is used in the pick() implementation as suggested by the clutter
> documentation (which should probably be updated):
>
> https://developer.gnome.org/clutter-cookbook/stable/actors-non-rectangular.html

The cookbook is meant to be used with pretty much the whole of the 1.0
API; the API is deprecated, but won't ever be removed at this point.

Then it's probably better to stick with it despite the warnings.
 

> 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).

Cheers,

Jiri 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]