Bug 3956 - Screenshots are never gamma corrected when in windowed mode.
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Video
Version: unspecified
Hardware: PC All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2009-02-06 16:57 EST by thisisformyjunk
Modified: 2009-03-14 00:20:03 EDT
0 users

See Also:


Attachments
fix for gamma correction when in windowed mode (1.25 KB, patch)
2009-02-06 17:00 EST, thisisformyjunk

Description thisisformyjunk 2009-02-06 16:57:28 EST
One of the conditions to use gamma correction for all of the various screenshot functions is tr.overbrightBits>0
When in windowed mode tr.overbrightBits is forced to 0. So gamma correction is not done. There is no reason to check tr.overbrightBits before doing gamma correction since you can have increased gamma and it still be 0.

If you remove this, gamma correction works as expected whether or not you are in windowed or fullscreen, or have overbrightBits on or off.

here is a patch, it is only 4 lines that need to be changed.
http://dev.randomkeywhacking.com/viewvc/trunk/src/renderer/tr_init.c?r1=266&r2=265&pathrev=266&root=trepidus&view=patch
Comment 1 thisisformyjunk 2009-02-06 17:00:46 EST
Created attachment 1963 [details]
fix for gamma correction when in windowed mode
Comment 2 Zachary J. Slater 2009-03-14 00:20:03 EDT
21:12 < CIA-56> ioq3: tma * r1509 /trunk/code/renderer/tr_init.c: 
21:12 < CIA-56> ioq3: * Remove unexplainable ( tr.overbrightBits > 0 ) condition when correcting
21:12 < CIA-56> ioq3:  gamma in screenshots