File: ScreenDacBits.m

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,796 kB
  • sloc: ansic: 176,245; cpp: 20,103; objc: 5,393; sh: 2,753; python: 1,397; php: 384; makefile: 193; java: 113
file content (23 lines) | stat: -rw-r--r-- 1,075 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function dacBits = ScreenDacBits(w)
% dacBits = ScreenDacBits(windowPtrOrScreenNumber)
%
% What is the precision of the DACs on this graphics card? Always returns 8 bpc.
% Results of this function are not trustworthy, don't rely on it!
% Kept for backwards compatibility with old code for now.
%

% 2/27/02  dhb,ly  Wrote it.
% 3/20/02  dgp     Cosmetic.
% 3/26/02  dhb     Gen2 Radeon card check.
% 6/6/02   dgp     Renamed DriverDacBits. When we don't know dacBits, ask the driver.
% 6/7/02   dgp     Cache the answer.
% 6/8/02   dgp     Renamed ScreenDacBits.
% 6/20/02  dgp     Moved all code to PrepareScreen.m.
% 10/10/06 dhb     Just always return 8 bits, until we figure out how to update.
% 05/21/07 mk      Return queried dac size from screen. This will return 8
%                  bits if it can't query real dac size.
% 06-30-23 mk      Always return 8 bits. No way to find the right value atm. on
%                  any OS, so don't pretend to able to do so.

dacBits = 8;
warning('ScreenDacBits: Reporting made up 8 bpc, which may be too low for your setup.');