FrameBuffer::GFX RGB888 XY framebuffer compatible with FastLED 2D/Adafruit::GFX/LEDMAatrix #886
Replies: 6 comments 2 replies
-
|
Hi Marc. Great to see you're still active and around. I did see years back that you took RGB panels to various EDM gigs which I thought was cool. Merry Christmas. The short answer is: No, there isn't a way to do this, and there can't be. Long answer: You’ve hit on the fundamental architectural difference between a standard pixel-mapped framebuffer and a DMA-driven HUB75 driver. To answer your question directly: No, there is no way to perform a simple The "Apples and Oranges" ProblemYour When you call Why
|
Beta Was this translation helpful? Give feedback.
-
|
@mrcodetastic thanks for the detailed answer . I should have mentioned that I understand that for RGBPanels the framebuffer gets broken down into bitplanes and I know about BCM, even the very first adafruit driver supported it, as well as my 8x8 direct wire scan display driver I wrote way back when. But back to the question, other drivers like SmartMatrix or RPI-RGB-Panel, do keep a full resolution full color framebuffer that users write into, and then at render time, uses it to fill the color bitplanes used for BCM.
But as I write this, since I worked on the Aurora code you are also using as one of your demos (I think I tried to give it to you as a list of examples a long time back), it does read back from the framebuffer, for instance: I also see So is this basically what I need/want to do?
Does it sound like the best way to do things? |
Beta Was this translation helpful? Give feedback.
-
|
My overlay framebuffer library is now done and published: I will give more examples and why it matters, but the short story is it allows running a huge amount of demos, some had to be ported manually and painstakingly in your lib, whereas with my glue framebuffer lib, I literally only have to change a single ifdef to switch from your lib to rpi-rgb-panel, or a FastLED Matrix, or a TFT, or displaying directly on my linux laptop |
Beta Was this translation helpful? Give feedback.
-
|
Success! 24bpp fastled framebuffer demos now work with my glue library https://github.com/marcmerlin/FastLED_ESP32-HUB75-MatrixPanel_FrameBuffer_GFX |
Beta Was this translation helpful? Give feedback.
-
|
and 2 videos: and this is why coding against my multi API multi backend GFX/FastLED/LEDMatrix triple API makes sense, when you can run your exact same code on bigger arrays with different hardware: |
Beta Was this translation helpful? Give feedback.
-
|
Ok, everything is integrated in https://github.com/marcmerlin/FastLED_ESP32-HUB75-MatrixPanel_FrameBuffer_GFX/ It just needs MATRIX_WIDTH/MATRIX_HEIGHT removed or renamed in your core library since they conflict with so many demos, breaking their compile, and maybe a better name is PANEL_RES_X/Y which won't conflict with end demo/end code. |
Beta Was this translation helpful? Give feedback.






Uh oh!
There was an error while loading. Please reload this page.
-
Howdy, I'm the author of https://github.com/marcmerlin/Framebuffer_GFX
More generally, it's the base lib for around 10 output libs so that code written against it can be output on lots of displays, including RGB Panels.
Details here: http://marc.merlins.org/perso/arduino/post_2020-03-16_Framebuffer_GFX_-Choosing-between-its-3-2D-APIs_-FastLED-XY_-NeoMatrix_-and-LEDMatrix_-and-detail-of-its-many-supported-hardware-backends.html
Basically the exact same code runs like this

I already wrote a glue driver for the older SmartMatrix lib which does work on ESP32, but isn't as efficient and why @mrcodetastic wrote this lib a few years back.
I contributed a few early examples to this lib, but eventually switched to the rpi-rgb-panel lib since it has 3 outputs and 3 times the refresh speed or max output resolution.
That said, I've been waiting to write a glue driver for this lib too.
My base framebuffer is 24bits, but looking at this library, while you can change the bpp to 24 if need be, it does not seem to have an easy X x Y matrix in 24bpp like you would with FastLED, SmartMatrix or my lib.
For TFTs that are 16bpp and do not have a framebuffer you can read (only write), I had to write this driver https://github.com/marcmerlin/FastLED_SPITFT_GFX which effectively takes my framebuffer and iterates pushing it dot by dot after converting down from 24bpp to 16bpp like done here:
https://github.com/marcmerlin/FastLED_SPITFT_GFX/blob/7d92dbdb79117d5e4e6cb369cfc1fb61cba6141e/FastLED_SPITFT_GFX.cpp#L37
it's sadly a pixel by pixel loop although it pushes one line at the time for SPI speed reasons.
Question for @mrcodetastic and others who know the lib internals:
I'll admit I don't fully understand what's the best way to push at least one line at a time to the internal framebuffer.
Suggestions very welcome :)
Beta Was this translation helpful? Give feedback.
All reactions