API
SDL_CreateWindowFrom # 在外部窗口上创建窗口 其他 api 调用,按照之前的文章来源地址https://www.toymoban.com/news/detail-690194.html
代码
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);
文章来源:https://www.toymoban.com/news/detail-690194.html
到了这里,关于[音视频] sdl 渲染到外部创建的窗口上的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!