[Xorg] X on OpenGL
jdennis at redhat.com
Mon Jul 12 12:08:51 PDT 2004
> > Right... glReadPixels, glCopyPixels and glDrawPixels... however
> > everyone says that implementations of these are dog-slow (abuse
> > of the hardware) and you're better off writing to a texture (which
> > is kludgy in many contexts)...
> > <snip>
> > Why is it that OpenGL drivers seem to universally have this behaviour?
> I suspect that, in order to get consistent results, the gl*Pixels calls are
> implicitly preceeded by a glFinish call, which would impose a synchronization
Most contemporary hardware can insert draw pixels equivalent rendering
commands into the rendering data stream thus negating the need for
sync. Reads that return pixel to the cpu still require a sync and
The real reason why the glPixel operations have traditionally been slow
1) The pixel pipeline in OpenGL is a series of complex operations that
is non-trivial to optimize. I know, I did a lot of work in this area for
a certain vendor. It can be done, it just takes work, now to reason 2
2) The pixel pipeline does not affect the performance of games, which is
the design center for most OpenGL hardware and drivers, so why make an
engineering investment when there is little or no return?
 Just because hardware can support pixel operations in the rendering
stream it does not mean the considerable effort to support this has been
put into the driver.
John Dennis <jdennis at redhat.com>
More information about the xorg