Hi
Have you tried something like this:
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QSurfaceFormat f;
f.setSamples(16); // if you want AA as well
f.setAlphaBufferSize(8); // turn on alpha
QQuickView view;
view.setFormat(f);
view.setSource(QUrl::fromLocalFile(QLatin1String("/path/to/my.qml"));
view.show();
return app.exec();
}
I don't have a windows box handy to try this on, but give it a try.
As far as I know qmlscene doesnt know how to run with an alpha enabled GL
context.
Regards
Sarah Smith
Senior Engineer Team Lead Qt3D
Nokia Qt Development Frameworks
Mobile: +61 448 283 476
[email protected]<mailto:[email protected]>
On 11/03/2012, at 3:13 AM, ext hailong geng wrote:
Hi
I have searched the Internet these two days and I find that it seems impossible
to draw translucent window in Windows XP by OpenGL, because it doesn't support
pixel alpha blending. So does Qt have found a way to do that for Windows XP?
Or Qt Quick2 just ignore the translucent function for Window which use OpenGL
as backend, or even with Raster backend, I tried to set alpha channel and use
RasterSurface but QQuickView just crashed.(maybe RasterSurface backend is not
finished?)
For Windows Vista and newer windows version, there is DWMAPI which will support
translucent opengl on desktop, you can see this demo,
http://www.youtube.com/watch?v=4qWKSYWIqdk, this is cool, isn't it ^_^
So shall Qt support translucent OpenGL window for Windows Vista and any newer
version?
_______________________________________________
Development mailing list
[email protected]<mailto:[email protected]>
http://lists.qt-project.org/mailman/listinfo/development
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development