evas 3d: Fix shaders compilation (parallax and normal)
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 22 Jun 2016 05:27:20 +0000 (14:27 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 22 Jun 2016 05:30:37 +0000 (14:30 +0900)
commit41e17f7e73840f89178bb3b1b50b3e483346ae95
treeb5f7e0d22e4e9427f4152b954c98e45aedb71340
parent8a273158788d630e56b4dc14cdd44f0eaae6b7b5
evas 3d: Fix shaders compilation (parallax and normal)

My nvidia EGL driver coultn't compile some shaders because of
the error:
  error C1059: non constant expression in initialization

The proposed patch at D4068 is not acceptable since it just
brings the original problem back. Instead, make sure all vec3
variables are initialized in main() or another function, not in
the global scope.

I tested all examples in evas
src/modules/evas/engines/gl_common/shader_3d/evas_gl_3d_shaders.x
src/modules/evas/engines/gl_common/shader_3d/include.shd
src/modules/evas/engines/gl_common/shader_3d/normal_map_frag.shd
src/modules/evas/engines/gl_common/shader_3d/parallax_occlusion_frag.shd