Sdl-x11 and vnc?

hi…

has anyone tried to use sdl in x-window with “virtual network computing”
(vnc) ?

http://www.uk.research.att.com/vnc/

all sdl applications i have tried to run tell me
"Couldn’t initialize SDL: Found no sufficiently capable X11 visuals".

i don’t know a particularly large amount about x-window programming, so
i’m not sure how to troubleshoot this… any suggestions?

thanks,
steve

has anyone tried to use sdl in x-window with “virtual network computing”
(vnc) ?

http://www.uk.research.att.com/vnc/

all sdl applications i have tried to run tell me
"Couldn’t initialize SDL: Found no sufficiently capable X11 visuals".

oops, that one is mine. Please send your output of xdpyinfo

i don’t know a particularly large amount about x-window programming, so
i’m not sure how to troubleshoot this… any suggestions?

Have you tried the latest CVS snapshot? I fixed a bug relating to this
a few weeks ago: http://www.libsdl.org/cvs.html

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

has anyone tried to use sdl in x-window with “virtual network computing”
(vnc) ?

http://www.uk.research.att.com/vnc/

all sdl applications i have tried to run tell me
"Couldn’t initialize SDL: Found no sufficiently capable X11 visuals".
oops, that one is mine. Please send your output of xdpyinfo

man… i ran xdpyinfo and found out that vnc apparently defaults to 8bit
depth, and apparently all of the sdl apps i tried requested 16bit. i
changed vnc to start up in 16bit depth and it seems to work now…

thank you, and i apologize for my stupidity… :^)

steve

has anyone tried to use sdl in x-window with “virtual network computing”
(vnc) ?

http://www.uk.research.att.com/vnc/

all sdl applications i have tried to run tell me
"Couldn’t initialize SDL: Found no sufficiently capable X11 visuals".
oops, that one is mine. Please send your output of xdpyinfo

man… i ran xdpyinfo and found out that vnc apparently defaults to 8bit
depth, and apparently all of the sdl apps i tried requested 16bit. i
changed vnc to start up in 16bit depth and it seems to work now…

SDL should request 8-bit if there are no 16-bit visuals. Can you still
send the output of xdpyinfo with VNC in 8-bit mode to Mattias (or me)?

thank you, and i apologize for my stupidity… :^)

It sounds like a genuine condition which should be fixed.

Thanks!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

SDL should request 8-bit if there are no 16-bit visuals. Can you still
send the output of xdpyinfo with VNC in 8-bit mode to Mattias (or me)?

sure.

here is 8-bit mode that does not work:—

stavro 1 ~ -> xdpyinfo
name of display: stavro:2.0
version number: 11.0
vendor string: AT&T Laboratories Cambridge
vendor release number: 3331
maximum request size: 4194300 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 2
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 8, bits_per_pixel 8, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: window 0x800016, revert to None
number of extensions: 7
BIG-REQUESTS
MIT-SHM
MIT-SUNDRY-NONSTANDARD
SHAPE
SYNC
XC-MISC
XTEST
default screen number: 0
number of screens: 1

screen #0:
dimensions: 1024x768 pixels (347x260 millimeters)
resolution: 75x75 dots per inch
depths (1): 8
root window id: 0x25
depth of root window: 8 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x21
default number of colormap cells: 8
preallocated pixels: black 0, white 255
options: backing-store YES, save-unders YES
largest cursor: 1024x768
current input event mask: 0xfa203f
KeyPressMask KeyReleaseMask ButtonPressMask
ButtonReleaseMask EnterWindowMask LeaveWindowMask
ButtonMotionMask StructureNotifyMask SubstructureNotifyMask
SubstructureRedirectMask FocusChangeMask PropertyChangeMask
ColormapChangeMask
number of visuals: 1
default visual id: 0x22
visual:
visual id: 0x22
class: TrueColor
depth: 8 planes
available colormap entries: 8 per subfield
red, green, blue masks: 0x7, 0x38, 0xc0
significant bits in color specification: 8 bits


and here is 16-bit mode, which does work, for comparison:


stavro 23 ~ -> xdpyinfo
name of display: stavro:1.0
version number: 11.0
vendor string: AT&T Laboratories Cambridge
vendor release number: 3331
maximum request size: 4194300 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 2
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 16, bits_per_pixel 16, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: window 0x800016, revert to None
number of extensions: 7
BIG-REQUESTS
MIT-SHM
MIT-SUNDRY-NONSTANDARD
SHAPE
SYNC
XC-MISC
XTEST
default screen number: 0
number of screens: 1

screen #0:
dimensions: 1024x768 pixels (347x260 millimeters)
resolution: 75x75 dots per inch
depths (1): 16
root window id: 0x25
depth of root window: 16 planes
number of colormaps: minimum 1, maximum 1
default colormap: 0x21
default number of colormap cells: 64
preallocated pixels: black 0, white 65535
options: backing-store YES, save-unders YES
largest cursor: 1024x768
current input event mask: 0xfa203f
KeyPressMask KeyReleaseMask ButtonPressMask
ButtonReleaseMask EnterWindowMask LeaveWindowMask
ButtonMotionMask StructureNotifyMask SubstructureNotifyMask
SubstructureRedirectMask FocusChangeMask PropertyChangeMask
ColormapChangeMask
number of visuals: 1
default visual id: 0x22
visual:
visual id: 0x22
class: TrueColor
depth: 16 planes
available colormap entries: 64 per subfield
red, green, blue masks: 0x3f, 0x7c0, 0xf800
significant bits in color specification: 8 bits


steve

here is 8-bit mode that does not work:

visual id: 0x22
class: TrueColor
depth: 8 planes
available colormap entries: 8 per subfield
red, green, blue masks: 0x7, 0x38, 0xc0
significant bits in color specification: 8 bits

It’s only a 8bpp TrueColor visual (with BGR233 layout).
SDL needs either 8bpp PseudoColor or >=15 bpp TrueColor.

While we could arrange for 8bpp TrueColor to work, I don’t think it
is important enough to justify the work required. A lot of SDL code
assumes that 8bpp is PseudoColor; we could simulate it in the x11 driver,
but I want a bigger reason for doing so (like a handheld linux gaming
console or something…)

But if you feel comfortable enough hacking X11 and SDL, feel free to
do it yourself.

number of visuals: 1
visual:
visual id: 0x22
class: TrueColor
depth: 8 planes
available colormap entries: 8 per subfield
red, green, blue masks: 0x7, 0x38, 0xc0
significant bits in color specification: 8 bits

Well, here’s your problem. There’s only one visual, and it’s not an
8-bit palettized mode, it’s an 8-bit truecolor mode, which SDL does
not support. Running the server in 16-bit mode is the way to go.

It’s also interesting that the 16-bit mode is a 16-bit BGR mode.

Thanks!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

While we could arrange for 8bpp TrueColor to work, I don’t think it
is important enough to justify the work required. A lot of SDL code
assumes that 8bpp is PseudoColor; we could simulate it in the x11 driver,
but I want a bigger reason for doing so (like a handheld linux gaming
console or something…)

ok. as far as i have tested so far, 16bit truecolor through vnc works, so
my original problem is solved, and i agree that the advantages of
implementing 8bit truecolor don’t justify the work required. …though it
might be a good get-to-know-the-internals-of-sdl project for me when i
have completed a few other projects i’m currently working on… ;^)

thank you,
steve