On 20/04/2015 08:25, Paul Knopf wrote:
Thanks a lot! This worked. I now have a valid alpha component that I
can send to my hard vendors API for FPGA video overlay.
With this said, I would REALLY like to support OpenGL (for Qt Quick
2/qml). Here is an image <http://i.imgur.com/hhlcbb9.jpg> of what I am
trying to essentially do. What are your thoughts implementing this in Qt?
Here is what I need my monitor output to be.
The original buffer: size w / h : [R G B A][R G
B A][R G B A][...]
The output i want: size (w*.25) / (h*.25): [R G B][A R G][B A
R][G B A][...]
My thoughts are to Render OpenGL off screen (not using framebuffer),
then have a thread that periodically captures the output (RGBA) and
sends it my linux framebuffer. My output doesn't need high FPS. I
understand that sending the extra alpha will increase the size of my
resolution by 25%.. The FPGA component/board will identify itself as
having a resolution of 1350 (1080 * .25) so that it can internally
translate to 1080 with an alpha channel. Does the EGLFS support
off-screen rendering? Maybe then, I could create 1080 opengl context
off-screen, and then output it, including alpha, to the 1350 framebuffer.
OpenGL supports offscreen rendering as long as the QPA supports OpenGL.
* Create a QOffscreenSurface
* Create a QOpenGLContext
* Create a suitable Framebuffer Object with a colour texture attachment
and most likely a depth and stencil attachment.
* Bind the FBO as the GL_BUFFER (both read and write binding points)
* Draw stuff
* Read back the texture attached to the FBO as needed
If you are wanting to use this approach to render Qt Quick 2 content,
then take a look at the QQuickRenderControl class and accompanying
example that ships with Qt.
Cheers,
Sean
--
Dr Sean Harmer | [email protected] | Managing Director UK
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development