[Lazarus] Fast drawing to canvas

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Fri Feb 10 16:01:04 CET 2012


On Fri, Feb 10, 2012 at 1:55 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> Would be nice if that even gets supported for Android :)

I started the Android backend with OpenGL ES, but then it prooved to
be way more work and zero advantage over directly rendering on an
Android View. Nope, it is not faster, at least not for 2D bitmap
drawing, that seams to be a myth. In X11 it is also not faster,
because it just uses the same image putting methods which any library
would use to talk to X11. And to make things worse OpenGL ES 2 removed
all the good functions to make 2D projections and changed everything.
So I gave up on it and went with the standard Android View which works
nicely. But I suppose one could put another View inside my main view
and render OpenGL there.

But remember the major catch: Android does not have OpenGL, it has
OpenGL ES, which from what I saw was immensely different from normal
OpenGL and way harder to use. This fact will also probably kill the
changes of porting TOpenGLContext to Android because this control was
made for desktop OpenGL. We would need a TOpenGLES2Context.

This salad of incompatible OpenGL libraries is really a terrible thing.

-- 
Felipe Monteiro de Carvalho




More information about the Lazarus mailing list