Notes on adding accelerated OpenGL support to Cygwin/X

Harold L Hunt II huntharo@msu.edu
Fri Jan 30 08:07:00 GMT 2004


I just spoke with Torrey Lyons regarding OpenGL acceleration in Xdarwin. 
  He enlightened me on several points:

1) Most of the code that I described in my first email is for the 
"direct" rendering path.  That path allows X Clients on the same machine 
as the X Server to avoid calling through the X Server and instead of the 
GLX lib draw directly to OpenGL.

2) There is another path called the "indirect" rendering path.  This 
path is used by all remote clients that use OpenGL as well as by local 
clients if the "direct" rendering path is not provided.  Thus, the 
"indirect" path must always be provided.

3) The "direct" path is not needed until later and the "indirect" path 
is much, much simpler.


Implementing the "indirect" path:

1) See xc/programs/Xserver/GL/apple/indirect.c

2) indirect.c should be simple to duplicate and will give all of the 
functionality needed for indirect acceleration.  This will still provide 
a tremendous boost in performance for OpenGL apps, as well as a decrease 
in CPU usage.

3) The only tricky bit is that we need to take a WindowPtr in indirect.c 
and translate it into either the HWND for the corresponding Win32 
window, or we need to translate it directly into a handle/pointer to the 
OpenGL surface associated with that window.


I actually already have most of the "direct" path code compiling, but I 
will be shelving that for the moment until we implement the "indirect" 
path.  Please, work on the "indirect" path first if you are interested 
in this.

Thanks for contributing,

Harold



More information about the Cygwin-xfree mailing list