double buffering or alpha blending on EVE

FTDI/Bridgetek EVE2 & EVE3 & EVE4 SPI TFT Series by Matrix Orbital

Moderator: Mods

Post Reply
photonic
LCD?
Posts: 2
Joined: Wed May 19, 2021 10:17 am

double buffering or alpha blending on EVE

Post by photonic »

Hello,
I would like to do double buffering graphics for the purpose of an oscilloscope screen. Can this be done on an EVE SPI based display? If so, which one and how? I am looking for at least 480 px wide screen, preferably 800 px wide.

The idea is to write to a zone of memory that is not actively displayed while the LCD controller is displaying from a second memory buffer. When I am done, I get the LCD controller to display from the first memory buffer while I do graphics on the second.

Another similar possibility is to use some kind of alpha blending where I change the visibility. Another way is to wait for some kind of vertical blanking.

Thanks,
Frank

Rudolph
LCD Guru
Posts: 67
Joined: Wed Feb 28, 2018 11:09 am

Re: double buffering or alpha blending on EVE

Post by Rudolph »

At its core EVE always is double buffered, the display list.
So you just would need to work with two graphics and refresh the display-list to swap over to the other graphic.

However doing this with a bitmap has several issues, at 800x480 you can only use up to 8 bit per pixel in order to be able to put two of these in RAM_G.
With 1 bit per pixel this "only" is 47k but these 47k do not only have to be transfered to EVE but you need to have this memory on your host system
in order to render the bitmap.

Check out LINESTRIP and let EVE do the drawing for you.

Put this into EVE Screen Editor and you'll see what I mean:
CLEAR(1, 1, 1)
COLOR_RGB(255, 0, 0)
VERTEX_FORMAT(0)
BEGIN(LINE_STRIP)
VERTEX2F(0, 240)
VERTEX2F(10, 240)
VERTEX2F(20, 230)
VERTEX2F(30, 220)
VERTEX2F(40, 215)
VERTEX2F(50, 215)
VERTEX2F(60, 300)
VERTEX2F(70, 240)
VERTEX2F(80, 240)
END()

photonic
LCD?
Posts: 2
Joined: Wed May 19, 2021 10:17 am

Re: double buffering or alpha blending on EVE

Post by photonic »

Hello Rudolf,
Thanks for your response. I'm ok with 8 bits per pixel.
However doing this with a bitmap has several issues, at 800x480 you can only use up to 8 bit per pixel in order to be able to put two of these in RAM_G.
With 1 bit per pixel this "only" is 47k but these 47k do not only have to be transfered to EVE but you need to have this memory on your host system
in order to render the bitmap.
I am having trouble with the calculations with the bitmap numbers. 800 x 480 x 1/8 byte= 48k. So I make two images of 800 x 480 x8 bytes =384k and then I use the 48k space to select which one of the two images to display, pixel per pixel?

Rudolph
LCD Guru
Posts: 67
Joined: Wed Feb 28, 2018 11:09 am

Re: double buffering or alpha blending on EVE

Post by Rudolph »

No, the 47kiB would be for 1 bit per pixel.
You can use two images of 375kiB each and switch between these two by changing the display-list.

Post Reply