On Fri, Nov 15, 2002 at 07:45:21AM -0700, Brian Paul wrote: > Jens Owen wrote: > > Ian Romanick wrote: > > > >> Can I get a quick run-down of the GLX code so that I can know where to > >> begin? > > > > > > Most of the server side support for GLX proper is in: > > > > xc/programs/Xserver/GL/glx > > > > This provides the main extension for indirect rendering and interfaces > > with the "../dri" and another glue piece "../mesa/src/X", I think, to > > complete the server side support. > > > > The client side support is in: > > > > xc/lib/GL/glx > > That's basically it. If you've got detailed questions I can try to > answer them. Adding new extensions which just add new enum values > is pretty simple. Adding new GL/GLX functions is more work since you > have to implement the GLX encode/decode functions and server-side > dispatch.
I'm going to implement SGI_swap_control (which adds glXSwapIntervalSGI) first because implementing it in any of the drivers that supports the vblank syncing would be trivial. That way 99% of the work in not device dependent. :) In the R200 driver, the behavior of SGI_swap_control can be added by changing r200WaitForVBlank to do something like: if ( rmesa->swap_interval != 0 ) { vbl.type = DRM_VBLANK_ABSOLUTE; vbl.sequence = rmesa->vbl_seq + rmesa->swap_interval; } else if ( getenv("LIBGL_SYNC_REFRESH") ) { ... The only catch is that I can find NO documentation of the GLX protocol for it. Given that, I'm going to implement it for direct rendering contexts only. I believe that this could be done by either adding a new entry point to __DriverAPIRec or adding a swap_interval field to __DRIcontextPrivateRec and adding a DRIswapInterval function to dri_util.c. I would then fill-in glXSwapIntervalSGI in lib/GL/glx/glxcmds.c to look either like glXSwapBuffers or glXUseXFont (for their gc->isDirect cases, anyway). What needs to be done in programs/Xserver/GL/glx/? How do I get the extension string exported? This also applies to the GLX_ARB_get_proc_address string. :) -- Smile! http://antwrp.gsfc.nasa.gov/apod/ap990315.html ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel