[SDL] SDL_RenderCopy android

Gabriel Jacobo gabomdq at gmail.com
Sat Mar 9 13:48:57 PST 2013


2013/3/9 David Olofson <david at olofson.net>

> On Sat, Mar 9, 2013 at 4:06 PM, wboe <w.boeke at upcmail.nl> wrote:
> [...]
> > It would be nice if you could create apps that look like normal Android
> apps, the user
> > should see no difference. So if native Android has no problems with
> partial screen
> > updates, this should be possible with SDL-for-Android too.
>
> If you want to implement "smart refresh" on a true page flipping
> display (which is what you typically have on Android devices, in my
> experience), you need to figure out how many pages you actually have
> (usually two, but it's possible to force three or four via the driver
> in some environments), and keep one set of dirty rectangles or similar
> for each page. That is, every partial screen update will eventually be
> performed once for each page.
>
>
That's probably the case in the majority of devices, however, according to
this technical note [1], the buffers may or may not be preserved.

As it's been mentioned previously, if you really want to do it this way,
render to a texture as if you were rendering to the screen, then render
that texture to the actual screen buffer.

[1]  http://www.khronos.org/registry/egl/specs/EGLTechNote0001.html

-- 
Gabriel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130309/852583ae/attachment-0009.htm>


More information about the SDL mailing list