Off the top of my head, I am not sure if fbo::save() is valid while the FBO is still bound as the target for drawing. Try releasing it first and then calling save. An FBO can only be used as a texture when it is not bound as a target -- I think that applies to all readback operations.
Also, you have a glClearColor, but you never glClear(). If there is garbage in the depth buffer of the FBO, maybe your stuff is never getting drawn. glClear() the depth buffer and the image buffer before you draw. At very least you should be able to see the clear color in the FBO when you save it, so you know the binding is working at that point.
You should not mix painter and gl calls like that. You should put gl calls between calls to beginNativePainting() and endNativePainting(), which are painter functions. It might also help to save the painter state before and restore it after depending on how it messes up your gl stuff. the docs here tell you what the painter does to the states.
I use Qt 5.9.2.
The problem is that any opengl scene isn't visible where it should be. Instead scene I see a captured part of the desktop under an application window - part of Qt Creator text editor window for example.
I'm not sure but I haven't noticed this effect in early 5.x. I check 5.6 tomorrow.
I came to know that QtWebengine can use software renderer such as QtQuick2drenderer in Qt 5.7. What are the possibilities that i can do the same in Qt 5.9.1 ?
I cross compiled QT5.9.3 for raspberry pi CM3 with X11 support. but when runining qtwebengine example ( demobrowser) I find a problem : mouse click isn"t handled
i dont know if this related to my corss compilation or to QT5.9.3 it self.
here is a link ( you could enable or disable X11 support before starting the compilation) https://github.com/chschnell/build-qt5-rpi
Right, the library doesn't seem to be very Windows friendly. It assumes the pointers to GL functions resolved and available in global scope, which is not how it usually works on this platform. Moreover it seems to force ANGLE and OpenGL ES (or at least tries to) on Windows in the .pri file, but then is inconsistent in how it checks for that.
I'd say contact the authors and ask them to fix the Windows parts.
Sorry for the slow reply. Thanks both for your responses! I've had a quick look at GLSL #include before — I'm not exactly sure how to use it (this is a start though) — but apart from that, I'd prefer a way to do this in Qt, possibly more customizable and also driver-independent (e.g. I'm not sure if all graphics drivers support this GLSL extension). In addition to that, it would be a good feature to share with my students who might use Qt also for later/future projects.
I'm developing the software in an academic setting — when the (to be included) GLSL files have changed, things need to be (pre)processed again. Basically I wondered whether it's possible to automatically check .glsl files with a preprocessor for some tag (#pragma seems a good choice) and act on it, in this case use some sed/regex line to replace the mentioned file by the contents of that file. This could happen before every Build, or even before every Run (depending on how straightforward it is to save the copy-pasted version after Building and re-use it when Running, or just do this before every Run).