Hi, I am using X11 basic on Acer Iconia One 8 tablet with Android. I tried to create an animation where every next image is made with those steps: erase the original image paint the new one - a lot of computations, plots and lines
* SHOWPAGE or VSYNC to display the new image
The problem is that very often the screen refreshes sooner than SHOWPAGE is executed so that only part of the newimage is displayed and it is all blinking. Is there any proper way how to avoid this behaviour and let the screen refresh really only when SHOWPAGE is called?
If there were any possibility to draw in some rectangular in-memory bitmap and then display it in one command, it would solve a lot for me, only it is a little difficult to use the string-like version.
Thank you
Pavel Hampl
Prague, CZ
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Pavel,
unfortunately in Android the display refreshes not only on VSYNC or SHOWPAGE. But also fo other reasons (like to thow the output of PRINT etc...). This is Android specific and I dont know how to help it.
On the other hand, you may want to speed up the time beween erasure und repainting the image. The fastest way is to PBOX (with background color) and PUT_BITMAT the image.
Use POLYLINE instead of several individual lines and/or SCOPE for points. Also splitting the animation up into several smaller images, which could be kept separately and be drawn independant of each other, could improve it.
If you are able to calculate the images in advance, then you can grab the images with GET und later PUT them (erasure automatically). This means: the whole animation would be calculated at thebeginning of the program, The individual images are stored in Strings (with GET) and later only a fast loop with PUT does the animation.
This will of corse not wrk for simulations, where you need mouse coordianes or such as input for calculating the next image.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Android" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi, I am using X11 basic on Acer Iconia One 8 tablet with Android. I tried to create an animation where every next image is made with those steps:
erase the original image
paint the new one - a lot of computations, plots and lines
* SHOWPAGE or VSYNC to display the new image
The problem is that very often the screen refreshes sooner than SHOWPAGE is executed so that only part of the newimage is displayed and it is all blinking. Is there any proper way how to avoid this behaviour and let the screen refresh really only when SHOWPAGE is called?
If there were any possibility to draw in some rectangular in-memory bitmap and then display it in one command, it would solve a lot for me, only it is a little difficult to use the string-like version.
Thank you
Pavel Hampl
Prague, CZ
Hi Pavel,
unfortunately in Android the display refreshes not only on VSYNC or SHOWPAGE. But also fo other reasons (like to thow the output of PRINT etc...). This is Android specific and I dont know how to help it.
On the other hand, you may want to speed up the time beween erasure und repainting the image. The fastest way is to PBOX (with background color) and PUT_BITMAT the image.
Use POLYLINE instead of several individual lines and/or SCOPE for points. Also splitting the animation up into several smaller images, which could be kept separately and be drawn independant of each other, could improve it.
If you are able to calculate the images in advance, then you can grab the images with GET und later PUT them (erasure automatically). This means: the whole animation would be calculated at thebeginning of the program, The individual images are stored in Strings (with GET) and later only a fast loop with PUT does the animation.
This will of corse not wrk for simulations, where you need mouse coordianes or such as input for calculating the next image.