Re: Deprecated cogl_set_source_color4ub() in pick()



Ah, right, on master we updated the Cogl 2.0 version of cogl_path_fill() to just take the pipeline and framebuffer pointers. One reason we would have gone back on the the addition of the cogl_framebuffer_ namespaced functions for 2.0 would have been to get to the point where cogl-path was strictly a utility library implemented in terms of lower-level Cogl api's so it could be split out. Not sure why that change never made it to the cogl-1.x branch but the deprecation change did :-/

Regards,
- Robert

On Mon, Apr 4, 2016 at 1:35 PM, Lionel Landwerlin <llandwerlin gmail com> wrote:
Hey Rob,

There is something weird about those APIs though, they're marked as deprecated :

/**
 * cogl_framebuffer_fill_path:
 * @framebuffer: A #CoglFramebuffer
 * @pipeline: A #CoglPipeline to render with
 * @path: The #CoglPath to fill
 *
 * Fills the interior of the path using the fragment operations
 * defined by the pipeline.
 *
 * The interior of the shape is determined using the fill rule of the
 * path. See %CoglPathFillRule for details.
 *
 * <note>The result of referencing sliced textures in your current
 * pipeline when filling a path are undefined. You should pass
 * the %COGL_TEXTURE_NO_SLICING flag when loading any texture you will
 * use while filling a path.</note>
 *
 * Stability: unstable
 * Deprecated: 1.16: Use cogl_path_fill() instead
 */
COGL_DEPRECATED_IN_1_16_FOR (cogl_path_fill)
void
cogl_framebuffer_fill_path (CoglFramebuffer *framebuffer,
                            CoglPipeline *pipeline,
                            CoglPath *path);


I was a bit surprised when reading through the code. Could there be a mistake there?

Cheers,

-
Lionel


On 04/04/16 13:31, Robert Bragg wrote:
Cogl 2.0 added framebuffer drawing apis that took a pipeline argument like cogl_framebuffer_fill_path(fb, pipeline, path) and cogl_framebuffer_stroke_path(fb, pipeline, path); which removed the dependence on the source stack.

COGL_ENABLE_EXPERIMENTAL_2_0_API had to be defined to expose those apis via cogl-path.h.

I can't quite remember how CoglFramebuffer is exposed within Clutter but guess it would be possible to use those apis to avoid cogl_set_source_color_4ub().

Regards,
- Robert


On Mon, Apr 4, 2016 at 12:59 PM, Jiří Techet <techet gmail com> wrote:

On Sat, Apr 2, 2016 at 6:32 PM, Lionel Landwerlin <llandwerlin gmail com> wrote:
Hi,

I don't think there is a path forward for using the CoglPath API :/
You'll always end up using a deprecated function as far as I can tell.

And is there anything else than CoglPath API? I'd expect that when a function got deprecated it got deprecated in favour of something else. If there's no alternative it shouldn't have been deprecated.

Cheers,

Jiri






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