Sprite button #2259
Replies: 4 comments 1 reply
-
Provide a complete working sketch as there are many factors involved in slow rendering. Whete size are the sprites? Also state what processor you are using and its clock speed. |
Beta Was this translation helpful? Give feedback.
-
Hello, please don't get me wrong: I'm not trying to tell that there is something wrong with the library. Just trying to find fastest solution. I have WT32-SC01 (ESP32-WROVER-B) 320x480 DST7796, running at stock and also tried at 240 Mhz. Now I'm testing project (https://github.com/andrewfernie/FreeTouchDeckWT32) with screen filled with 4x3 buttons 105x90 (don't really remember exact size) with 75x75 icons on them. I see that specific "non sprite draw effect" which I want to get rid of. So ok, project has some speed-related issues and redraw is one of them (but absolutely not the main). I'm thinking of rewriting this all to sprites, so the button with icon would refresh nice and smooth, so this is my main goal. |
Beta Was this translation helpful? Give feedback.
-
For preformatted 16 bit images you should be able to refresh the entire screen in 50ms with a 40MHz SPI clock. Add to this the time it takes to fetch and process pixels to get the screen refresh time. 16 bit pixels images stored in arrays will be fastest to render as the pixels are simply copied to the screen. Fetching from a filing system will be slower. Preparing all sprites in advance of rendering would be a good option as that ESP32 has plenty of PSRAM to hold entire screens. |
Beta Was this translation helpful? Give feedback.
-
thanks for advices, I was already thinking about using PSRAM, because as i yesterday found out - file system is about 70ms delay on each image :( . but I never dialed with PSRAM before. "Preparing all sprites" means store images in psram and draw them from there instead of file system? and draw buttons like they are now? |
Beta Was this translation helpful? Give feedback.
-
Hello. I'm working on a project which has a matrix (3x4 to 4x5) of buttons with images. Drawing them directly takes hell long of time, so using sprites would be great idea. Unfortunately i haven't found any way to do this. So i just wanted to make sure that I'm not missing something and there is no such functionality now? And maybe you have an idea how to implement this?
Beta Was this translation helpful? Give feedback.
All reactions