lvgl / lv_drivers

TFT and touch pad drivers for LVGL embedded GUI library
https://docs.lvgl.io/master/porting/index.html
MIT License
306 stars 314 forks source link

GPU Supported SDL Backend #197

Closed mariotaku closed 2 years ago

stale[bot] commented 2 years ago

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

kisvegabor commented 2 years ago

Hi,

It seems this PR was forgotten.

I resolved the conflicts and marked this PR as ready. Is it ready to merge?

mariotaku commented 2 years ago

The merge looks good to me!

kisvegabor commented 2 years ago

I've just tested it it still crashes with this initialization:

  sdl_disp_drv_init(&disp_drv, SDL_HOR_RES, SDL_VER_RES); /*Basic initialization*/
  lv_disp_t * disp = lv_disp_drv_register(&disp_drv);
WARN: 

Assertion failure at lv_draw_sdl_rect_bg_frag_obtain (../lvgl/src/draw/sdl/lv_draw_sdl_rect.c:156), triggered 1 time:
  'texture'

Do you what can be still missing?

mariotaku commented 2 years ago

@kisvegabor I think this is because lvgl/lvgl#3167. I have created another PR https://github.com/lvgl/lvgl/pull/3280 to revert the change, after the change, sample app will run.

kisvegabor commented 2 years ago

Thank you, it's working now.

But there are some minor issues :slightly_frowning_face:

The widgets demo looks like this: image

Instead of: image

So

mariotaku commented 2 years ago

Is this on Linux? On Windows (with MinGW) it works fine. My code is based on lv_sim_vscode_sdl.

kisvegabor commented 2 years ago

Yes, I'm on Linux. Do you use the latest LVGL?

mariotaku commented 2 years ago

I think they are quite new.

 2d7f3f619b447c97f2af825b82a75611124f5e04 lv_drivers (v8.1.0-16-g2d7f3f6)
 6a179e2c8e67afbcd30fbd7a1f6134799e602828 lv_examples (v7.11.0-120-g6a179e2)
 9997fb00aa60b4478c76fa8387a74ca5b3c595b2 lvgl (v8.2.0-173-g9997fb00a)
kisvegabor commented 2 years ago

I found that the problem was that I was using LV_COLOR_DEPTH 16. With 32 it works well.

I merge it now to have the main issue fixed but I think there should be an #error is 16 bit color depth is selected and it's not supported.