I am having some trouble getting user input working again.
Once upon a time we had it working correctly, We are trying to use Ogre3d
for 3d rendering and SDL for user input. We started off creating an SDL
window and passing some operating system specific information from SDL into
Ogre3d, and then Ogre could render onto the SDL window just fine, likewise
SDL was gathering all the correct user input events. However, this had some
limitations, Ogre3d could not control the pixel format of the window,
couldn’t adjust anti-aliasing settings, and a few other things. So we
decided to create a window using Ogre3d and try passing some operating
specific token into SDL.
There were some hiccups on windows, but Mako resolved those:
Now it seems fine on Windows, but it no longer works on Linux. Ogre is
rendering to the window, but none of the SDL events are being gathered by
our game code on Linux anymore.
Whats on/in my system in case it matters.
- Ubuntu 11.04
- Unity3d desktop environment
- uname -a reports “Linux fast 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12
21:17:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux”
- I have an nVidia 560m that reports as “nVidia Corporation Device 1251
- I have SDL 1.3 from the mercurial repo at http://hg.libsdl.org/SDL that I
cloned on Saturday morning. The issue existed on older versions of 1.3 as
Here is what I know and where I am at:
- I have all the bug fixes Mako applied to the codebase.
- This all works fine on Windows, It seems to be a Linux/X11 specific bug.
- I patched an SDL bug that segfaulted getting when the X11 window title.
- When I attempt to initialize SDL using SDL_Init(SDL_INIT_VIDEO |
SDL_INIT_NOPARACHUTE) or SDL_Init(SDL_INIT_VIDEO) it returns successfully,
despite this I checked SDL_GetError() and it returns “Invalid window” in
- The windows side also get the “Invalid window” error message but works
- I am pulling all the events from SDL every frame using SDL_PollEvent()
- We set an event filter with SDL_SetEventFilter() and our code makes the
usual calls to it, but SDL does not.
Any ideas? Where else should I look?–
- Joe Toppi
Toppij at gmail.com