[WIP] Editor: Update osgQt in extern#2786
Conversation
|
Are there plans to continue development of this PR? |
This ran into an issue with newer osgQt not having osgViewer::CompositeViewer. I wrote an issue about this to openscenegraph/osgQt#37 . What I understand, this would either require:
I don't really know what way to go with this. Ideas? |
|
@unelsson not sure if you're still on this but... Perhaps a read here would help? Basically... we need compositeviewer (a list of views) since OpenMW-CS can have multiple views (terrain, objects, etc.). The 'viewer' was meant purely for one camera (or more slave cameras that you switch between), while the compositeviewer was to allow for multiple viewers to be shown at once. The examples do indeed only show osgViewer::Viewer so it looks like we'll have to maintain our own osgViewer::CompositeViewer to have a list of osgViewer::Viewer instances in OpenMW-CS. |
|
Looks like we're not the only ones to come across this problem: |
|
It seems that dropped osgQt and rolled their own using QOSGViewerWidget Could be worth looking into. |
|
|
I've been looking at this a bit. Seems that the old GraphicsWindowQt created a GLWidget It might be what OpenMW needs. QGLWidget is in QT5: "QGLWidget provides functionality for displaying OpenGL graphics integrated into a Qt application." Anyway, the process isn't just about updating to the new osgQt, but rather dropping that and making something that works. Gotta look into this later! |
|
QGLWidget was deprecated in favour of QOpenGLWidget with the 5.0 release. The whole point of this exercise is to migrate from the deprecated Qt4 approach to the non-deprecated Qt5 approach. |
|
Closing this for now since work has stalled. Feel free to continue your work here: https://gitlab.com/OpenMW/openmw |
Very heavily WIP, but a PR for commenting and pointing out stuff early. Idea is to update osgQt in extern. It's used by the OpenMW-CS scene view. I understood it generated some errors, and it's probably a reason for a crash when exiting OpenMW-CS compiled with Qt5.
The PR is currently broken (probably should use osgQOpenGLWidget instead of Window), but it does compile. There might be additional unused clutter here too. I haven't really worked with CMakeLists or Qt MOC before.
What's done:
E.g. removed "OSGQOPENGL_EXPORT" present in https://github.com/openscenegraph/osgQt/blob/cf47af8c7608b1b2e0f6a70ba8b730db8a8cdff8/include/osgQOpenGL/osgQOpenGLWindow#L31 , but not in https://github.com/unelsson/openmw/blob/da16836ba3de1c5744b7b2e15437dd100386b612/extern/osgQt/osgQOpenGLWindow#L34