User:Joel Reymont/Android Notes: Difference between revisions

Jump to navigation Jump to search
Line 19: Line 19:
Probably the fastest way to get output from native code is done using OpenGL ES, which is newly available in NDK 1.6. Create a texture the size of the 
screen ( it has to be a power of two on each side, so 512 x 256 if your screen is 320 x 240.) Then update the texture and render it to the screen as a screen aligned quad.  
Probably the fastest way to get output from native code is done using OpenGL ES, which is newly available in NDK 1.6. Create a texture the size of the 
screen ( it has to be a power of two on each side, so 512 x 256 if your screen is 320 x 240.) Then update the texture and render it to the screen as a screen aligned quad.  


For native OpenGL ES APIs the drawing surface is implicit in the thread. For Quake, GLSurfaceView's rendering thread sets up the context and calls the
For native OpenGL ES APIs the drawing surface is implicit in the thread. For [http://code.google.com/p/glesquake/ Quake], GLSurfaceView's rendering thread sets up the context and calls the
QuakeView's Renderer, which calls the native code, which makes the native GL calls.
QuakeView's Renderer, which calls the native code, which makes the native GL calls.


109

edits

Navigation menu