Using Direct Mode

Hi everyone, what is the advantage of using direct mod? Can I use a common buffer for both lcd and lvgl, will there be any flickering issues?


Direct mod works the best if you have a single frame buffer and you need to send the whole buffer (or a part of it) to the display, where display is a complex system buffering and managing the new frames/image.

A typical use case is when SDL updates the texture of a window, SDL and the video card will manage how and when to update the image on the screen so LVGL can draw directly into that texture.

And other use case is to reproduce the rendering mechanism of LVGL v7 as described here. It turned out the v7-like double buffered rendering worked better for some people, so I’m open to add options to LVGL to make it easier to achieve in v8 too.

I have to use two buffer, one is lvgl other is tft controller right? Or only one buffer is common both lvgl and controller? Which one right?

In general with MCUs direct mode is not that useful as you really need a frame buffer for the TFT and another for LVGL. If you use the same frame buffer for both it will fliceker.