Some fix to speed up opengl loading