Rendering mathematical notation in Python / OpenGL?

math, opengl, pyglet, python, rendering

Solution

I would say generate suitable latex expression, rendering it into an image, then load the image as a texture.

Problem

How can I render mathematical notations / expressions in Python with OpenGL? I'm actually using pyglet however it uses OpenGL. Such things as this: I can't store static images as I am generating the expressions as well.

Original source