New X11 fullscreen code

I was inspired by the X fullscreen demo posted here … here is some new
sample code that I want to integrate into SDL, so that the fullscreen
window under X11 can be managed by the window manager.

This is the work of a day, and I started from scratch, so everything
you see is the result of the school of hard knocks. :slight_smile:

Please let me know if this works on your desktop! :slight_smile:

… Hit escape to quit.

Note: This only works on local displays.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/x-compressed-gzip
Size: 4664 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20000107/f49e48c2/attachment.bin

Please let me know if this works on your desktop! :slight_smile:

At 640 480 1, it was fine, but 1280 1024 1 it came up black, and the screen was
black after exiting, but the mouse was still there.

Was that meant to be fullscreen mode with software rendering? If so, then
what’s the point? If we’re gonna go fullscreen, it might aswell be a hardware
surface, unless the X11 protocol faster than DGA.On Fri, Jan 07, 2000 at 08:13:14PM -0800, Sam Lantinga wrote:


– Michael Samuel <@Michael_Samuel>

Please let me know if this works on your desktop! :slight_smile:

At 640 480 1, it was fine, but 1280 1024 1 it came up black, and the screen was
black after exiting, but the mouse was still there.

Was that meant to be fullscreen mode with software rendering? If so, then
what’s the point? If we’re gonna go fullscreen, it might aswell be a hardware
surface, unless the X11 protocol faster than DGA.

It is. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software> On Fri, Jan 07, 2000 at 08:13:14PM -0800, Sam Lantinga wrote:

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Please let me know if this works on your desktop! :slight_smile:

At 640 480 1, it was fine, but 1280 1024 1 it came up black, and the screen was
black after exiting, but the mouse was still there.

Can you tell me more about your configuration? What is your desktop
normally set to? What window manager do you have? What video card?
X server? PPC? x86?

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software> On Fri, Jan 07, 2000 at 08:13:14PM -0800, Sam Lantinga wrote:

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

At 640 480 1, it was fine, but 1280 1024 1 it came up black, and the screen was
black after exiting, but the mouse was still there.

Can you tell me more about your configuration? What is your desktop
normally set to? What window manager do you have? What video card?
X server? PPC? x86?

This was on my x86 box with a 32MB TNT2 Ultra and XF86_SVGA 3.3.5. My desktop
is set to 1280x1024, and I’m running enlightenment (the only window manager
that I can get fullscreen working properly in Quake2 with).On Sat, Jan 08, 2000 at 12:20:04AM -0800, Sam Lantinga wrote:


– Michael Samuel <@Michael_Samuel>

Can you tell me more about your configuration? What is your desktop
normally set to? What window manager do you have? What video card?
X server? PPC? x86?

xit fullscreen hoses my X server. (The sync is hosed. I get several
compacted strips of desktop all garbled on the screen.) I can run the
application without fullscreen fine. (640 480 0 works. 640 480 1 does
not, for example.) Closing the application does not restore the X server
and it must be shut down manually.

My setup: XFree86 Mach64 server version 3.3.3.1 on an ATI All-in-Wonder
card. Desktop running Enlightenment/GNOME at 1280x1024 in 32 bit color
depth. Dual P-II 333MHz with 128M RAM.

I had downloaded a fullscreen demo posted a couple of months back by an
outside source and it worked fine, but xit does not.

Paul Braman
@Paul_BramanOn Sat, 8 Jan 2000, Sam Lantinga wrote:

I’m not really sure what it’s supposed to do, I get windows even if I
ask for full screen. Not only that but I always get a smaller windows
hidden under the main one that surfaces when I close the top one.

XFree86 3.3.3
Mach64 with ATI Rage 3D II
kwm

Phoenix Kokido
members.xoom.com/kokido
@Wes_Poole

Sam Lantinga wrote:> I was inspired by the X fullscreen demo posted here … here is some new

sample code that I want to integrate into SDL, so that the fullscreen
window under X11 can be managed by the window manager.

This is the work of a day, and I started from scratch, so everything
you see is the result of the school of hard knocks. :slight_smile:

Please let me know if this works on your desktop! :slight_smile:

… Hit escape to quit.

Note: This only works on local displays.

-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

This is a multi-part message in MIME format.

–0073506BCB732E22A00928BA6A84C638
Content-Type: text/plain; name="Message Text"
Content-Transfer-Encoding: 7bit

By the way, the news2mail gateway (and vice-versa) that you use seems to
munge too much of the messages, which breaks MIME messages. If you want,
I can send you the script I made and use, which works correctly with
MIME messages

I was inspired by the X fullscreen demo posted here … here is some new
sample code that I want to integrate into SDL, so that the fullscreen
window under X11 can be managed by the window manager.

Where is the “new” version of that test announced in another post? I
would like to try it out…–
Pierre Phaneuf
http://ludusdesign.com/

Please let me know if this works on your desktop! :slight_smile:

