Hi all,
I’ve been generating custom full-screen images in Matlab and using Screen(‘MakeTexture’) to display them. I found that using singles data type significantly reduce my image generation time, but since Screen(‘MakeTexture’) does not take singles as input, I lost most of the gained time converting my singles matrix to doubles.
Knowing what Screen(‘MakeTexture’) does, I think there’s no reason why it cannot take singles as its image input to make the process more efficient.
So, I took a look at the PTB source code for Screen(‘MakeTexture’). As far as I can tell, to make it accept singles (floats), it is the exact same operations as for doubles with the data type swapped – basically all the sections that deals with doubles needs to be copied and repeated to instead deal with floats. Besides it being a chore and eyesore of a code, does anyone see any issues? Hidden catchas? Is there a more succinct way to approach this?
Blessings,
Spencer