Retrieve live eye-image from Eyelink, show it in onscreen window.
This function is normally called from within the Eyelink() mex file.
Normal user code only calls it once to supply the eyelink defaults struct.
This is handled within the EyelinkInitDefaults.m file, so you generally
should not have to worry about this. However, if you change settings in
the el structure, you may need to call it yourself.
To define which onscreen window the eye image should be
drawn to, call it with the return value from EyelinkInitDefaults, e.g.,
to actually receive and display the images, register this function as eyelink’s callback:
if Eyelink(‘Initialize’, ‘myEyelinkDispatchCallback’) ~=0
error(‘eyelink failed init’)
result = Eyelink(‘StartSetup’,1) %put the tracker into a mode capable of sending images
%then you must hit ‘return’ on the PTB computer, this key command will be sent to the tracker host to initiate sending of images.
This function fetches the most recent live image from the Eylink eye
camera and displays it in the previously assigned onscreen window.
15.3.2009 Derived from MemoryBuffer2TextureDemo.m (MK).
4.4.2009 Updated to use EyelinkGetKey + fixed eyelinktex persistence crash (edf).
11.4.2009 Cleaned up. Should be ready for 1st release, although still
pretty alpha quality. (MK).
15.6.2010 Added some drawing routines to get standard behaviour back. Enabled
use of the callback by default. Clarified in helptext that user
normally should not have to worry about calling this file. (fwc)
20.7.2010 drawing of instructions, eye-image+title, playing sounds in seperate functions
1.2.2010 nj modified to allow for cross hair and fix bugs