Looks good on my setup. I’m running Xfree 3.3.5 w/ Voodoo3 3000 AGP card. It
worked in 640x480, 800x600, and 1024x768 res.

At 640 480 1, it was fine, but 1280 1024 1 it came up black, and the screen was
black after exiting, but the mouse was still there.

Can you tell me more about your configuration? What is your desktop
normally set to? What window manager do you have? What video card?
X server? PPC? x86?

This was on my x86 box with a 32MB TNT2 Ultra and XF86_SVGA 3.3.5. My desktop
is set to 1280x1024, and I’m running enlightenment (the only window manager
that I can get fullscreen working properly in Quake2 with).

Very interesting. The program should never have switched video modes.
You have to hit escape twice to exit.
Can you download the latest one and tell me if it prints out “switching video mode”?
If so, can you edit the code to make it print out what it thinks the current video
mode is (modes.c?)
http://www.devolution.com/~slouken/SDL/cvs/xit.tar.gz

Thanks!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software> On Sat, Jan 08, 2000 at 12:20:04AM -0800, Sam Lantinga wrote:

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Very interesting. The program should never have switched video modes.
You have to hit escape twice to exit.
Can you download the latest one and tell me if it prints out “switching video mode”?
If so, can you edit the code to make it print out what it thinks the current video
mode is (modes.c?)
http://www.devolution.com/~slouken/SDL/cvs/xit.tar.gz

That one worked nicely.On Sat, Jan 08, 2000 at 10:19:30AM -0800, Sam Lantinga wrote:


– Michael Samuel <@Michael_Samuel>

Very interesting. The program should never have switched video modes.
You have to hit escape twice to exit.
Can you download the latest one and tell me if it prints out “switching video mode”?
If so, can you edit the code to make it print out what it thinks the current video
mode is (modes.c?)
http://www.devolution.com/~slouken/SDL/cvs/xit.tar.gz

That one worked nicely.

Great. :slight_smile:

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software> On Sat, Jan 08, 2000 at 10:19:30AM -0800, Sam Lantinga wrote:

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

If we’re gonna go fullscreen, it might aswell be a hardware surface,
unless the X11 protocol faster than DGA.

It is. :slight_smile:

Really? :-)–
Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
“First they ignore you. Then they laugh at you.
Then they fight you. Then you win.” – Gandhi

Sam Lantinga wrote:

If we’re gonna go fullscreen, it might aswell be a hardware surface,
unless the X11 protocol faster than DGA.

It is. :slight_smile:

Really? :slight_smile:

Yup. Very often the X server can accelerate things where DGA 1.0 doesn’t.
The MTRR code makes them almost the same speed on many systems, but still,
using the X server doesn’t hurt.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Sam Lantinga wrote:

If we’re gonna go fullscreen, it might aswell be a hardware surface,
unless the X11 protocol faster than DGA.

It is. :slight_smile:

Really? :slight_smile:

Yup. Very often the X server can accelerate things where DGA 1.0 doesn’t.
The MTRR code makes them almost the same speed on many systems, but still,
using the X server doesn’t hurt.

Yes, I know, I am the one that was bitching about X speed and bitching
about people that answered me to use DGA… ;-)–
Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
“First they ignore you. Then they laugh at you.
Then they fight you. Then you win.” – Gandhi

Yes, I know, I am the one that was bitching about X speed and bitching
about people that answered me to use DGA… :wink:

Remember: non DGA mode can be fast ONLY when screen and SDL depths (bits
per pixel) matches.

Jan BobrowskiOn Mon, 10 Jan 2000, Pierre Phaneuf wrote:

Yup. Very often the X server can accelerate things where DGA 1.0 doesn’t.
The MTRR code makes them almost the same speed on many systems, but still,
using the X server doesn’t hurt.

Yes, I know, I am the one that was bitching about X speed and bitching
about people that answered me to use DGA… :wink:

I was very interested in the thread that resulted from Pierre’s comments,
and have dutifully saved them away for reference.

Just wondering though-- is there an FAQ or something somewhere about
optimizing X performance?

I realize the question basically boils down to “how do I make my app an X
resource hog?”, which is probably at odds with the spirit of X, but maybe
not, what with DGA development and all. Anybody follow X development
closely enough to gauge the support for game-friendly extensions?

-Roy

Roy Wood wrote:

Just wondering though-- is there an FAQ or something somewhere about
optimizing X performance?

Not that I found, but if someone knows about one, post the URL here, I’d
be interested too!

Anybody follow X development closely enough to gauge the support for
game-friendly extensions?

The DRI work for 3D maybe could be coerced into providing us a gateway
into 2D features, like access to framebuffer memory with less hassle
than DGA and access to DMA, opening a door to calling the video
accelerator directly from the client application.

I am becoming an XFree86 developer to look into this.–
Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
“First they ignore you. Then they laugh at you.
Then they fight you. Then you win.” – Gandhi