[Xorg] Re: X on OpenGL
Rich Wareham
rjw57 at hermes.cam.ac.uk
Tue Jul 13 04:35:22 PDT 2004
On Tue, Jul 13, 2004 at 07:18:32PM +0800, Andy Sy wrote:
> John Dennis wrote:
>
> >Assigning the task of rendering for a windowing system to a rendering
> >API which is windowing system neutral is completely consistent with the
> >design goals of OpenGL.
>
> The task in question is not merely rendering /for/ a windowing system.
> It's rendering /the/ windowing system itself. So again, the question
> is, how suitable and how efficiently implemented is the OpenGL API
> (built mainly with *3D* rendering in mind) for the task of _implementing_
> a 2D windowing system.
>
> My main worries are that 2D operations might be klunkier or less
> efficient (considering the horror stories I've heard about the
> performance of glXXXXPixels()) to execute using the OpenGL API.
Disclaimer: all of this is IMHO, based on hacking around with OpenGL for
my PhD.
The 2D operations are, in fact, just generalisations of the 3d ones.
Switch to orthographic projection, turn off the z-buffer, use glVertex2*
and friends, etc and things can be just as fast, probably faster (since
there is no z-buffer writes) as 3d.
cf. the fact that most OpenGL games implement a windowed UI for settings
etc, in OpenGL that is perfectly responsive.
The concern about reading back from the framebuffer might be valid
since, clearly, this isn't a prime target for most games so that may
well be optimised somewhat less in a particular implementation. OTOH,
p-buffers and the like might possibly be used if someone could be
cunning.
About the only problem I can foresee is that standard OpenGL only
supports 2**n x 2**n textures although that can be overcome by some
cunningness (maintain a set of textures and 'stitch' windows together
from parts of them).
Of course none of this negates the fact that there are a set of older
cards which have only 2d acceleration. I guess the question is if people
want to force users of these to accept software rendered OpenGL or
whether a sufficient subset of OpenGL can be specified that can be
implemented on 2D only hardware.
Quartz Extreme /does/ use OpenGL-kinda for its window server but not
directly. More precisely the Apple openGL implementation and the window
server co-operate when talking direct to the graphics driver.
--
Rich
More information about the xorg
mailing list