Re: Display Memory



On Thu, Jan 04, 2001 at 03:30:53PM +0800, Bluez Zhao wrote:
Hi everybody,
I want to get the image from display memory directly but not by calling
XGetImage.
Is there anyone who can tell me how can I do both on Solaris and Linux?
In general you can't do this.

Solaris OpenWindows has a direct X frame system that lets you talk to
the video card (framebuffer) directly, uing semaphores to lock the
X server out, but it is not easy to use.

You can use the direct memory X extension to share a single image,
using System V shared memory.  This is a limited resource, and is
not always available (on Linux, it's a kernel option), so your
program needs to work without it.

If you are trying to implement a screenshot, look at other programs
that do so (e.x. xwd -root).o

If you are hoping for more speed, writing to video memory is not going
to be fast on Solaris as using X; the X libraries will talk to
the hardware directly when it would be faster, too.

Lee

-- 
Liam Quin - Barefoot in Toronto - liam holoweb net - http://www.holoweb.net/
Ankh: irc.sorcery.net www.valinor.sorcery.net irc.gnome.org www.advogato.org
author, The Open Source XML Database Toolkit, Wiley, August 2000
Co-author, The XML Specification Guide, Wiley, 1999




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]