I am taking a look at NativeWindowPair in ApplicationContextBase:
https://github.com/OGRECave/ogre/blob/8 ... Base.h#L77
I am pretty sure that the "NativeWindowType" inside "NativeWindowPair" is not used for anything but:
- retrieving the "uint32" that we call "window id", like here.
- setting the window grab for the main window at exactly one single place.
Now, in the Qt implementation, the "NativeWindowType" is not "QWindow"!!! It is a hack: SDL_Window. You might have or not SDL... and this is still the "NativeWindowType" for any non android build. The Qt implementation casts "NativeWindowType" to "QWindow" all the time. I realize that this last problem is probably a consequence of the fact that you can have both: Qt and SDL in the same system. I think it is a little bit bad that the interface (that is, the ".h" files) are too dependent on the build type. But this is the subject of some future post.
In the specific case of NativeWindowPair, I think NativeWindowType could be substituted by "uint32_t windowID". Then, we could have a "NativeWindowType* mainWindow" to be used in "setWindowGrab".
Probably changing "NativeWindowPair" would be considered too much for Ogre 1.14. Is there a trunk for some version were it would be possibly considered?
I would love to have OgreBites a little easier to port to SDL3 (which I am doing right now), Gtk or any other windowing system. Also, I would love to have it less threatening to new comers, like me, that get very confused and scared when they see "#ifdef".
If you see problems with this proposal, please let me know. I do too... and I have some ideas for those, too.