Display problems in X11 build at depths <24

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
gwj
Posts: 6
Joined: Sun Jan 31, 2010 4:50 pm

Display problems in X11 build at depths <24

Post by gwj »

I have noticed the problem in the X11 Linux build. At the display depths 16 and 8 the twinkling stars appear on the black background and there is no diamond/emerald behind. At the display depth 24 everything is OK.
Similar problem occurs with the doors at the right of the playfield - the images do not combine, leaving black areas within.

It looks like some problem with XCopyArea, but I do not know, whether it is the problem with the X libraries, X server or R'n'D.

I have detected the problem while testing on Nokia N900, which has the display depth of 16, and the X11 build seems to consume less CPU time and better integrates with the environment than the SDL version.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

Do you have similar problems with the X11 version on a Linux PC, or does this only occur on the N900 build?

Unfortunately, I don't have access to a N900 to test by myself, so I can only suspect problems with the X11 port for the N900 (or strange problems with the R'n'D X11 version that never showed up on non-mobile X11 systems).
gwj
Posts: 6
Joined: Sun Jan 31, 2010 4:50 pm

Post by gwj »

I have observed the problem also on Linux PC.
gwj
Posts: 6
Joined: Sun Jan 31, 2010 4:50 pm

Post by gwj »

More specifically, the problem does not occur on PC, when I start the xserver natively. It occurs at the depth 16 in Xephyr and in vnc4server.
gwj
Posts: 6
Joined: Sun Jan 31, 2010 4:50 pm

Post by gwj »

I start Xephyr using the command line:

Xephyr :2 -screen 800x600x16

and the game using the command line:

DISPLAY=:2 ./rocksndiamonds

The results are as
http://www.w-s.pl/~gwj/rnd.png
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

Thanks for the screenshot -- that helps much to understand what's going on. (Well, at least regarding the symptoms of the problem.)

It indeed looks like masked (transparent) drawing just does not work at all. (The gem's twinkling is also drawn transparently/masked over the gems, so if masking does not work, you would get the exact same result.)

When I look at that screenshot, I see a last fragment of one of the menu toons just disappearing at the top/right corner of the menu area. Are the toons also affected by this problem? (They are also always drawn masked over the backgound graphics.)
gwj
Posts: 6
Joined: Sun Jan 31, 2010 4:50 pm

Post by gwj »

Yes, this problem also affects the toons.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

So this seems to be a general problem with masked (transparent) blitting.

Could it be that this is a specific problem with the X11 port for the N900?

Do you have similar problems with other X11 programs (that use masked blitting)?

How does the SDL based version of R'n'D behave in this regard? Do you have the same graphical problems here?
gwj
Posts: 6
Joined: Sun Jan 31, 2010 4:50 pm

Post by gwj »

Holger wrote:So this seems to be a general problem with masked (transparent) blitting.

Could it be that this is a specific problem with the X11 port for the N900?
It occurs also on PC with the Xephyr xserver at depth 16.
Holger wrote: Do you have similar problems with other X11 programs (that use masked blitting)?
I have not seen such problems, but I do not know, which of the programs use masked blitting.
Holger wrote: How does the SDL based version of R'n'D behave in this regard? Do you have the same graphical problems here?
It works correctly.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Post by Holger »

> It occurs also on PC with the Xephyr xserver at depth 16.

Oops, right, you already told that.

[SDL version]
> It works correctly.

Hm. I should check if the X11 port of the SDL library uses the same or different method to do masked blitting. Then it would be interesting if/how Xephyr and vnc4server do masked blitting differently than the "normal" X server. A look into the source code of these programs could help here. I'll try to find some time for some more testing of this problem...
Post Reply