#22 Carmageddon: White windscreen in cockpit mode

open
None
1
2006-12-08
2006-12-08
No

Occurs in Level: Blood on the rooftops
(probably in others, maybe the level must contain fog)

In cockpit mode, Cars other than the eagle (the default car) have a white opaque windscreen.

The rear mirror works fine.

Carmageddon doesn't unlock the framebuffer after writing to it so MacGLide has to guess when to render the framebuffe contents.

Usally the framebuffer is only renderd on top of 3D in grBufferSwap(). Additionally for the cockpit mode the sequence of commands issued by the game is analysed in order to render the framebuffer cockpit overlay before rendering the rear mirror.

The problem can be avoided at all by setting PedanticFrameBufferEmulation = 1. In this case framebuffer writes are not grouped anymore and everything is rendered in the same sequence as issued by the game.

Turning on pedantic framebuffer emu incurs a serious performance impact of a factor of about 20.

(my test machine has just 1fps@450Mhz with pedantic emu turned on but I guess the game would probably be playable with a 2.5Ghz PowerPC :^)

TODO: Fog needed for the bug to occur (in the observed case the windscreen is of the same color as the fog)

Discussion