So I downloaded the Qt5 release candidate over the weekend to checkout the WebGL and JavaScript support I’ve heard about in the past. While I had no idea what I was doing (seriously Qt is an entirely foreign ecosystem these days), I was able to determine two things.
-
What I was most interested in was QtQuick, which lets you implement widgets in JavaScript (actually QML which includes Javascript) and allows them to be callable from C++ (or any language Qt has bindings for). While I can’t find conclusive evidence; from what I can tell WebGL is not supported in QtQuick yet (though it looks like it’s planned). All canvas 2D operations are supported, so I’m guessing it’s just a matter of time until creating a custom Cesium widget for use in native apps is a possibility.
-
On a much better note; the Qt version of WebKit works perfectly. Building the browser example and navigating to cesium.agi.com presented no issues. So at the very least, you can embed WebGL content in an application via their browser module. What’s even better is that you can reference local urls via their resource system. This means you can create “no server required” apps that reference local data. You can also call javascript functions on the page from C++. This may be a viable solution (today) for using Cesium in a native, thick client application. One idea would be to use czml-writer to generate CZML and then send it to Cesium running in the WebKit widget. This is similar to the Java applet shunter wrote way back when, but doesn’t require a browser or webserver. We might even be able to wrap it in a custom Cesium widget to have behavior similar to 1 above (albeit at a course interface level rather than wrapping the entire Cesium API).
That’s as far as I got, and while I probably won’t invest any time in it right now, I wanted to share what I learned in case someone else in interested in experimenting with it. While a native desktop rendering engine is always going to be the optimal choice, being able to write native apps that use Cesium may prove incredibly useful for a variety of use cases.
Matt