Browse Source

Fixed fragment shader highp nonsense.

marksibly 9 years ago
parent
commit
d68b328714
1 changed files with 9 additions and 3 deletions
  1. 9 3
      modules/mojo/graphics/glutil.monkey2

+ 9 - 3
modules/mojo/graphics/glutil.monkey2

@@ -89,9 +89,15 @@ End
 #end
 Function glCompile:Int( type:Int,source:String )
 
-#If __TARGET__="windows" Or Not __DESKTOP_TARGET__
-	source="precision mediump float;~n"+source
-#Endif
+	source="
+	#if GL_ES
+	#if GL_FRAGMENT_PRECISION_HIGH
+	precision highp float;
+	#else
+	precision mediump float;
+	#endif
+	#endif
+	"+source
 	
 	Local shader:=glCreateShader( type )
 	glShaderSourceEx( shader,source )