Bug#368799: libsdl1.2debian: [PATCH] SDL transparent (translucent)
with XGL
Debian BTS
debbugs at bugs.debian.org
Wed May 24 23:03:52 UTC 2006
(32-bit depth with alpha)
Reply-To: Vincent van Adrighem <adrighem at gnome.org>, 368799 at bugs.debian.org
Resent-From: Vincent van Adrighem <adrighem at gnome.org>
Resent-To: debian-bugs-dist at lists.debian.org
Resent-CC: Debian SDL packages maintainers <pkg-sdl-maintainers at lists.alioth.debian.org>
Resent-Date: Wed, 24 May 2006 23:03:49 UTC
Resent-Message-ID: <handler.368799.B.114851170212892 at bugs.debian.org>
Resent-Sender: owner at bugs.debian.org
X-Debian-PR-Message: report 368799
X-Debian-PR-Package: libsdl1.2debian
X-Debian-PR-Keywords:
Received: via spool by submit at bugs.debian.org id=B.114851170212892
(code B ref -1); Wed, 24 May 2006 23:03:49 UTC
Received: (at submit) by bugs.debian.org; 24 May 2006 23:01:42 +0000
Received: from amsfep17-int.chello.nl ([213.46.243.15] helo=amsfep14-int.chello.nl)
by spohr.debian.org with esmtp (Exim 4.50)
id 1Fj2MI-00039N-AT
for submit at bugs.debian.org; Wed, 24 May 2006 16:01:42 -0700
Received: from dirck.mine.nu ([213.93.169.118]) by amsfep14-int.chello.nl
(InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP
id <20060524230110.ZHXT13274.amsfep14-int.chello.nl at dirck.mine.nu>;
Thu, 25 May 2006 01:01:10 +0200
Received: from localhost ([127.0.0.1] ident=amavis)
by dirck.mine.nu with esmtp (Exim 4.50)
id 1Fj2LM-00027l-61; Thu, 25 May 2006 01:00:44 +0200
Received: from dirck.mine.nu ([127.0.0.1])
by localhost (dirck.mine.nu [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 26311-02; Thu, 25 May 2006 01:00:39 +0200 (CEST)
Received: from vincent ([192.168.0.2] helo=localhost.localdomain)
by dirck.mine.nu with esmtp (Exim 4.50)
id 1Fj2L7-00027d-2o; Thu, 25 May 2006 01:00:39 +0200
Received: from vincent by localhost.localdomain with local (Exim 4.62)
(envelope-from <adrighem at gnome.org>)
id 1Fj2LV-0005DX-UE; Thu, 25 May 2006 01:00:53 +0200
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Vincent van Adrighem <adrighem at gnome.org>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Message-ID: <20060524230053.26101.85290.reportbug at localhost.localdomain>
X-Mailer: reportbug 3.20
Date: Thu, 25 May 2006 01:00:53 +0200
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at mine.nu
X-SA-Exim-Connect-IP: 127.0.0.1
X-SA-Exim-Mail-From: adrighem at gnome.org
X-SA-Exim-Scanned: No (on dirck.mine.nu); SAEximRunCond expanded to false
Delivered-To: submit at bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_00,HAS_PACKAGE,
RCVD_IN_SORBS autolearn=no version=2.60-bugs.debian.org_2005_01_02
Package: libsdl1.2debian
Version: 1.2.9-5+b1
Severity: normal
SDL has no support for 32 bit depth (i.e. 24 bit with alpha mask).
Therefore, all SDL-based applications are transparent/translucent with
XGL (and maybe AIGLX). This can be corrected by a simple patch to only
use 24 bits. [Upstream patch included in bugreport]
This bug is described in upstream bugzilla (bug #197) and fixed in
1.2.10. But the fix is so simple and the new upstream seems to be a
major upgrade, that a backport of this patch might be more desireable.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-k7
Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8)
Versions of packages libsdl1.2debian depends on:
ii libsdl1.2debian-alsa 1.2.9-5+b1 Simple DirectMedia Layer (with X11
libsdl1.2debian recommends no packages.
-- no debconf information
BEGINPATCH--------------
--- SDL-1.2.9/src/video/x11/SDL_x11video.c 2006/03/23 22:11:29
2166
+++ SDL/src/video/x11/SDL_x11video.c 2006/04/17 04:54:08 2200
@@ -557,6 +557,9 @@
vformat->Gmask = SDL_Visual->green_mask;
vformat->Bmask = SDL_Visual->blue_mask;
}
+ if ( this->hidden->depth == 32 ) {
+ vformat->Amask = (0xFFFFFFFF &
~(vformat->Rmask|vformat->Gmask|vformat->Bmask));
+ }
X11_SaveVidModeGamma(this);
/* See if we have been passed a window to use */
@@ -772,6 +775,7 @@
int i, depth;
Visual *vis;
int vis_change;
+ Uint32 Amask;
/* If a window is already present, destroy it and start fresh */
if ( SDL_Window ) {
@@ -822,9 +826,15 @@
this->hidden->depth = depth;
/* Allocate the new pixel format for this video mode */
+ if ( this->hidden->depth == 32 ) {
+ Amask = (0xFFFFFFFF &
~(vis->red_mask|vis->green_mask|vis->blue_mask));
+ } else {
+ Amask = 0;
+ }
if ( ! SDL_ReallocFormat(screen, bpp,
- vis->red_mask, vis->green_mask, vis->blue_mask,
0) )
+ vis->red_mask, vis->green_mask, vis->blue_mask,
Amask) ) {
return -1;
+ }
/* Create the appropriate colormap */
if ( SDL_XColorMap != SDL_DisplayColormap ) {
--- SDL-1.2.9/src/video/x11/SDL_x11modes.c 2006/03/22 11:13:582144
+++ SDL/src/video/x11/SDL_x11modes.c 2006/04/17 04:54:082200
@@ -620,7 +620,11 @@
#endif /* SDL_VIDEO_DRIVER_X11_XME */
{
+/* It's interesting to note that if we allow 32 bit depths,
+ we get a visual with an alpha mask on composite servers.
static int depth_list[] = { 32, 24, 16, 15, 8 };
+*/
+ static int depth_list[] = { 24, 16, 15, 8 };
int j, np;
int use_directcolor = 1;
XPixmapFormatValues *pf;
ENDPATCH--------------
More information about the Pkg-sdl-maintainers
mailing list