On Tue, Jan 28, 2014 at 1:54 PM, Steve Gold <[email protected]> wrote: > Alan, > > Thank you for your very informative response. > > Please see my comments below. > > Steve > > -----Original Message----- From: Alan Alpert > Sent: Tuesday, January 28, 2014 2:43 PM > To: Steve Gold > Cc: Qt Development Group > Subject: Re: [Development] 2D Graphics Roadmap? > > > On Sat, Jan 25, 2014 at 12:10 PM, Steve Gold <[email protected]> wrote: >> >> I'm relatively new to Qt (3-4 months now) and have learned a lot. However, >> I've been experimenting with developing apps with QML/JavaScript and >> Canvas/Context2D but have received suggestions to look at Scene Graph or >> Graphics View, both of which seem to require developing C++ classes. Is >> this >> correct? >> >> QML appears to be a more "efficient" and "productive" approach from a >> development point of view but C++ seems to be more "powerful" and >> "expressive." The examples for Graphics View that I've looked at are the >> most extensive while the examples for Scene Graph and Canvas seem more >> simplistic. >> >> As an example, I found Graphics View demos called elasticnodes (moveable >> nodes/arc) and diagramscene (select/place items onto a palette) but >> nothing >> remotely similar for the other graphics technologies. I've created several >> posts in the forums and even sent one email but haven't received any >> significant responses. >> >> Before I spend much more time, possibly in the wrong direction, can >> someone >> address the future of Canvas, Graphics View and Scene Graph with respect >> to >> Qt and Qt Creator? A comparison would be especially useful. > > > GraphicsView is a more mature framework, pretty much marked "done", > which is why it has the most examples. It's not going anywhere, which > probably also means don't expect big changes in performance or > underlying implementation. SceneGraph is fairly new, and Canvas is > even newer, depends on the level of maturity you prefer to work on. > I'd expect SceneGraph, and probably Canvas too, to mature more over > the life of Qt 5 (both are new in 5.0). > > ** Are there any roadmaps for Scene Graph or Canvas that discuss planned > features or improvements? Does saying "... probably Canvas too ..." mean > that there is no definitive plan for the enhancement and evolution of > Canvas? > > > GraphicsView and SceneGraph are both usable via QML or C++. You can > use C++ for complex custom elements, and compose simple ones out of > Rectangles or Images in QML. > > ** Scene Graph looks like it allows the creation of a set of backend C++ > QQuickItem subclasses that can be referenced in QML but there don't appear > to be many QML "Scene Graph types" that can be directly used within QML, > except for ShaderEffect, Gradient and a few others . Creating Scene Graph > C++ classes also looks to me like they take a lot of time and code to write > compared to what I would expect from creating QML types. Please correct me > if I'm wrong. > > > Note that all the QtQuick elements, even > Canvas, are implemented with SceneGraph, so you can mix and match them > freely. QtQuick 1, primarily available for compatibility reasons, uses > GraphicsView. > > > ** You state "... even Canvas, are implemented with SceneGraph ..." but > context2d.h and context2d.cpp use QPainter > class Context2D : public QObject > . . . > QPainter m_painter; > QPainterPath m_path; > . . . > The post located at http://qt-project.org/forums/viewthread/37605/ states > "Qt Quick 2 makes use of a dedicated scene graph based on OpenGL ES 2.0 > or OpenGL 2.0 for its rendering. Using a scene graph for graphics rather > than > the traditional imperative painting systems (QPainter and similar), means > the scene to be rendered can be retained between frames and the complete set > of primitives to render is known before rendering starts." > Can you please clarify this apparent discrepancy? > > > The current recommended approach is to use the new frameworks, build > your app in QML with QtQuick and use Canvas anywhere you need custom > 2D rendering (possibly re-writing that element with SG C++ if it's > performance critical). > > ** It would be an achievement if Qt enabled users to write QML types for > Canvas that used Scene Graph under the covers and did not require any > rewriting in C++. > > ** Will Qt use Scene Graph for 3D graphics? Is anything in this area on the > horizon for QML? > > >> Thanks. >> >> Steve >> >> BTW, I'm also posting this in the Qt forums > > > If you linked to that post, I could have easily checked it for possible > overlap. > > ** The post is located at http://qt-project.org/forums/viewthread/37605/
I responded there, it's probably a more appropriate place for the discussion and I'll stop duplicating it here. -- Alan Alpert _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
