Changed the order of initialize and open so that the opengl context can be handled before I create the UI which attempts to generate a texture(doing the opposite order leads to an invalid operation).
Changed texenvi to use GL_DECAL so that it didn't try to blend the texture colors with the last glColor call.