console-gl: add opengl rendering helper functions