GL over remote X ;was Re: [lug] good assert library
jbs at quiotix.com
Mon Oct 7 04:58:53 MDT 2002
Chan Kar Heng wrote:
> from what i gather, pixmaps (bitmaps and the likes) get set across
> as is. (this i got to know about while reading gtk programming tutorials
> few years back).
This is correct, although it is possible for them to be sent across once
and then used many times. Well-written X clients will do this, but not
every X client is well-written.
> otherwise, window frames, buttons, labels, and basic graphical
> elements are sent as commands (not as bitmaps/pixmaps).
> it gets sent across as something like DrawRectangle(x1,y1,x2,y2)
> and so forth.. something like vector graphics...
Mostly correct, although with themes, there can be pixmaps involved in
all those things (see above for discussion of bitmaps).
> i'm not too sure how text is sent... didn't find out on that... sending
> the text isn't the issue... how the text font is rendered on a remote
> machine would be the issue...
The three ways to do text are:
1. use the ImageText/PolyText protocol requests, in which case the fonts
are managed by the server
2. send bitmaps containing the font data, and then use those bitmaps to
draw text (see above on bitmaps)
3. Render the text in the client and then send a bitmap containing the
rendered text. This is sometimes used for fancy rendering that exceeds
the capabilities of the font functions of the X server (e.g.
antialiasing), although most of this can now be done on the server using
the RENDER extension.
> as for GL... there's an X extension for it.. called GLX. (been catching
> glimpses of this around places for quite a while, but only bothered
> to read and know it recently.. sigh).
> apparently, GLX somehow "marshals" GL commands.
> that means, GL commands get packaged and sent to the context
> in the X server before they are rasterized.
More information about the LUG