Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-28 Thread Felipe Monteiro de Carvalho
On Sun, Nov 27, 2011 at 7:50 PM, Sven Barth wrote: > Ok, I have now experimented myself with glOrtho (as I had to do a homework > where we need to do a simple OpenGL project (boooring) I used the time to > find a solution for you ^^) Thank you very much =) -- Felipe Monteiro de Carvalho ___

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-27 Thread Sven Barth
On 27.11.2011 17:26, Sven Barth wrote: On 26.11.2011 21:32, Felipe Monteiro de Carvalho wrote: // Displacement trick for exact pixelization glTranslatef(0.357, 0.357, 0); Untested guess: try to move your object in front of the virtual camera (which is located at (0, 0, 0) ). Thus set the Z val

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-27 Thread Sven Barth
On 26.11.2011 21:32, Felipe Monteiro de Carvalho wrote: // Displacement trick for exact pixelization glTranslatef(0.357, 0.357, 0); Untested guess: try to move your object in front of the virtual camera (which is located at (0, 0, 0) ). Thus set the Z value to something negative (e.g.

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Reimar Grabowski
On Sat, 26 Nov 2011 21:32:45 +0100 Felipe Monteiro de Carvalho wrote: >LOGW('[engine_draw_frame]'); // <<<--- I see this tons of times I hope it is printed every 16ms, else you won't reach 60 fps. ;) R. ___ fpc-pascal maillist - fpc-pascal@list

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Reimar Grabowski
On Sat, 26 Nov 2011 16:30:31 +0100 Felipe Monteiro de Carvalho wrote: > What is lit geometry? Google didn't help me here. Geometry is anything you draw in OpenGL (in CG the term mesh is preferred) and lit just means that you use lighting and must therefor provide normals, take care of setting t

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Felipe Monteiro de Carvalho
aha, color was missing, but I added it here: // Draw a square glColor4f(1, 0, 0, 1); ... to no help -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pasca

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Felipe Monteiro de Carvalho
Hello, Ok, so now I read a couple of tutorials more and I am trying to first draw a simple rectangle, but still nothing shows. I have put glGetError calls before every single call and yet nothing is returned as wrong by OpenGL ES. Here is my routine: http://svn.freepascal.org/cgi-bin/viewvc.cgi/

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Felipe Monteiro de Carvalho
On Fri, Nov 25, 2011 at 7:00 PM, Jeppe Græsdal Johansen wrote: > Are you sure width and height are powers of two here? > > And shouldn't you be calling glDrawArrays at line 158 instead of line 148? I fixed the pixel format missmatch, made width=height=128 and changed glDrawArrays like you propose

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-26 Thread Reimar Grabowski
On Fri, 25 Nov 2011 17:53:13 +0100 Felipe Monteiro de Carvalho wrote: > 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 After a quick look I have some questions: It looks like

Re: [fpc-pascal] OpenGL ES bitmap drawing

2011-11-25 Thread Jeppe Græsdal Johansen
Den 25-11-2011 17:53, Felipe Monteiro de Carvalho skrev: 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, basi

[fpc-pascal] OpenGL ES bitmap drawing

2011-11-25 Thread Felipe Monteiro de Carvalho
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 wh