XComposite and GLX

Amir Bukhari ufz6 at rz.uni-karlsruhe.de
Sun Sep 26 00:54:05 PDT 2004


On Sun, 2004-09-26 at 08:24, Ralph Thomas wrote:
> I don't know if this is helpful or not (as I don't know GLX server
> internals), but couldn't you get GL programs to render off-screen by
> creating a pbuffer with the same fbconfig as the visual of the
> on-screen window, and then make the context current with the pbuffer
> instead of the window?
> 
For me, we want to rendered a GL Context to off-screen when Composite
request that. GL programs has no knowledge if they render to pbuffer or
to window or pixmap. Composite redirct window to offscreen not pixmap or
pbuffer.
your seggestion could be implemented, but only when Composite is
requested to redirect window when GL program make context current, but
this has many problem, because the current Composite has no knowledge
about pbuffer and Composite manager doesn't if the window is associated
with GL programs or not. others X Server can not access pbuffer, because
it is specific to GL.
> If you can get something that looks like an XPixmap (representing your
> off-screen window) located in video card memory, then you might be
> able to create something like a GLXPixmap for it. This would allow you
> to do mixed mode X/GL rendering.

Current GLX implementation has no access to video memory (it use
software rendering). for xserver it doesn't matter where pixmap are
located either in memory or video memory, it should only can access it.
what you talk about is when GLX support hardware rendering inside
XServer, then it could be implemented.
I know from OS programming that most video card attached their video
memory to physical memory (mostly over the third GIGA byte address).
only Kernel can access them, because it can mapp then to virtual
address. 
this is done in Xserver by Video card drivers, which take care about
such work. when 3D accelarated card drivers is support in Xserver, they
could allocated offscreen pixmap on video memory, and GL could render to
it.

Note:
I stil not enough familiar with Xserver internal, if I have made mistake
here please correct me!!
-- 
Amir Bukhari <ufz6 at rz.uni-karlsruhe.de>




More information about the xorg mailing list