Nothing wrong with your SUB gl. The only problem is you don’t have a sub _gl
SCREEN _NEWIMAGE(800, 600, 32)
END
SUB gl ()
_GLVIEWPORT(0,0,_WIDTH, _HEIGHT)
END SUB
SUB _GL
gl
END SUB
I’m thinking the above should work without any issues, unless there’s perhaps a naming conflict.