Stefan Dösinger wrote:
Why do you want to hook GL functions? I consider this a hacky workaround for bugs which should be fixed otherwise, but I might be wrong with this. The only thing I know is a workaround for the fglrx driver, but for Wine, this was fixed elsewhere.
I want to create fraps for linux. Using XShmGetImage() and friends is too slow. So my first approach was to create a fullscreen opengl app and do glReadPixels(). But this performs very badly when there are two opengl applications running at the same time (fps drops from
100 down to ~10).
So my last approach was to call glReadPixels() from the same opengl context (the same opengl application). This is why I need to hook glXSwapBuffers(). Of course I could write a whole libGL.so with all the required functions, rename the real libGL.so to libRealGL.so, dlopen libRealGL.so from my libGL.so and propagate the function calls to the real opengl implementation, then wine would dlopen libGL.so (my library) and I could make whatever I need in glXSwapBuffers(). But this is overkill!
Now what are my options besides modifying the wine source?
tom