fixed a bug in gl state in binding texture, added a method for mass adding objects