Some optimisation, fix color format for the openGl texture