[Bug 41930] Civilization III Complete shows black terrain (Wine compiled with OSMesa support)

WineHQ Bugzilla wine-bugs at winehq.org
Sun Feb 16 21:13:35 CST 2020


https://bugs.winehq.org/show_bug.cgi?id=41930

--- Comment #29 from Bryan Varner <bryan at varnernet.com> ---
Civ3 is requesting a 16 bit pixel format for the wglChoosePixelFormat...

0009:trace:wgl:wglChoosePixelFormat 0x1018e 0x32cca8: size 40 version 1 flags
40 type 0 color 16 0,0,0,0 accum 0 depth 0 stencil 0 aux 0


It's setting zeros for the bit channels, however, it's behaving as if it
expects an alpha channel, and that the raster buffer will be initialized with
transparency (I think).

The wglChoosePixelFormat is skipping all the formats with an alpha channel.
I've tried forcing it to use OSMESA_RGBA with a 32bbp buffer, but I get page
faults during the Civ3 glFlush().

The app is setting things up with
0009:trace:opengl:glEnable (3042)  (0x0BE2)  (GL_BLEND)
0009:trace:opengl:glBlendFunc (770, 771) (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)

But never calls a glClear() to set a background color.
I do see it calling glColor4f() with non-zero (1 and decimal floats) for the
alpha channel.

So it looks like wglChoosePixelFormat is returning a 16bpp buffer with no alpha
channel, while the game is expecting (but not explicitly requesting) a raster
with an alpha channel.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list