Image depth, visuals and colormaps

2012-05-30 Thread Alexandre CONFIANT-LATOUR

Hi,

I'm currently working on a small video driver module, based on Dummy 
driver and i am trying to provide a run-time color depth change. My 
work is server-side only and i don't use Xlib.


The original Dummy driver is a software driver that draw things in 
memory. There is no hardware limitations but also no outputs. So i 
export frames using :


--- Begin Code--

screenPixmap = pScreen-GetScreenPixmap(pScreen);
pScreen-GetImage( screenPixmap-drawable, 0, 0,
   pScreen-width, pScreen-height,
   ZPixmap, 0x, myOutBuffer );
then write buffer to file, socket, ...

 End Code---

What are the good practices for getting on the fly color depth 
switching to work ?


Can i implements this through Visuals or Colormaps ?

Thanks in advance.

--
Alexandre Confiant-Latour
WWW   : http://user-unfriendly.net
@ : cmwachouke...@gmail.com
Jabber: chouke...@im.apinc.org
GPG Key ID: 0x18CA62CC (pgp.mit.edu)
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com


Re: Image depth, visuals and colormaps

2012-05-30 Thread Adam Jackson

On 5/30/12 4:32 AM, Alexandre CONFIANT-LATOUR wrote:


What are the good practices for getting on the fly color depth
switching to work ?


That's not a thing xserver is set up to do, because that's not a thing X 
lets you do.  The list of depths is constructed statically at server 
startup, and the only way to get the list of depths and visuals is in 
the initial connection handshake; which means it doesn't happen, because 
clients are not written to disconnect and reconnect.  You could probably 
hack something into working, but.


A much easier thing to do would be to simply export multiple _screens_ 
from the same display, each with a different depth, and then run your 
rendering against the screen with the depth you want instead of trying 
to switch the depth of a single screen.


- ajax
___
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com