justingardner / mgl

A suite of mex/m files for displaying psychophysics stimuli
http://justingardner.net/mgl
Other
18 stars 22 forks source link

Create commands for repeated frames/stimuli in metal #67

Closed benjamin-heasly closed 2 years ago

benjamin-heasly commented 2 years ago

To go along with the render pipeline test in #65 , we want to create a set of "repeating" commands for the Metal app to execute without needing to consult the socket connection to Matlab.

Actually, we already did, and this issue is just here to call them out and add some commentary.

The new commands are:

Each one is initiated by a single command from Matlab to the Metal app, and then the Metal app will run automatically for a specified number of frames, repeating the same draw command and in most cases randomizing what it draws.

On each frame during the sequence the Metal app will write back to Matlab two timestamps:

The help text for each of these commands gives an example of how the returned timestamps can be plotted to see how long the Metal app took on each frame to process the randomized draw commands, and to show the frame itself.