You can use the GL_TEXTURE_RECTANGLE_ARB extension to quickly load a dynamically generated image of arbitrary size into an OpenGL texture. You can find examples of using python to use dynamic vector graphics with opengl at http://cairographics.org/OpenGL/ , although if you want to display complex formulas, you also need to look at a suitable system such as latex.
source share