justingardner / mgl

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

Support 1D textures #37

Closed benjamin-heasly closed 1 year ago

benjamin-heasly commented 2 years ago

MGL v2 with OpenGL supported 1D textures. Currently MGL createTexture only expects 2D textures with RGBA element values.

There is a concept of 1D texture in Metal: https://developer.apple.com/documentation/metal/mtltexturetype/type1d I'm not sure if it's the same thing we want.

Either way, we ought to be able to support this concept -- perhaps by creating 1xn textures with equal RGB values, and perhaps choosing UV coordinates cleverly when we blt them

justingardner commented 1 year ago

This appears to be working now