Revert "Factorize GL state changes to get better performances."

This reverts commit 17be149e02262e2c22ab2a1aa40bdfe8ec696251.