[osg-users] QtQuick
Konstantin Podsvirov
konstantin at podsvirov.pro
Wed Jul 27 15:52:23 PDT 2016
Hello Antoine,
unfortunately I have no spare time for the extended response.
27.07.2016, 21:27, "Antoine Rennuit" <antoinerennuit at hotmail.com>:
> Hello Konstantin,
>
> Thanks a lot for you link, this is already a step forward.
>
> I am actually willing to code all my rendering in C++ (the rendering code is actually already in place and inherited from our desktop application).
>
> Now in QtWidget I used to have a custom widget inheriting from both osgViewer::Viewer and QGLWidget and this allowed me to provide the graphic context (osgViewer::GraphicsWindowEmbedded) to my view, handle the events (e.g. window resize, keyboard events, manipulate via TrackballManipulator...), provide the scene data to the view, and actually display a grid and the origin gizmo.
>
> I have the feeling that in your QML framework, the class closest to my old widget is osgViewer:: ViewQtQuick.
>
> Now, from my C++ code, I am not sure how I can get a pointer or ref to the object of class osgViewer:: ViewQtQuick, so as to provide the view with the scene date, provide it with a camera manipulator... all these things which I would like to do in C++ rather than in QML.
>
> I guess, a yet more fundamental question is: am I right in saying that with this approach, I should create my view in QML and expect to get a handle to it (pointer, ref...) in C++?
Approximately correctly.
The generalized answer can be found here:
http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html
> I feel a bit lost in joining QML and C++ here...
This new technology, and I also have many more questions.
> Thanks,
>
> Antoine.
Sorry, that I did not provide an expanded response, but perhaps this is not our last conversation.
> ----------------------------------------
> From: osg-users <osg-users-bounces at lists.openscenegraph.org> on behalf of Konstantin Podsvirov <konstantin at podsvirov.pro>
> Sent: 08 July 2016 11:38
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] QtQuick
>
> Hello Antoine and all!
>
> 12:28, 8 jul 2016 г., Antoine Rennuit <antoinerennuit at hotmail.com>:
>> Hi all,
>>
>> I am willing to use OSG with QtQuick. As OSG a QtQuick both use OpenGL to display things there are conflicts to handle. For instance, I would like to only use a reduced part of the OpenGL viewport to display 3D geometry from OSG (that is what is usually the 3D window in standard windowing systems). What is left of the viewport being solely used by QtQuick for its buttons, sliders...
>>
>> Hence my question: using OSG, is there a way to only render in a sub-area (or reduced rectangle) of the viewport?
>>
>> I have checked on the internet and I am a bit lost...
>
> For example osgQtQuick project:
>
> http://github.com/podsvirov/osgqtquick
>
>> Kind regards,
>>
>> Antoine.
>
> --
> Regards,
> Konstantin Podsvirov
> ,
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
Regards,
Konstantin Podsvirov
More information about the osg-users
mailing list