From 7cea86e31e93ba98b9bd7ceec39a36bcf17275b7 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 6 Dec 2011 18:18:31 +0100 Subject: [PATCH] fix glsl keyword list Add missing keywords and sort so it matches the keyword list in the OpenGL ES Shading Language Specification 1.00 revision 14. --- static/js/glsl.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/glsl.js b/static/js/glsl.js index dbe0d7e..f79469a 100644 --- a/static/js/glsl.js +++ b/static/js/glsl.js @@ -156,11 +156,11 @@ CodeMirror.defineMode("glsl", function(config, parserConfig) { for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } - var glslKeywords = "if break int case continue return default do " + - "else struct switch float for unsigned goto while void const signed " + - "vec2 vec3 vec4 mat2 mat3 mat4 precision lowp mediump highp uniform " + - "attribute varying gl_Vertex gl_FragCoord gl_FragColor sampler2D " + - "samplerCube"; + var glslKeywords = "attribute const uniform varying break continue " + + "do for while if else in out inout float int void bool true false " + + "lowp mediump highp precision invariant discard return mat2 mat3 " + + "mat4 vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 sampler2D " + + "samplerCube struct"; var glslBuiltins = "radians degrees sin cos tan asin acos atan " + "pow exp log exp2 log2 sqrt inversesqrt abs sign foor trunc " + "round ceil fract mod min max clamp mix step smoothstep length " +