Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0002238Dwarf FortressGeneralpublic2010-06-09 21:242010-07-09 21:06
MrWiggles 
Baughn 
lowminoralways
resolvedfixed 
17 iMac G4OSX10.4.11
0.31.06 
0.31.09 
0002238: Full screen mode on PPC Mac is a shade of yellow, except where green normally. - OSX
Full screen mode on PPC Mac is a shade of yellow, except where green normally.
This does not happen in Intel Macs, 10.5.
This does not happen in Intel Macs, 10.5.
SDL-only
Issue History
2010-06-09 21:24MrWigglesNew Issue
2010-06-21 12:04FootkerchiefNote Added: 0008888
2010-06-21 12:04FootkerchiefTag Attached: AWAITING UPDATE
2010-06-21 12:07FootkerchiefTag Attached: SDL-only
2010-06-28 01:06MrWigglesNote Added: 0009204
2010-06-28 02:47oliverNote Added: 0009207
2010-06-28 02:47oliverIssue Monitored: oliver
2010-06-28 05:50FootkerchiefNote Added: 0009209
2010-06-30 13:11FootkerchiefNote Added: 0009399
2010-06-30 23:51MrWigglesNote Added: 0009448
2010-07-01 00:31oliverNote Added: 0009449
2010-07-01 07:00FootkerchiefTag Detached: AWAITING UPDATE
2010-07-02 20:04oliverNote Added: 0009555
2010-07-03 02:55MrWigglesNote Added: 0009564
2010-07-06 08:28BaughnNote Added: 0009684
2010-07-06 08:28BaughnStatusnew => resolved
2010-07-06 08:28BaughnFixed in Version => 0.31.09
2010-07-06 08:28BaughnResolutionopen => fixed
2010-07-06 08:28BaughnAssigned To => Baughn
2010-07-09 21:06oliverIssue End Monitor: oliver

Notes
(0008888)
Footkerchief   
2010-06-21 12:04   
Do you have any screenshots of this problem? What PRINT_MODE are you using? Have you tried updating your graphics drivers?
(0009204)
MrWiggles   
2010-06-28 01:06   
http://s296.photobucket.com/albums/mm198/aliceingorelandpictures/?action=view&current=Picture7.png [^]

And water is also invisible.

Driver updates is a none issue for Macs largely.

[PRINT_MODE:2D]
(0009207)
oliver   
2010-06-28 02:47   
Do you get the same effect when zooming in windowed mode? If so it's probably the scaling code at fault.
(0009209)
Footkerchief   
2010-06-28 05:50   
Do you still get this problem if you change the PRINT_MODE?
(0009399)
Footkerchief   
2010-06-30 13:11   
Reminder sent to: MrWiggles

Do you get the same effect when zooming in windowed mode?

Do you still get this problem if you change the PRINT_MODE?
(0009448)
MrWiggles   
2010-06-30 23:51   
When zooming in window mode while under 2D, no the issues does not happen.

Switching to 2DSW seem to have fixed the issue.
(0009449)
oliver   
2010-07-01 00:31   
I think I see the problem. When creating a tile, the 2D HW renderer calls SDL_CreateRGBSurface() with SDL_HWSURFACE and expects the returned surface to have the pixel format specified. However looking at the actual SDL code, it seems that when SDL_HWSURFACE is specified, the pixel format of the actual screen is used, not the one specified in the call. (The manpage actually contradicts this, you need to look at the SDL code itself)

Presumably on this particular PPC hardware, the underlying screen format in fullscreen mode is then something other than the RGBA layout that the tile renderer expects.

I'm not sure quite why we're requesting a HW surface there anyway: the code calls SDL_DisplayFormat (via SDL_Resize) on the returned surface eventually, which should return a HW surface where appropriate anyway. Maybe the fix is to just always initially create a SW surface for tiles, regardless of the 2D vs. 2DSW setting.
(0009555)
oliver   
2010-07-02 20:04   
I've put a patch which makes this change at http://s3test.randomly.org/df/2238/dflibgraphics-2drenderer-use-swsurface.txt [^]

It makes no difference on my Linux system, so at least it doesn't break anything. Performance is unchanged, but 2D and 2DSW performance are essentially identical on my system anyway.

Unfortunately I don't have an OSX environment to build/test on.
(0009564)
MrWiggles   
2010-07-03 02:55   
If willing to provide instructions, I'd give it a go.
(0009684)
Baughn   
2010-07-06 08:28   
Setting HWSURFACE (and that entire branch) is legacy code from before we used a resizer.

I've taken care of it.