These changes need to be mirrored in gfx_tinygl