I’ve been trying to use SDL to write a few cross-platform windowed GL
programs and have run into a few bugs. These are on a recent full install
of Redhat 7.1 with a Voodoo3 in KDE with both SDL 1.2.1 and the
RedHat-supplied 1.1.7. GL/glut applications work well on my system, so I
assume they are SDL-specific problems.
Minimizing windowed GL things like ‘testgl’ or ‘SDLgears’ comes close to
locking up X. X responds so slow it takes 20 seconds to maximize the
window (at which point it works fine again). This is not a problem with
glut applications.
Maximizing a window results in it being the right size, but not moving to
0,0, so most of the window winds up off the screen (The window’s orign
stays the same in other words). This is not a problem with glut
applications either.
Any windowed SDL GL program causes the gamma level to change from what it
is set to (see ‘xgamma’) until a different window is selected at which
point it resets to the correct levels. Selecting the SDL window again does
not mess up the gamma levels again. Interestingly, glut programs cause the
gamma to change for a split second when they first load, but do not stay
wrong like they do with SDL.
Also, when I try to get 1.2.1 working in cygwin, I can get it to build and
install ok, and it compiles the tests, but when trying to run a test,
Windows pops up an error dialog about not being able to find SDL.dll. I
tried installing it with different prefixes (so I have SDL.dll in /lib,
/usr/lib, /usr/local/lib, etc.) but no good. Not having ‘ldd’ or
’ldconfig’ on cygwin, I can’t figure out further what the problem is. It
looks like it should work, so I’m confused.
Minimizing windowed GL things like ‘testgl’ or ‘SDLgears’ comes
close to
locking up X. X responds so slow it takes 20 seconds to maximize
the
window (at which point it works fine again). This is not a problem
with
glut applications.
In Windows, when you “minimize” a window, its coordinates are actually
set to -32000 and its size, if I remember correctly, is an undefined
number (or maybe negative its actual size). Maybe X is doing
something similar and the app still tries to draw to the window "area"
while it is minimized?–
Olivier A. Dagenais - Software Architect and Developer
I’ve been trying to use SDL to write a few cross-platform windowed GL
programs and have run into a few bugs. These are on a recent full install
of Redhat 7.1 with a Voodoo3 in KDE with both SDL 1.2.1 and the
RedHat-supplied 1.1.7. GL/glut applications work well on my system, so I
assume they are SDL-specific problems.
Minimizing windowed GL things like ‘testgl’ or ‘SDLgears’ comes close to
locking up X. X responds so slow it takes 20 seconds to maximize the
window (at which point it works fine again). This is not a problem with
glut applications.
This is because SDL is pushing the X server as hard as it can. When
you have hardware acceleration this is generally not a problem, but if
you’re getting a software fallback, it can cause X not to respond quickly.
Maximizing a window results in it being the right size, but not moving to
0,0, so most of the window winds up off the screen (The window’s orign
stays the same in other words). This is not a problem with glut
applications either.
Any ideas anybody? This sounds like a window manager issue.
Any windowed SDL GL program causes the gamma level to change from what it
is set to (see ‘xgamma’) until a different window is selected at which
point it resets to the correct levels. Selecting the SDL window again does
not mess up the gamma levels again. Interestingly, glut programs cause the
gamma to change for a split second when they first load, but do not stay
wrong like they do with SDL.
This is probably because SDL is using a DirectColor visual.
Also, when I try to get 1.2.1 working in cygwin, I can get it to build and
install ok, and it compiles the tests, but when trying to run a test,
Windows pops up an error dialog about not being able to find SDL.dll. I
tried installing it with different prefixes (so I have SDL.dll in /lib,
/usr/lib, /usr/local/lib, etc.) but no good. Not having ‘ldd’ or
’ldconfig’ on cygwin, I can’t figure out further what the problem is. It
looks like it should work, so I’m confused.
Copy SDL.dll into the directory where you’re running the program.
See ya!
-Sam Lantinga, Lead Programmer, Loki Software, Inc.