Fixed bug caused by mixing GLES and GL texture extensions.