Generate the Nx3 values for a linear gamma ramp on the current platform.
This uses heuristics about known graphics cards to guess the 'rampType' if
none is exlicitly given.
Much of this work is ported from LoadIdentityClut.m, written by Mario Kleiner
for the psychtoolbox
rampType 0 : an 8-bit CLUT ranging 0:1
This is seems correct for most windows machines and older OS X systems
Known to be used by:
OSX 10.4.9 PPC with GeForceFX-5200
rampType 1 : an 8-bit CLUT ranging (1/256.0):1
For some reason a number of macs then had a CLUT that (erroneously?) started with 1/256 rather than 0
Known to be used by:
OSX 10.4.9 with ATI Mobility Radeon X1600
OSX 10.5.8 with ATI Radeon HD-2600
maybe all ATI cards?
rampType 2 : a 10-bit CLUT ranging 0:(1023/1024)
A slightly odd 10-bit CLUT that doesn't quite finish on 1.0!
Known to be used by:
OSX 10.5.8 with Geforce-9200M (MacMini)
OSX 10.5.8 with Geforce-8800
rampType 3 : a nasty, bug-fixing 10bit CLUT for crumby OS X drivers
Craziest of them all for Snow leopard. Like rampType 2, except that the upper half of the table has 1/256.0 removed?!!
Known to be used by:
OSX 10.6.0 with NVidia Geforce-9200M
|