SDL_CreateWindowFrom # 在外部窗口上创建窗口 其他 api 调用,按照之前的
ui.setupUi(this);
sdl_width = ui.label->width();
sdl_height = ui.label->height();
SDL_Init(SDL_INIT_VIDEO);
sdl_win = SDL_CreateWindowFrom((void*)ui.label->winId());
sdl_render = SDL_CreateRenderer(sdl_win, -1, SDL_RENDERER_ACCELERATED);
sdl_texture = SDL_CreateTexture(sdl_render, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, sdl_width, sdl_height);
rgb = new unsigned char[sdl_width * sdl_height * pixel_size];
startTimer(10);