openglonmetal / MGL

OpenGL 4.6 on Metal
Apache License 2.0
781 stars 30 forks source link

MGL does not honor texture change #74

Open conversy opened 1 year ago

conversy commented 1 year ago

This issue is for the record: it was impossible to change textures between two draw calls. I have a fix now in the glReadPixels branch : https://github.com/openglonmetal/MGL/commit/8ed220106076e6401acacda328b6cd4dfdbdf0fb

The interested bits are here: https://github.com/openglonmetal/MGL/commit/8ed220106076e6401acacda328b6cd4dfdbdf0fb#diff-53869c6b718c68a2c6e310b9c365722b67309d9e91c1aad12163de25965e16dcL2431-R2434

After: RETURN_FALSE_ON_FAILURE([self bindActiveTexturesToMTL]); I added: RETURN_FALSE_ON_FAILURE([self bindTexturesToCurrentRenderEncoder]);

I hope this is correct and what's intended.