Using disp_drv.direct_mode = 1 disp_drv.screen_transp = 1 and #define LV_COLOR_SCREEN_TRANSP 1, screen is transparent

Code

The code block(s) should be between ```c and ``` tags:

  /*Create a display*/
  static lv_disp_drv_t disp_drv;
  lv_disp_drv_init(&disp_drv); /*Basic initialization*/
  disp_drv.draw_buf = &disp_buf1;
  disp_drv.flush_cb = sdl_display_flush;
  disp_drv.hor_res = SDL_HOR_RES;
  disp_drv.ver_res = SDL_VER_RES;
  // disp_drv.screen_transp = 1;
  disp_drv.antialiasing = true;
  disp_drv.clear_cb = sdl_clear_cb;
  disp_drv.direct_mode = 1;
  disp_drv.screen_transp = 1;

application

lv_obj_t *cont1 = lv_obj_create(lv_scr_act());
    //lv_obj_remove_style_all(cont1);
    lv_obj_set_style_bg_opa(lv_scr_act(), 0, LV_PART_MAIN|LV_STATE_DEFAULT);

    lv_obj_set_size(cont1, 1024/2, 600);
    lv_obj_set_style_bg_opa(cont1, 255, 0);
    lv_obj_set_style_bg_color(cont1, lv_color_make(0xff, 0, 0xff),LV_PART_MAIN|LV_STATE_DEFAULT);

application run as follows:

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.


if screen is not transparent, application run as follows:

Screen is transparent, the objects on top of screen cannot display rightly, how should I do for my application to display rightly?

lvgl version ?