Mako_energy wrote:I don't feel that adding a dependency to OgreMain in order to solve them is a step in the right direction. They should just be bug fixed
At least for linux, this is extremely complicated. It can't
just be fixed. Very few people in the world (and certainly no one on the Ogre team) has the expertise needed to fix these problems properly. Feel free to download SDL2, look at the source code, and see how complex it is to deal with the variety of linux windows managers. And worse - it's a moving target. linux is trying to sort it's window manager issues out, but this involves future changes which will result in even more linux window manager branches to support.
SDL2 does this for us. So at least for linux, using SDL2 for windowing is an extremely good idea.
I would far rather the Ogre team be working on things they're good at (rendering functionality) rather than trying and probably failing to fix things they're bad at (e.g. linux windowing code).
bcsanches wrote:So for now, I think the best thing would be to keep Ogre not dependent on a specific windowing system. I like the freedom to plug it to anything that I wish. In my projects, first I started with my own input system using win32, later I switched to SDL (1.2).
I absolutely agree users should not be
stuck with SDL2. However, we do need a default option that works out of the box, both for windowing and input. The trick is to make this easily replaceable for folks who want something else.
scrawl wrote:Rough roadmap -
- Test SDL2 RWs using the old (build option) approach first
- Move stock render window implementations to Plugin_WindowingDefault
- Add Plugin_WindowingSDL2
- Port samples to SDL input, kick OIS out
- Add examples for a few features to sample browser: hardware cursors, window icons (with the SDL windowing plugin, RenderWindow should be able to setWindowIcon(Ogre::Image image)) . Showing and hiding cursor, relative input.
+1
scrawl wrote:I had tried SDL_CreateWindowFrom back then but was encountering severe problems on windows as you mentioned. I might try it again some time.
Leaving Ogre in control of the window doesn't solve some of its issues though, eg the multi monitor bug on linux.
Yes, this is important. Using SDL_CreateWindowFrom
does not solve the linux fullscreen and dual monitor problem.
- SDL must create the window.
- Ogre3D must use the SDL-created window
- Ogre3D should create the opengl context, NOT SDL.
In case it helps, I'm going to attach some source code from Salvation Prophecy, which includes the setup code for SDL2 on linux. I do this with great hesitation, because this code is some of the messiest in my game. It has been repeatedly patched to deal with various hardware, windows and linux port issues, much of which was added post-ship (so I didn't want to drastically refactor the code).
The important bit is in function GraphicsSystem::InitSDL.
You do not have the required permissions to view the files attached to this post.