Kaydet (Commit) 014633f8 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Use #version 140 to get inverse()

The Linux GLSL imlementation is very loose in its interpretation of
standards, it seems. (I am not surprised.) Not so on Windows, at least
with AMD drivers. The inverse() function (for float matririces) is
present only starting from GLSL 1.40. Bump the #version directive
accordingly. (See
https://www.opengl.org/sdk/docs/man/html/inverse.xhtml)

To get this to work again on OS X will be a further challenge. There a
'legacy' context only has GLSL 1.20. But the intent is to move this
code in the direction of using 'core' contexts anyway.

Change-Id: I572dc7cc30f90321b233fbfd857455dc01761a7c
üst e0d2acfa
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* *
************************************************************************/ ************************************************************************/
#version 120 #version 140
attribute vec3 a_position; attribute vec3 a_position;
attribute vec3 a_normal; attribute vec3 a_normal;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#version 130 #version 140
#define M_PI 3.1415926535897932384626433832795 #define M_PI 3.1415926535897932384626433832795
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* *
************************************************************************/ ************************************************************************/
#version 130 #version 140
attribute vec3 a_position; attribute vec3 a_position;
attribute vec3 a_normal; attribute vec3 a_normal;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#version 120 #version 140
#define M_PI 3.1415926535897932384626433832795 #define M_PI 3.1415926535897932384626433832795
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment