fixed #2144 modify condition for WebGL Mode.

modify condition for WebGL Mode.