opengl: Don't enable/disable texturing except when actually rendering.

Otherwise our cached state goes out of sync when updating a texture. Since
these state changes aren't necessary, they were removed instead of updating
the cached state.

Fixes Bugzilla #4998.

--HG--
extra : rebase_source : 6f9c8a275647e76a639e2959c4664f7641e0b34b
1 file changed