From: Stephen J B. <sj...@li...> - 2000-06-21 14:25:42
|
On Wed, 21 Jun 2000, Martin Olveyra wrote: > question 2: > What is exactly GLX? Why doesnt appears neither in XFree86 4.0 nor Mesa3D > distributions? Does GLX works through DRI? GLX is two (confusingly similarly named) things: 1) The glX API which has the necessary hooks to allow applications to connect X windows and OpenGL rendering contexts. eg glXChooseVisual glXCreateContext glXSwapBuffers glX isn't portable outside of X-windows - so under M$-windoze you have 'wgl' calls like 'wglSwapBuffers'. Under MacOS you get 'agl' ...and so on. This usage of the term "glX" is present in all OpenGL implementations under X-windows, including Mesa/XFree4.0. 2) A protocol layer that theoretically exists between the application and the underlying renderer to pass rendering commands to the renderer and results back to the application. I say "theoretically exists" because DRI's objective is eliminate the GLX layer and let you do "Direct Rendering" (the 'DR' in 'DRI'). However, GLX is still important when (for example) you are running your program on a remote host machine and your local machine is simply acting like an X-terminal. The OpenGL commands made by the program on the host are sent via the GLX protocol (like other X commands) to the machine on your desk that does the rendering. Theoretically, GLX allows this to work even when one machine is (say) an SGI box running IRIX and SGI's own OpenGL and the other a PC running Linux and Mesa. In practice that doesn't work all that well (yet). Some OpenGL implementations (eg Utah-GLX) use GLX even on a single machine - which is why they are (currently) slower than DRI. The idea is to merge the two and have OpenGL use DRI when it can - and fall back on GLX when it can't. I don't think other (non-X-windows-based) OS's have an equivelent to the GLX protocol. > question 3: > Does glut works through DRI? GLUT uses the glX API (under X-windows) or wgl (under M$-windoze) and OpenGL - so if those use DRI, so will GLUT. If they use the GLX protocol then GLUT will too. GLUT is nothing really magical - it's just a chunk of application code provided for convenience. Try to say 'glX' when you mean the API and 'GLX' when you mean the protocol and that'll minimise confusion. Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |