Skip to content

How to handle correctly "buffers" and "sprites" to completely remove flickering ? #1116

Answered by Bodmer
mistertai asked this question in Q&A - Sprites
Discussion options

You must be logged in to vote

This is one of the more difficult tasks to achieve unless the images are small due to the limited RAM available on most low cost processors.

To answer you questions:

  1. A sprite is really just a reserved area of memory. The createSprite function returns a pointer to the memory area reserved. You have to cast this to either a 16bit pointer for 16bpp, or an 8 bit pointer for other N bpp sprites. Be aware that for 16bpp sprites the colours are stored byte swapped, so DMA can be used directly to send them to a SPI port.
  2. The simplest method is to render the jpeg directly into the sprite. However it is possible to use the pointer above as the destination memory area.
  3. You can use sprite.pushImage …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by Bodmer
Comment options

You must be logged in to vote
4 replies
@Bodmer
Comment options

@hairybaboon
Comment options

@hairybaboon
Comment options

@Bodmer
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants