瀏覽代碼

Merge pull request #148 from kiroukou/patch-1

Update GlslOut.hx
Nicolas Cannasse 9 年之前
父節點
當前提交
7e826035c5
共有 1 個文件被更改,包括 5 次插入1 次删除
  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);
 	}
 
-}
+}