@SGaist said in Rendering FHD images as video:
You can create it once and then update its content.
I've done that. Something kinda like this:
void initializeGL() override {
initializeOpenGLFunctions();
m_tex = new QOpenGLTexture(QOpenGLTexture::Target::Target2D);
m_tex->create();
m_tex->setSize(4000, 4000); // Maximum possible frame resolution
m_tex->setFormat(QOpenGLTexture::RGBA8_UNorm);
m_tex->allocateStorage(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8);
m_tex->bind(1);
}
void paintGL() override {
QImage *img = this->GetCurrentImageFrame();
m_tex->setData(0, 0, 0, img->width(), img->height(), 1, 0, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, img->constBits());
}
But there are no performance improvement.
I guess 30 FPS is the maximum my machine can do, so I would just move on with it. Maybe I will implement a toggle so user with more powerful machine can run it in 60 FPS.
I will now close the thread, thanks for everyone helping.