[fpc-pascal] OpenGL ES bitmap drawing

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Fri Nov 25 17:53:13 CET 2011


Hello,

This is a kind of "take a look at my code please" question. Normally I
avoid that kind of question, but in this case my cluelessness is big
enough that it would really be excellent if someone could throw some
light here.

Well, basically it is simple, I have a working Android application
which draws a green gradient in the screen. Of course that a green
gradient is useless, I want to draw a bitmap.

There are lots of tutorials on the web, but they are mostly in Java
and I am battling with the C ones to see if I can figure someone out.

So far I managed to get this:

http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/lcl/interfaces/customdrawn/customdrawnobject_android.inc?view=markup&root=lazarus

The relevant code goes only up to line 300 aprox. and the real drawing
is in the procedure engine_draw_frame

I draw the image at line 108, it should be a red rectangle on a black
background. There do is a pixel format missmatch, but I still would
expect to see something, even if a malformed image, but here I get
nothing... =(

I would be immensely greatful if someone could take a look and throw
some hints here at what is necessary to get this working.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-pascal mailing list