https://bugs.winehq.org/show_bug.cgi?id=41930
Vyacheslav Chigrin vyacheslav.chigrin@izba.dev changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |vyacheslav.chigrin@izba.dev
--- Comment #60 from Vyacheslav Chigrin vyacheslav.chigrin@izba.dev --- Hello, I spent few days debugging this game, and found 3 issues with graphics. 1. One already known bug with not properly initialized offline OSMesa context (many thanks to Bryan Varner for discovering it making fix for it). 2. Seems, game expects RGB 555 format for 16-bit bitmaps, whereas OSMesa use RGB 565. Due to that lines on "diplomaŃy" screen were displayed in weird patterns. I locally fixed it by making "mirror" buffer between off-scrreen DIB and OSMesa, and converting colors between different formats during communications with OSMesa (hooked MakeCurrent and glFlush/glFinish). 3. Seems, game use both Windows GDI and OpenGL for drawing to the off-screen DIB at the same time! Due to that icons of the leaders on the diplomacy screen were missed. I locally fixed that by adding a lot of "notification" hooks at the end of GDI functions, and calling from them OSMesa to update it state of the DIB.
Draft of my changes can be found here https://github.com/vchigrin/wine/pull/1/files (it is based on Wine master few weeks ago).
I am asking what do you guys think of this approach? Is it possible that these changes may be accepted, or from architectural point of view something here should be done in other way? I suspect that from performance point of view these fixes are very ineffective.