From: Burkhard P. <pl...@ip...> - 2004-10-14 13:54:30
|
> We can run 3 X servers independently. He-he. On different machines! > I'll try that later. If you have them on different machines, the OpenGL calls will be tunneled through the X-Protocol to different Servers. X-Protocol calls are driver independent. Why does the client machine need separate Gl Libs then? > Not actually. It depends... If you want to do it right, you must. If you pass a context pointer with each OpenGL call, you implicitely allow people intermix calls with different contexts (I know that it's nosense, but you never know what programmers do, when nobody watches them) And then you must use glxMakeCurrent in each call, which adds some cycles to the overhead calculation below. If you forbid to intermix such calls, you don't need the context pointers and leave things as they are in plain GLX/OpenGL. > Hm, let one function call overhead will be 100 instructions > (VERY high overhead). I think 100 is realistic. I'm no assembler/CPU guru, but calling functions via dlsym pointers seems a bit slower than direct calls. > It will be (less than, due to architecture) > 15000*100=1.500.000 CPU clocks. On a 1GHz it's 1.5ms. > Is that much? Ok, I made some errors before: I have 5120 Triangles, 9 OpenGL calls per triangle (3 * (glNormal + glTexCoord + glVertex)) makes 46080 calls per frame. The mesh is much too complicated to make a triangle strip. Overhead becomes then 4.608 ms for 1GHz CPU speed. Assuming the lemuria framerate of ca. 30 fps, it's 13.8 %. And the 46080 calls are not the only ones which are necessary to draw the picture. This time could be used to make better looking animations than enabling features which are useless for 99% of all users. If the usage of multiple OpenGL libs cannot be avoided: Would it make sense to have them in separate processes? The LD_PRELOAD environment variable can easily force a certain libGL.so to be used, and OpenGL can be used as we learned it. -- _____________________________ Dr.-Ing. Burkhard Plaum Institut fuer Plasmaforschung Pfaffenwaldring 31 70569 Stuttgart Tel.: +49 711 685-2187 Fax.: -3102 |