reading here :/
The patch that sednogma / fenris supplied in the first post of this topic is in place in the latest souces of Wine. just a heads up.
Is anyone able to confirm that?Beware that WoW calls glClear() multiple times per frame though. I recommend to use the glXSwapBuffers() hook which is described below.
I can't use the glXSwapBuffers hook as I distribute a tool for WoW and I don't really want to force people to patch and compile Wine.
I measured the frequence WoW calls glGlear and my results are even below the framecount displayed by WoW itself.
It's always like 15 fps shown by WoW and 13-14 calls to glClear.
So I assume the fps displayed by WoW are inaccurate and glClear is just fine if you don't attempt to paint yourself.
Hey, it compiles! Ship it!
I haven't tried running wow under wine, but I know that it calls clear multiple times per frame under d3d at least. (3 times iirc)
A simple way to test it would be to hook both glClear and glXSwapBuffers to see how many clears there are between each buffer swap.
And as long as you don't do your own rendering it shouldn't matter much even if they do clear more than once if your hook runs fast enough to not impact the fps to much.
Another solution would be to write a "code FPS" mechanic where you count the given number of clears in a second and calculate what n'th clear call your code should run at to retain the code fps specified
“Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.” - Rich Cook
You can always redistribute your patched /usr/lib/wine/opengl32.dll.so with your tool and tell your users to replace their version with yours. Wine generally works pretty well even when you mix and match its libraries, especially with components like opengl32.dll.so that basically don't change at all between versions. I'm still using 1.3.11's gdi32 patched with DIB engine on 1.3.23 and I don't have any problems, so I doubt something as rarely touched as opengl32.dll.so will break anything.
ATM, wow crashed onUbuntu 64-bit 12.04 with ptrace_scope=0Code:if( read_uint(0x00A70C50) ) { p1 = read_uint(0x00A70C50); p2 = read_uint(p1 + 0x38); p_base = read_uint(p2 + 0x24); }
Code:Unhandled exception: page fault on read access to 0xc11456c1 in 32-bit code (0xf77176ee).