[SDL] SDL_RenderCopy android

Jonathan Dearborn grimfang4 at gmail.com
Sat Mar 9 05:35:44 PST 2013


You can always buffer them yourself (render to a texture).  Then the only
substantial logic change is to copy that buffer to the screen each frame.

Jonny D


On Sat, Mar 9, 2013 at 4:16 AM, Sik the hedgehog <sik.the.hedgehog at gmail.com
> wrote:

> Sam is right though, neither OpenGL nor Direct3D guarantee that the
> back buffer contents will be defined after a swap, i.e. you have to
> assume they're garbage and you have to redraw the entire screen. I
> believe OpenGL ES is the same in regards to this.
>
> Widgets go through a completely different rendering pipeline as far as
> I know, so they aren't affected by this limitation.
>
> 2013/3/9, wboe <w.boeke at upcmail.nl>:
> > Sam Lantinga wrote:
> >
> >> You also can't use it on other platforms reliably.  The general
> >> recommendation on all platforms is to draw the entire scene each frame.
> >> Hardware textures make this generally cheap.
> >
> > Please don't forget that SDL is not used only for games, where it is
> quite
> > normal to redraw the entire scene at every frame. 'Normal' applications
> > however, e.g. musical instruments, consist of many small widgets that are
> > modified now and then and only partially. Following your recommendation
> the
> > developer would be forced to recalculate and redraw the whole screen
> even if
> > only one small widget needs to be modified. Maybe the application has
> better
> > things to do, e.g. calculate complex waveforms or animations.
> >
> > Pure Android, without JNI, works perfectly also with partial screen
> updates.
> > It is notable that after screen initialisation, the first time that one
> > widget is modified, the entire screen is redrawn. Later on, only the
> widgets
> > that are modified are recalculated and redrawn. The widgets are not
> double
> > buffered, their shape is recalculated when needed. It would be very
> > favourable if SDL for Android could mimic this behaviour.
> >
> > I have the feeling that the problems as reported by the OP are similar
> to my
> > experiences with SDL for Android tablets that I described two or three
> times
> > in this forum. Next week I will get a very recent tablet that probably
> will
> > show this bad behaviour clearly. I am hoping that my hacking skills will
> be
> > sufficient to find a general solution!
> >
> > Regards,
> > Wouter
> >
> >
> >
> >
> >
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130309/aae87292/attachment-0009.htm>


More information about the SDL mailing list