three.js in my Qt application
-
Hello,
I have a pretty large application written in C++, using Qt. The application has a main window in which 3D objects are being rendered, and where the user interacts with them. That application relies on the QOpenGLWidget and related. OpenGl calls are low level and old style (not even shaders are used).
Now I'd like, if possble, to port the graphics side of my application to something that is higher level and that abstracts all the graphic card specificities from me. I'd like to benefit from shaders, shadows, and from an interface that is high-level and lightweight (if possible no heavy game engine). So I discovered three.js which amazes me. First problem however: it uses javascript. I could accomodate with this, by having a data exchange interface between my C++ and javascript. I would have a client (my application) - server (the rendering) situation. But how can I have the rendering in the same windowing system as my application? My main window is split in several areas, one of those areas should be the rendering.
Sorry if that sounds a little bit confuse, I am actually a bit confused as to do this.
Thanks for any input -
Thanks a lot for the link. And sorry for the late reply, I received the notification in my spam folder.
I am aware of that link, but feel I can't use it as a starting point of how to integrate Canvas3D and javascript into my c++ application.. -
Through a QtQuick interface and you can also keep using widgets if needed.
On a side note, did you also took a look at Qt3D ?
-
Thanks again for your help. Yes, I had a look at Qt3D, but I have the feeling that it is a bit lower level than three.js