[SDL] SDL_RenderCopy android

Sik the hedgehog sik.the.hedgehog at gmail.com
Sat Mar 9 01:16:12 PST 2013


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
>
>
>
>
>



More information about the SDL mailing list