Info libSDL, Pixel, XGL

I’m using Ubuntu Linux with a photo-editing program named Pixel (kanzelsberger).
It uses libsdl 1.2.
With the latest XGL server activated, pixel gets transparant!!
Kanzelsberger, the author of pixel, says that this is due a bug in libsdl!
If I disable the Composite manager for XGL, than the problem is solved.
Is it possible to get pixel working with XGL?

Kind regards,

Patrick Libert

Indeed, most SDL apps look completely screwed up whenever a composite
manager is running (under both X.org and XGL). Not sure why, but I
think it’s because SDL doesn’t clear the window surface’s alpha
channel or something. But then again IANASD (I am not an SDL dev).On 4/9/06, Patrick Libert <patrick.libert at gmail.com> wrote:

I’m using Ubuntu Linux with a photo-editing program named Pixel (kanzelsberger).
It uses libsdl 1.2.
With the latest XGL server activated, pixel gets transparant!!
Kanzelsberger, the author of pixel, says that this is due a bug in libsdl!
If I disable the Composite manager for XGL, than the problem is solved.
Is it possible to get pixel working with XGL?

  • SR

I remember there being some kind of option I could switch on when I played
with compositing (not XGL, just X.org) under KDE that fixed this problem
when using SDL-based apps.

I’ll be damned if I can find that option again… maybe I uninstalled the
composite-based stuff… (I like eye candy and all, but stability is WAY
more usef&%TFz(NO CARRIEROn Mon, Apr 10, 2006 at 06:12:54PM -0400, Simon Roby wrote:

On 4/9/06, Patrick Libert <patrick.libert at gmail.com> wrote:

I’m using Ubuntu Linux with a photo-editing program named Pixel (kanzelsberger).
It uses libsdl 1.2.
With the latest XGL server activated, pixel gets transparant!!
Kanzelsberger, the author of pixel, says that this is due a bug in libsdl!
If I disable the Composite manager for XGL, than the problem is solved.
Is it possible to get pixel working with XGL?

Indeed, most SDL apps look completely screwed up whenever a composite
manager is running (under both X.org and XGL). Not sure why, but I
think it’s because SDL doesn’t clear the window surface’s alpha
channel or something. But then again IANASD (I am not an SDL dev).


-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

Set the XLIB_SKIP_RGBA_VISUALS environment variable. This works in all
WMs, not just KDE.

export XLIB_SKIP_RGBA_VISUALS=1

Any programs launched with this var set won’t get access to modes with an
alpha channel. You won’t be able to set the opacity of windows without an
alpha channel, though. If you want to be able to do that in the normal
case, you could set up a script you can launch stuff that doesn’t like
alpha through:

— 8< —
#!/bin/sh
XLIB_SKIP_RGBA_VISUALS=1 “$@”
— 8< —

  • GerryOn Wed, 12 Apr 2006 10:17:01 +0200, Bill Kendrick wrote:

I remember there being some kind of option I could switch on when I
played
with compositing (not XGL, just X.org) under KDE that fixed this problem
when using SDL-based apps.

I remember there being some kind of option I could switch on when I played
with compositing (not XGL, just X.org) under KDE that fixed this problem
when using SDL-based apps.

I’m running Ubuntu 5.2 and Fedora Core 4 fully up to date, and I haven’t
had any luck getting XGL running, or finding the compositing manager.

Does anyone have any tips?

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

XGL is a lot of work to get to work, but Composite under X.org is not,
so here’s my mini-HOWTO on getting a composited desktop with X.org:

  • Make sure you have at least X.org 6.8, though you may want a more
    recent version since Composite is still very experimental, and every
    version of X.org adds bug fixes.
  • Add the following section in your /etx/X11/xorg.conf:
    Section "Extensions"
    Option “Composite” "Enable"
    EndSection
  • Starting with 3.5 (or maybe 3.4, I don’t remember well), KDE has a
    built-in compositing manager, with options available in the
    configuration (Control Center) through Desktop->Window
    Behavior->Translucency. Note that once enabled, you may have to
    restart KDE for the compositing manager to actually start. If you
    don’t want/have KDE you can google for ‘compmgr’, a small standalone
    compositing manager, though I really recommend you check out KDE’s.

That’s pretty much it. You’ll probably need an accelerated RENDER
implementation to get usable performance. nVidia’s latest drivers
enable RENDER acceleration by default, and if you don’t have the
latest you can add
Option “RenderAccel” "true"
to your Device section to enable it. Additionally nVidia keeps working
on getting Composite to work better with their drivers (the latest
version includes full interoperation with OpenGL) so you’ll want to be
up to date on that too. A composited desktop with the latest X.org and
nVidia drivers is extremely solid.On 4/16/06, Sam Lantinga wrote:

I’m running Ubuntu 5.2 and Fedora Core 4 fully up to date, and I haven’t
had any luck getting XGL running, or finding the compositing manager.

Does anyone have any tips?

  • SR

XGL is a lot of work to get to work, but Composite under X.org is not,
so here’s my mini-HOWTO on getting a composited desktop with X.org:

Thanks! That worked. I’m using the built-in radeon driver, so everything
is really slow, but at least it’s working. I tried the SDL test programs,
and they appear to be partially transparent, but not fully transparent,
and the XLIB_SKIP_RGBA_VISUALS setting has no effect.

?
-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Thanks! That worked. I’m using the built-in radeon driver, so everything
is really slow, but at least it’s working. I tried the SDL test programs,
and they appear to be partially transparent, but not fully transparent,
and the XLIB_SKIP_RGBA_VISUALS setting has no effect.

I take it back, testalpha was partially transparent. All the other tests
are fully transparent, and I guess my xlib doesn’t have the environment
variable supported.

Investigating… :slight_smile:

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment

Gerry JJ made a mistake, it’s actually XLIB_SKIP_ARGB_VISUALS.On 4/16/06, Sam Lantinga wrote:

Thanks! That worked. I’m using the built-in radeon driver, so everything
is really slow, but at least it’s working. I tried the SDL test programs,
and they appear to be partially transparent, but not fully transparent,
and the XLIB_SKIP_RGBA_VISUALS setting has no effect.

I take it back, testalpha was partially transparent. All the other tests
are fully transparent, and I guess my xlib doesn’t have the environment
variable supported.

  • SR

This is fixed in CVS, thanks!

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment