CullFace state change bug and fix #9465

Fix Bug,
Cull face is enabled and only change back and front does not work.

Texture invalid parameter in release mode
fix #9465