Re: [Interest] Faster way of rendering QOpenGLFramebufferObject to image

2021-07-14 Thread Nuno Santos
Elvis, Your sketch runs fine. Yesterday night I have been playing with calling glReadPixels directly rather than calling toImage from FBO object. Apparently, there wasn't much difference in the machine I was running this tests. I need to test on other machines. But I also realised that the be

Re: [Interest] Faster way of rendering QOpenGLFramebufferObject to image

2021-07-14 Thread Elvis Stansvik
My idea would be something like (sketch): main.cpp: #include #include #include #include #include int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); auto view = new QQuickView; view->setSource(QUrl::fromLocalFile("test.qml")); view->show(); // I use a QVecto

Re: [Interest] Faster way of rendering QOpenGLFramebufferObject to image

2021-07-14 Thread Nuno Santos
Andy, Thanks for your reply. Are you able to capture at 60fps at 1920x1080? Best, Nuno > On 14 Jul 2021, at 20:38, Andy wrote: > > Yet another "not sure if this applies, but..." > > Maybe take a look at what QRenderCapture is doing in Qt3D? It allows you to > capture a QImage per frame, so

Re: [Interest] Faster way of rendering QOpenGLFramebufferObject to image

2021-07-14 Thread Nuno Santos
João, Thanks for the tip. Will search about it. Best, Nuno > On 14 Jul 2021, at 20:22, joao morgado via Interest > wrote: > > > Hello Nuno > > Not sure if it helps, but the book Anton's OpenGL 4 Tutorials has a chapter > about recording a video from OpenGL. It's the same approach you are

Re: [Interest] Faster way of rendering QOpenGLFramebufferObject to image

2021-07-14 Thread Nuno Santos
David, The frames are not available forever. I’m using a double frame buffer object and one frame will only be available until the next one is ready. Then the frame buffer object is swapped. Adding concurrency to this problem might bring even more problems. It’s a guess, not sure. Thanks! B

Re: [Interest] Faster way of rendering QOpenGLFramebufferObject to image

2021-07-14 Thread Andy
Yet another "not sure if this applies, but..." Maybe take a look at what QRenderCapture is doing in Qt3D? It allows you to capture a QImage per frame, so it might have some of the bit processing/manipulation you're looking for. I'm using it to capture video by saving images to a temp dir and then

Re: [Interest] Faster way of rendering QOpenGLFramebufferObject to image

2021-07-14 Thread joao morgado via Interest
Hello Nuno Not sure if it helps, but the book Anton's OpenGL 4 Tutorials has a chapter about recording a video from OpenGL. It's the same approach you are doing, saving images from a frame buffer at certain fixed rate. I just dont know what kinf of optimisations are done, I didnt read it with