If I could suggest, using OpenGL ES instead of OpenGL should make it more portable. Most platform hardware accelerate OpenGL ES, only few accelerate OpenGL.

This is a video comparaison on the cubieboard2 (finally managed to use HDMI->dvi output, recorded with a camera), at the left glmark (OpenGL), at the right glmark_es2 (OpenGL ES):

I don't think every advanced functions of OpenGL are needed in the case of MyPaint.

http://popolon.org/cubieboard/demos_video.201310/glmark_glmark-es.720.m4v

OpenVG is another solution, as everything is 2D vector graphic in mypaint.

LibEGL is the common interface for both:
http://www.khronos.org/egl/

Regards,

Popolon

Le 2013-10-05 14:02, Jon Nordby a écrit :
Hi Marko,

I do not know if anyone has actually tried to implement a GPU backend
- but it is something I've given quite a bit of thought. The idea is
briefly documented in brushlib/PERFORMANCE
https://gitorious.org/mypaint/mypaint/source/master:brushlib/PERFORMANCE

Blending of the dab onto the surface is the responsibility of the
MyPaintSurface backend. For the normal CPU tiled version, that code is
found in brushlib/mypaint-tiled-surface.c and brushlib/brushmodes.c.
Search for "draw_dab_pixels_"

In addition to a surface backend, you will likely want a way to
display the surface on screen - so that is the other thing that needs
implementing. This could/should be OpenGL based, using the
OpenCL+OpenGL interoperability if the surf backend is in OpenCL.

For making full advantage of such a backend in MyPaint itself, one
would also have to implement layers etc. on the GPU side.

On 4 October 2013 23:30, brdavs <[email protected]> wrote:
Hi,

I have been browsing through brush engine in mypaint.
I am wondering if anybody has tried to implement the
backend in OpenGL/OpenCL.

If I understand correctly, the "only" thing that is needed
to get brush engine working is to implement GPU-backed
MyPaintSurface with appropriate methods. Correct?

One thing that is not immediately obvious to me is where
does blending occur. Namely, when you draw a dab
where does the blending occur? It seems that one would
want that to be done on the GPU as well.

Is there anything else that would have to be rewritten to
take advantage of the GPU?

Thanks,

Marko

_______________________________________________
Mypaint-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to