remove unused maxConfigs
fix some data issues in glTexImage2D