|
59 | 59 | % monitor width |
60 | 60 | % This assumes that the window fills the whole screen |
61 | 61 | cfg.screen.FOV = computeFOV(cfg); |
62 | | - cfg.screen.ppd = cfg.screen.winRect(3) / cfg.screen.FOV; |
| 62 | + cfg.screen.ppd = cfg.screen.winWidth / cfg.screen.FOV; |
63 | 63 |
|
64 | 64 | % Initialize visual parmaters for fixation cross or dot |
65 | 65 | cfg = initFixation(cfg); |
@@ -182,28 +182,11 @@ function initDebug(cfg) |
182 | 182 |
|
183 | 183 | % Enable alpha-blending, set it to a blend equation useable for linear |
184 | 184 | % superposition with alpha-weighted source. |
| 185 | + % Required for drwing smooth lines and screen('DrawDots') |
185 | 186 | Screen('BlendFunction', cfg.screen.win, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
186 | 187 |
|
187 | 188 | end |
188 | 189 |
|
189 | | -function cfg = initFixation(cfg) |
190 | | - |
191 | | - if strcmp(cfg.fixation.type, 'cross') |
192 | | - |
193 | | - % Convert some values from degrees to pixels |
194 | | - cfg.fixation = degToPix('width', cfg.fixation, cfg); |
195 | | - |
196 | | - % Prepare fixation cross |
197 | | - cfg.fixation.xCoords = [-cfg.fixation.widthPix cfg.fixation.widthPix 0 0] + ... |
198 | | - cfg.fixation.xDisplacement; |
199 | | - cfg.fixation.yCoords = [0 0 -cfg.fixation.widthPix cfg.fixation.widthPix] + ... |
200 | | - cfg.fixation.yDisplacement; |
201 | | - cfg.fixation.allCoords = [cfg.fixation.xCoords; cfg.fixation.yCoords]; |
202 | | - |
203 | | - end |
204 | | - |
205 | | -end |
206 | | - |
207 | 190 | function initText(cfg) |
208 | 191 |
|
209 | 192 | Screen('TextFont', cfg.screen.win, cfg.text.font); |
|
0 commit comments