I’m new to SDL and am trying to figure out a few points.
I’ve written an app on Mac OS to display movies in an OpenGL surface (I used
OpenGL for several reasons).
On Mac OS, I used CGL / AGL / Carbon. AGL allowed getting several
independent full screen windows.
As I want to stay as portable as possible, and if possible use only open
source code I’ve rewritten a part of this code to run on linux and use SDL
(with only one full screen device, I guess I’ll have to wait for SDL 2 to
get multi devices support).
Most of it was quite straight forward, and I like this solution.
Nevertheless, I’m still in trouble with a few points :
*** tearing : I’m using opengl double buffering and tried to enable the
SDL_GL_SWAP_CONTROL option, but setting and getting this attribute fails,
even within the test program testgl.c provided in SDL source code. My mesa
libs and X dev packages are up to date. I think I need some specific
extensions from my graphic card to get it working. Grabbing into the code, I
did not really get which one. Any clues ? (I’m using an i915 intel chip).
(when I display movies I have an horizontal line moving on my screen - I
solved that on AGL using the AGL_SWAP_INTERVAL attribute)
*** valgrind : One of the key reasons for me to bring my app to Linux was to
enable debugging and profiling features from valgrind. Nevertheless, just
starting an SDL linked app seems to make it a little crazy. I could deal
with it, but when I begin to display videos on my GL surface, X hangs, and
all I can do is move my cursor (event CAPS key is locked). I have to kill
valgrind with a kill -9 from an ssh session to bring back X to life.
That’s all, hope anyone can help.