Explorar o código

Merge pull request #148 from kiroukou/patch-1

Update GlslOut.hx
Nicolas Cannasse %!s(int64=9) %!d(string=hai) anos
pai
achega
7e826035c5
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      hxsl/GlslOut.hx

+ 5 - 1
hxsl/GlslOut.hx

@@ -372,6 +372,10 @@ class GlslOut {
 		decls = [];
 		buf = new StringBuf();
 		exprValues = [];
+		//Version is required on desktop for precision qualifier, but version 1.0.0 only is supported on webgl
+		#if !js
+		decls.push("#version 130");
+		#end
 		decls.push("precision mediump float;");
 
 		if( s.funs.length != 1 ) throw "assert";
@@ -441,4 +445,4 @@ class GlslOut {
 		return new GlslOut().run(s);
 	}
 
-}
+}