Parcourir la source

- add GLSL editor to SDK by default

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8421 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 il y a 14 ans
Parent
commit
acc4e9922f
59 fichiers modifiés avec 12895 ajouts et 1 suppressions
  1. 10 0
      jme3-glsl-support/build.xml
  2. 27 0
      jme3-glsl-support/license.txt
  3. 15 0
      jme3-glsl-support/manifest.mf
  4. 45 0
      jme3-glsl-support/nbproject/build-impl.xml
  5. 8 0
      jme3-glsl-support/nbproject/genfiles.properties
  6. 6 0
      jme3-glsl-support/nbproject/project.properties
  7. 103 0
      jme3-glsl-support/nbproject/project.xml
  8. 1 0
      jme3-glsl-support/nbproject/suite.properties
  9. 28 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/Bundle.properties
  10. 327 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/GlslCompletionProvider.java
  11. 65 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/GlslShaderFileObserver.java
  12. 172 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/GlslVocabularyManager.java
  13. 11 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/Bundle.properties
  14. 40 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataLoader.java
  15. 32 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataLoaderBeanInfo.java
  16. 24 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataNode.java
  17. 57 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataObject.java
  18. 44 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataLoader.java
  19. 37 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataLoaderBeanInfo.java
  20. 34 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataNode.java
  21. 60 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataObject.java
  22. 40 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataLoader.java
  23. 32 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataLoaderBeanInfo.java
  24. 24 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataNode.java
  25. 54 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataObject.java
  26. 4 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/glsl/Bundle.properties
  27. 316 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/glsl/GLSL_120.nbs
  28. 389 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/glsl/GLSL_130.nbs
  29. 361 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/glsl/Glsl.java
  30. 289 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/layer.xml
  31. 61 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/lexer/Glsl.java
  32. 343 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/lexer/GlslLexer.java
  33. 90 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/lexer/GlslTokenId.java
  34. BIN
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/opengl-icon.gif
  35. BIN
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/FragmentShaderIcon.gif
  36. 8 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/FragmentShaderTemplate.frag
  37. BIN
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GeometryShaderIcon.gif
  38. 26 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GeometryShaderTemplate.geom
  39. 28 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslFragmentShaderExample.frag
  40. 18 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslFragmentShaderResolver.xml
  41. 26 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslGeometryShaderExample.geom
  42. 18 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslGeometryShaderResolver.xml
  43. 29 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslVertexShaderExample.vert
  44. 18 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslVertexShaderResolver.xml
  45. 4724 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslVocabulary.xml
  46. 4724 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/JmeVocabulary.xml
  47. 26 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/NetBeans-glsl-fontsColors.xml
  48. BIN
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/OptionsIcon.gif
  49. BIN
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/VertexShaderIcon.gif
  50. 7 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/VertexShaderTemplate.vert
  51. BIN
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/field.gif
  52. BIN
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/function.gif
  53. BIN
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/preprocessor.png
  54. 56 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/vocabulary/GLSLElementDescriptor.java
  55. 33 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/vocabulary/GLSLVocabulary.java
  56. 2 0
      jme3-glsl-support/src/net/java/nboglpack/glsleditor/vocabulary/jaxb.index
  57. 1 0
      jme3-glsl-support/test/unit/src/META-INF/services/org.openide.loaders.DataLoader
  58. 0 1
      nbproject/platform.properties
  59. 2 0
      nbproject/project.properties

+ 10 - 0
jme3-glsl-support/build.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
+<!-- for some information on what you could do (e.g. targets to override). -->
+<!-- If you delete this file and reopen the project it will be recreated. -->
+<project name="net.java.nboglpack.glsleditor" default="netbeans" basedir=".">
+    <description>Builds, tests, and runs the project net.java.nboglpack.glsleditor.</description>
+    <!--property file="./../nbproject/global.properties"/>
+    <property file="./../nbproject/private/global_private.properties"/-->
+    <import file="nbproject/build-impl.xml"/>
+</project>

+ 27 - 0
jme3-glsl-support/license.txt

@@ -0,0 +1,27 @@
+Copyright (c) 2007, Michael Bien, Mathias Henze
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of the organization nor the names of its contributors may
+      be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 15 - 0
jme3-glsl-support/manifest.mf

@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+OpenIDE-Module: net.java.nboglpack.glsleditor
+OpenIDE-Module-Implementation-Version: 0
+OpenIDE-Module-Layer: net/java/nboglpack/glsleditor/layer.xml
+OpenIDE-Module-Localizing-Bundle: net/java/nboglpack/glsleditor/Bundle.properties
+
+Name: net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataLoader.class
+OpenIDE-Module-Class: Loader
+
+Name: net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataLoader.class
+OpenIDE-Module-Class: Loader
+
+Name: net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataLoader.class
+OpenIDE-Module-Class: Loader
+

+ 45 - 0
jme3-glsl-support/nbproject/build-impl.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT  ***
+***         EDIT ../build.xml INSTEAD         ***
+-->
+<project name="net.java.nboglpack.glsleditor-impl" basedir="..">
+    <fail message="Please build using Ant 1.7.1 or higher.">
+        <condition>
+            <not>
+                <antversion atleast="1.7.1"/>
+            </not>
+        </condition>
+    </fail>
+    <property file="nbproject/private/suite-private.properties"/>
+    <property file="nbproject/suite.properties"/>
+    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
+    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
+    <property file="${suite.dir}/nbproject/platform.properties"/>
+    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
+        <attribute name="name"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{name}" value="${@{value}}"/>
+        </sequential>
+    </macrodef>
+    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
+        <attribute name="property"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{property}" value="@{value}"/>
+        </sequential>
+    </macrodef>
+    <property file="${user.properties.file}"/>
+    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
+        <condition>
+            <not>
+                <contains string="${cluster.path.evaluated}" substring="platform"/>
+            </not>
+        </condition>
+    </fail>
+    <import file="${harness.dir}/build.xml"/>
+</project>

+ 8 - 0
jme3-glsl-support/nbproject/genfiles.properties

@@ -0,0 +1,8 @@
+build.xml.data.CRC32=a85cd232
+build.xml.script.CRC32=bcb3cbef
+build.xml.stylesheet.CRC32=79c3b980
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=7f5f482a
+nbproject/build-impl.xml.script.CRC32=d103b190
+nbproject/[email protected]

+ 6 - 0
jme3-glsl-support/nbproject/project.properties

@@ -0,0 +1,6 @@
+javac.compilerargs=-Xlint -Xlint:-serial
+javac.source=1.5
+license.file=license.txt
+nbm.homepage=http://kenai.com/projects/netbeans-opengl-pack
+nbm.module.author=Mathias Henze, Michael Bien
+spec.version.base=3.0.0

+ 103 - 0
jme3-glsl-support/nbproject/project.xml

@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+            <code-name-base>net.java.nboglpack.glsleditor</code-name-base>
+            <suite-component/>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor.completion</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.13.2</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor.lib</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>3</release-version>
+                        <specification-version>2.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.languages</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>0-1</release-version>
+                        <specification-version>1.84.0.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.lexer</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>2</release-version>
+                        <specification-version>1.20.0.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.filesystems</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.4.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.loaders</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>5.9.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.nodes</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.7.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.text</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.21.2</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.8.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.windows</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.16</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <public-packages>
+                <package>net.java.nboglpack.glsleditor</package>
+                <package>net.java.nboglpack.glsleditor.dataobject</package>
+                <package>net.java.nboglpack.glsleditor.glsl</package>
+                <package>net.java.nboglpack.glsleditor.lexer</package>
+                <package>net.java.nboglpack.glsleditor.vocabulary</package>
+            </public-packages>
+        </data>
+    </configuration>
+</project>

+ 1 - 0
jme3-glsl-support/nbproject/suite.properties

@@ -0,0 +1 @@
+suite.dir=${basedir}/..

+ 28 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/Bundle.properties

@@ -0,0 +1,28 @@
+OpenIDE-Module-Display-Category=jMonkeyEngine
+OpenIDE-Module-Long-Description=\
+    Provides syntax highlighting and code completion with documentation for jME3 GLSL shader files.
+OpenIDE-Module-Name=GLSL Editor
+OpenIDE-Module-Short-Description=Editor for jME3 shader files
+
+text/x-glsl-fragment-shader=GLSL Fragment Shader
+text/x-glsl-vertex-shader=GLSL Vertex Shader
+text/x-glsl-geometry-shader=GLSL Geometry Shader
+
+#Layer.xml entries for fonts & colors in Options window:
+NetBeans=NetBeans
+glsl-keyword=Keyword
+glsl-name=Name
+glsl-brace=Brace
+glsl-value=Value
+glsl-curly-brace=Curly brace
+glsl-string-value=String value
+glsl-comment=Comment
+glsl-ml-comment=Multiline comment
+glsl-separator=Separator
+glsl-function=Function
+glsl-whitespace=Whitespace
+glsl-end-of-line=EOL
+glsl-build-in-var=Build in variable
+glsl-build-in-func=Build in function
+glsl-preprocessor=Preprocessor directive
+

+ 327 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/GlslCompletionProvider.java

@@ -0,0 +1,327 @@
+package net.java.nboglpack.glsleditor;
+
+import java.util.Map.Entry;
+import java.util.Set;
+import org.netbeans.api.editor.completion.Completion;
+import org.openide.ErrorManager;
+import org.netbeans.editor.BaseDocument;
+import org.netbeans.spi.editor.completion.CompletionDocumentation;
+import org.netbeans.spi.editor.completion.CompletionItem;
+import org.netbeans.spi.editor.completion.CompletionProvider;
+import org.netbeans.spi.editor.completion.CompletionResultSet;
+import org.netbeans.spi.editor.completion.CompletionTask;
+import org.netbeans.spi.editor.completion.support.AsyncCompletionQuery;
+import org.netbeans.spi.editor.completion.support.AsyncCompletionTask;
+import javax.swing.Action;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.Element;
+import javax.swing.text.JTextComponent;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.event.KeyEvent;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Map;
+import net.java.nboglpack.glsleditor.dataobject.GlslFragmentShaderDataLoader;
+import net.java.nboglpack.glsleditor.dataobject.GlslGeometryShaderDataLoader;
+import net.java.nboglpack.glsleditor.dataobject.GlslVertexShaderDataLoader;
+import net.java.nboglpack.glsleditor.glsl.Glsl;
+import net.java.nboglpack.glsleditor.vocabulary.GLSLElementDescriptor;
+import org.netbeans.spi.editor.completion.support.CompletionUtilities;
+
+
+/**
+ * Completion provider for the OpenGL Shading Language editor.
+ *
+ * @author Mathias Henze
+ * @author Michael Bien
+ */
+public class GlslCompletionProvider implements CompletionProvider {
+
+    private static final ErrorManager LOGGER = ErrorManager.getDefault().getInstance(GlslCompletionProvider.class.getName());
+
+    private final String mimeType;
+    
+    private GlslCompletionProvider(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
+    public CompletionTask createTask(int queryType, JTextComponent component) {
+        return new AsyncCompletionTask(new GlslCompletionQuery(mimeType), component);
+    }
+
+    public int getAutoQueryTypes(JTextComponent component, String typedText) {
+        return 0;
+    }
+    
+    public static GlslCompletionProvider createVSCompletionProvider(){
+        return new GlslCompletionProvider(GlslVertexShaderDataLoader.REQUIRED_MIME);
+    }
+    
+    public static GlslCompletionProvider createGSCompletionProvider(){
+        return new GlslCompletionProvider(GlslGeometryShaderDataLoader.REQUIRED_MIME);
+    }
+    
+    public static GlslCompletionProvider createFSCompletionProvider(){
+        return new GlslCompletionProvider(GlslFragmentShaderDataLoader.REQUIRED_MIME);
+    }
+
+    
+    private static class GlslCompletionQuery extends AsyncCompletionQuery {
+
+        private GlslVocabularyManager vocabulary;
+
+        public GlslCompletionQuery(String mimetype) {
+            vocabulary = GlslVocabularyManager.getInstance(mimetype);
+        }
+
+        protected void query(CompletionResultSet completionResultSet, Document document, int pos) {
+            
+            fillResultset(completionResultSet, document, pos);
+            completionResultSet.finish();
+        }
+
+        private void fillResultset(CompletionResultSet completionResultSet, Document doc, int pos) {
+            
+            Element paragraph = ((BaseDocument) doc).getParagraphElement(pos);
+            String prefix;
+            try {
+                prefix = doc.getText(paragraph.getStartOffset(), pos - paragraph.getStartOffset());
+                // daf�r sorgen, dass wir in den meisten f�llen einen korrekten prefix haben
+                // TODO: besser machen, ist ne hau-ruck-methode
+                // problem: bei leerzeichen in strings werden auch dort funktoren als autocomplete angeboten...
+                prefix = prefix.replaceAll(".*?([\\w-\"]*)$", "$1");
+            } catch (BadLocationException e) {
+                LOGGER.notify(e);
+                prefix = "";
+            }
+
+            // add user declared functions first
+            synchronized(Glsl.declaredFunctions) {
+                Set<Entry<String, GLSLElementDescriptor>> entrySet = Glsl.declaredFunctions.entrySet();
+
+                for (Entry<String, GLSLElementDescriptor> entry : entrySet) {
+
+                    String name = entry.getKey();
+                    GLSLElementDescriptor desc = entry.getValue();
+                    
+                    if (name.regionMatches(true, 0, prefix, 0, prefix.length())) {
+                        completionResultSet.addItem(new GlslCompletionItem(name.substring(0, name.indexOf('(')), desc, prefix, pos));
+                    }
+                }
+            }
+
+
+            // add core GLSL completion items
+            Iterator it = vocabulary.getKeys().iterator();
+            
+            while (it.hasNext()) {
+
+                String name = (String) it.next();
+                
+                if (name.regionMatches(true, 0, prefix, 0, prefix.length())) {
+
+                    GLSLElementDescriptor[] elements = vocabulary.getDesc(name);
+                    
+                    if (elements != null) {
+                        for (GLSLElementDescriptor element : elements) 
+                            completionResultSet.addItem(new GlslCompletionItem(name, element, prefix, pos));
+                    }
+                }
+                
+            }
+        }
+    }
+
+    private static class GlslCompletionItem implements CompletionItem {
+
+        private String key;
+        private GLSLElementDescriptor content;
+        private int carretPosition = 0;
+        private String prefix;
+
+        private String leftText;
+        private String rightText;
+
+        private String ARGUMENTS_COLOR = "<font color=#b28b00>";
+        private String BUILD_IN_VAR_COLOR = "<font color=#ce7b00>";
+        private String KEYWORD_COLOR = "<font color=#000099>";
+
+        private int priority;
+
+        public GlslCompletionItem(String key, GLSLElementDescriptor content, String prefix, int carretPosition) {
+
+            this.key = key;
+            this.content = content;
+            this.prefix = prefix;
+            this.carretPosition = carretPosition;
+
+            leftText = createLeftText();
+            rightText = content.type;
+
+            // low prority is first in completion list
+            switch (content.category) {
+                case TYPE:
+                    priority = 10;
+                    break;
+                case JUMP:
+                    priority = 9;
+                    break;
+                case SELECTION:
+                    priority = 8;
+                    break;
+                case ITERATION:
+                    priority = 7;
+                    break;
+                case KEYWORD:
+                    priority = 6;
+                    break;
+                case QUALIFIER:
+                    priority = 5;
+                    break;
+                case BUILD_IN_FUNC:
+                    priority = 4;
+                    break;
+                case BUILD_IN_VAR:
+                    priority = 3;
+                    break;
+            }
+        }
+
+        private String createLeftText() {
+
+            StringBuilder text = new StringBuilder();
+
+            switch (content.category) {
+                case TYPE:
+                case JUMP:
+                case SELECTION:
+                case ITERATION:
+                case KEYWORD:
+                case QUALIFIER:
+                    text.append(KEYWORD_COLOR);
+                    break;
+                case BUILD_IN_VAR:
+                    text.append(BUILD_IN_VAR_COLOR);
+                    break;
+            }
+            
+            text.append("<b>");
+            text.append(key);
+            text.append("</b></font>");
+
+            if (content.arguments != null) {
+                text.append(ARGUMENTS_COLOR);
+                text.append(content.arguments);
+                text.append("</font>");
+            }
+            return text.toString();
+        }
+
+        public void defaultAction(JTextComponent component) {
+            Completion.get().hideAll();
+            // replace prefix with key
+            try {
+                component.getDocument().remove(carretPosition-prefix.length(), prefix.length());
+                component.getDocument().insertString(carretPosition-prefix.length(), key, null);
+            } catch (BadLocationException e) {
+                LOGGER.notify(e);
+            }
+        }
+
+        public void processKeyEvent(KeyEvent evt) {
+            // TODO: if "." then Completion.get().showCompletion()
+        }
+
+        public int getPreferredWidth(Graphics g, Font defaultFont) {
+            return CompletionUtilities.getPreferredWidth(leftText, rightText, g, defaultFont);
+        }
+
+        public void render(Graphics g, Font defaultFont, Color defaultColor, Color backgroundColor, int width, int height, boolean selected) {
+            
+            CompletionUtilities.renderHtml(null, leftText, rightText, g, defaultFont, defaultColor, width, height, selected);
+            
+        }
+
+        public CompletionTask createDocumentationTask() {
+
+            if (content.doc == null) {
+                return null;
+            }
+            
+            return new AsyncCompletionTask(new AsyncCompletionQuery() {
+                private GlslDocItem item = new GlslDocItem(key, content);
+
+                protected void query(CompletionResultSet completionResultSet, Document document, int i) {
+                    completionResultSet.setDocumentation(item);
+                    completionResultSet.finish();
+                }
+            });
+        }
+
+        public CompletionTask createToolTipTask() {
+            return null;
+        }
+
+        public boolean instantSubstitution(JTextComponent component) {
+            defaultAction(component);
+            return true;
+        }
+
+        public int getSortPriority() {
+            return priority;
+        }
+
+        public CharSequence getSortText() {
+            return key;
+        }
+
+        public CharSequence getInsertPrefix() {
+            return prefix;
+        }
+    }
+
+    private static class GlslDocItem implements CompletionDocumentation {
+
+        private String text;
+
+        public GlslDocItem(String item, GLSLElementDescriptor content) {
+            
+            StringBuilder sb = new StringBuilder();
+            sb.append("<code>");
+            if(content.type != null) {
+                sb.append(content.type);
+                sb.append(" ");
+            }
+            sb.append("<b>");
+            sb.append(item);
+            sb.append("</b>");
+            if(content.arguments != null) {
+                sb.append(content.arguments);
+            }
+            sb.append("</code><p>");
+            sb.append(content.doc);
+            sb.append("</p>");
+            
+            text = sb.toString();
+        }
+
+        public String getText() {
+            return text;
+        }
+
+        public URL getURL() {
+            return null;
+        }
+
+        public CompletionDocumentation resolveLink(String link) {
+            return null;
+        }
+
+        public Action getGotoSourceAction() {
+            return null;
+        }
+    }
+}

+ 65 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/GlslShaderFileObserver.java

@@ -0,0 +1,65 @@
+package net.java.nboglpack.glsleditor;
+
+/**
+ * Created on 26. March 2007, 00:49
+ * 
+ */
+
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+//import net.java.nboglpack.glslcompiler.GLSLCompilerService;
+import org.openide.loaders.DataObject;
+import org.openide.util.Lookup;
+import org.openide.util.RequestProcessor;
+
+/**
+ * Observes an DataObject for document updates and starts compilation automatically.
+ * @author Michael Bien
+ */
+public class GlslShaderFileObserver implements DocumentListener {
+    
+ private final DataObject observedDao;
+ private final static RequestProcessor RP = new RequestProcessor("compiler");
+ private final RequestProcessor.Task compilerTask;
+ private boolean runOnDocUpdate = true;
+ private int compileDelay = 500;
+    
+    public GlslShaderFileObserver(DataObject dao) {
+        observedDao = dao;
+        
+        compilerTask = RP.create(new Runnable() {
+            public void run() {
+//                GLSLCompilerService compiler = Lookup.getDefault().lookup(GLSLCompilerService.class);
+//                compiler.compileShader(new DataObject[] {observedDao}, false);
+            }
+        });
+        compilerTask.setPriority(Thread.MIN_PRIORITY);
+    }
+
+    
+    // DocumentListener
+    public void insertUpdate(DocumentEvent arg0) {
+        if(runOnDocUpdate)
+            runCompileTask();
+    }
+    public void removeUpdate(DocumentEvent arg0) {
+        if(runOnDocUpdate)
+            runCompileTask();
+    }
+    public void changedUpdate(DocumentEvent arg0) {
+    }
+    
+    
+    public final void runCompileTask() {
+        compilerTask.schedule(compileDelay);
+    }
+
+    public void setCompileDelay(int compileDelay) {
+        this.compileDelay = compileDelay;
+    }
+
+    public void setRunOnDocUpdate(boolean runOnDocUpdate) {
+        this.runOnDocUpdate = runOnDocUpdate;
+    }
+    
+}

+ 172 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/GlslVocabularyManager.java

@@ -0,0 +1,172 @@
+/*
+ * GlslVocabularyManager.java
+ *
+ * Created on 12. Februar 2006, 03:37
+ *
+ */
+
+package net.java.nboglpack.glsleditor;
+
+import java.io.InputStream;
+import java.util.AbstractSet;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Unmarshaller;
+import net.java.nboglpack.glsleditor.dataobject.GlslFragmentShaderDataLoader;
+import net.java.nboglpack.glsleditor.dataobject.GlslGeometryShaderDataLoader;
+import net.java.nboglpack.glsleditor.dataobject.GlslVertexShaderDataLoader;
+import net.java.nboglpack.glsleditor.vocabulary.GLSLElementDescriptor;
+import net.java.nboglpack.glsleditor.vocabulary.GLSLVocabulary;
+import org.openide.ErrorManager;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+
+/**
+ *
+ * @author mhenze
+ * @author Michael Bien
+ */
+public class GlslVocabularyManager {
+    
+ private static final ErrorManager LOGGER = ErrorManager.getDefault().getInstance(GlslVocabularyManager.class.getName());
+ private static final HashMap<String, GlslVocabularyManager> instances = new HashMap<String, GlslVocabularyManager>();
+ private static GLSLVocabulary vocabulary = null;
+
+ private final String mimetype;
+ private final Set<String> keySet;
+ private final Map<String, GLSLElementDescriptor[]> vocabularyExtention;
+    
+    /** Creates a new instance of GlslVocabularyManager */
+    private GlslVocabularyManager(String mimetype) {
+        
+        if(    !mimetype.equals(GlslFragmentShaderDataLoader.REQUIRED_MIME)
+            && !mimetype.equals(GlslVertexShaderDataLoader.REQUIRED_MIME)
+            && !mimetype.equals(GlslGeometryShaderDataLoader.REQUIRED_MIME)) {
+            throw new IllegalArgumentException(mimetype+" is no GLSL mime type");
+        }
+        
+        
+        this.mimetype = mimetype;
+        
+        if(vocabulary == null)
+            loadVocabulary();
+        
+        if(mimetype.equals(GlslFragmentShaderDataLoader.REQUIRED_MIME)) {
+            vocabularyExtention = vocabulary.fragmentShaderVocabulary;
+        }else if(mimetype.equals(GlslVertexShaderDataLoader.REQUIRED_MIME)) {
+            vocabularyExtention = vocabulary.vertexShaderVocabulary;
+        }else {
+            vocabularyExtention = vocabulary.geometryShaderVocabulary;
+        }
+        
+        // merges two views
+        keySet = new AbstractSet<String>() {
+            
+            private final Set<String> mainSet = vocabulary.mainVocabulary.keySet();
+            private final Set<String> extSet = vocabularyExtention.keySet();
+            
+            
+            public Iterator<String> iterator() {
+                return new Iterator<String>(){
+                    
+                    Iterator<String> mainIt = mainSet.iterator();
+                    Iterator<String> extIt = extSet.iterator();
+                    
+                    public boolean hasNext() {
+                        return mainIt.hasNext() || extIt.hasNext();
+                    }
+                    
+                    public String next() {
+                        if(mainIt.hasNext())
+                            return mainIt.next();
+                        else
+                            return extIt.next();
+                    }
+                    
+                    public void remove() {
+                        throw new UnsupportedOperationException("Not supported yet.");
+                    }
+                    
+                };
+            }
+            
+            public int size() {
+                return mainSet.size()+extSet.size();
+            }
+            
+        };
+        
+    }
+    
+    public static GlslVocabularyManager getInstance(String mimetype) {
+        
+        GlslVocabularyManager instance = instances.get(mimetype);
+        
+        if(instance == null) {
+            instance = new GlslVocabularyManager(mimetype);
+            instances.put(mimetype,instance);
+        }
+        
+        return instance;
+    }
+    
+    private void loadVocabulary() {
+        
+        FileObject vocabularyfile = FileUtil.getConfigFile("Editors/"+mimetype+"/vocabulary.xml");
+        
+        if (vocabularyfile != null) {
+            
+            InputStream is = null;
+            
+            try {
+                
+                is = vocabularyfile.getInputStream();
+                
+                // workaround; nb does not allow usage of jdk's jaxb implementation
+                // => we have to provide JAXB as library wrapper module and load it via module classloader
+                JAXBContext jc = JAXBContext.newInstance("net.java.nboglpack.glsleditor.vocabulary", this.getClass().getClassLoader());
+
+                Unmarshaller unmarshaller = jc.createUnmarshaller();
+                vocabulary = (GLSLVocabulary)unmarshaller.unmarshal(is);
+
+            } catch (Exception ex) {
+                
+                // create empty vocab
+                vocabulary = new GLSLVocabulary();
+                LOGGER.notify(ex);
+                
+            } finally {
+                
+                if(is != null) {
+                    try {
+                        is.close();
+                    } catch (Exception e) {
+                        LOGGER.notify(e);
+                    }
+                }
+                
+            }
+            
+        }
+        
+    }
+    
+    public Set getKeys() {
+        return keySet;
+    }
+    
+    public GLSLElementDescriptor[] getDesc(String key) {
+        
+        GLSLElementDescriptor[] desc = vocabulary.mainVocabulary.get(key);
+        
+        if(desc == null)
+            desc = vocabularyExtention.get(key);
+        
+        return desc;
+    }
+    
+    
+}

+ 11 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/Bundle.properties

@@ -0,0 +1,11 @@
+Services/MIMEResolver/GlslVertexShaderResolver.xml=GLSL Vertex Shader Files
+Services/MIMEResolver/GlslFragmentShaderResolver.xml=GLSL Fragment Shader Files
+Services/MIMEResolver/GlslGeometryShaderResolver.xml=GLSL Geometry Shader Files
+
+Templates/OpenGL/VertexShader.vert=GLSL Vertex Shader File
+Templates/OpenGL/FragmentShader.frag=GLSL Fragment Shader File
+Templates/OpenGL/GeometryShader.geom=GLSL Geometry Shader File
+
+LBL_glsl_vertex_shader_loader_name=GLSL Vertex Shader Files
+LBL_glsl_fragment_shader_loader_name=GLSL Fragment Shader Files
+LBL_glsl_geometry_shader_loader_name=GLSL Geometry Shader Files

+ 40 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataLoader.java

@@ -0,0 +1,40 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import java.io.IOException;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObjectExistsException;
+import org.openide.loaders.MultiDataObject;
+import org.openide.loaders.UniFileLoader;
+import org.openide.util.NbBundle;
+
+public class GlslFragmentShaderDataLoader extends UniFileLoader {
+
+    public static final String REQUIRED_MIME = "text/x-glsl-fragment-shader";
+
+    private static final long serialVersionUID = 1L;
+
+    public GlslFragmentShaderDataLoader() {
+        super("net.java.nboglpack.glsleditor.dataobject.GlslFragmentShaderDataObject");
+    }
+
+    @Override
+    protected String defaultDisplayName() {
+        return NbBundle.getMessage(GlslFragmentShaderDataLoader.class, "LBL_glsl_fragment_shader_loader_name");
+    }
+
+    @Override
+    protected void initialize() {
+        super.initialize();
+        getExtensions().addMimeType(REQUIRED_MIME);
+    }
+
+    protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException {
+        return new GlslFragmentShaderDataObject(primaryFile, this);
+    }
+
+    @Override
+    protected String actionsContext() {
+        return "Loaders/" + REQUIRED_MIME + "/Actions";
+    }
+
+}

+ 32 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataLoaderBeanInfo.java

@@ -0,0 +1,32 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import java.awt.Image;
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.SimpleBeanInfo;
+import org.openide.loaders.UniFileLoader;
+import org.openide.util.ImageUtilities;
+
+public class GlslFragmentShaderDataLoaderBeanInfo extends SimpleBeanInfo {
+
+    public static final String IMAGE_ICON_BASE = "net/java/nboglpack/glsleditor/resources/FragmentShaderIcon.gif";
+
+    @Override
+    public BeanInfo[] getAdditionalBeanInfo() {
+        try {
+            return new BeanInfo[]{Introspector.getBeanInfo(UniFileLoader.class)};
+        } catch (IntrospectionException e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    @Override
+    public Image getIcon(int type) {
+        if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
+            return ImageUtilities.loadImage(IMAGE_ICON_BASE);
+        } else {
+            return null;
+        }
+    }
+}

+ 24 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataNode.java

@@ -0,0 +1,24 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import org.openide.loaders.DataNode;
+import org.openide.nodes.Children;
+
+public class GlslFragmentShaderDataNode extends DataNode
+{
+	public GlslFragmentShaderDataNode(GlslFragmentShaderDataObject obj)
+	{
+		super(obj, Children.LEAF);
+		setIconBaseWithExtension(GlslFragmentShaderDataLoaderBeanInfo.IMAGE_ICON_BASE);
+	}
+//    /** Creates a property sheet. */
+//    protected Sheet createSheet() {
+//        Sheet s = super.createSheet();
+//        Sheet.Set ss = s.get(Sheet.PROPERTIES);
+//        if (ss == null) {
+//            ss = Sheet.createPropertiesSet();
+//            s.put(ss);
+//        }
+//        // TODO add some relevant properties: ss.put(...)
+//        return s;
+//    }
+}

+ 57 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslFragmentShaderDataObject.java

@@ -0,0 +1,57 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import net.java.nboglpack.glsleditor.GlslShaderFileObserver;
+import java.beans.PropertyChangeEvent;
+import java.io.IOException;
+import java.beans.PropertyChangeListener;
+import javax.swing.text.Document;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObjectExistsException;
+import org.openide.loaders.MultiDataObject;
+import org.openide.nodes.CookieSet;
+import org.openide.nodes.Node;
+import org.openide.text.CloneableEditorSupport;
+import org.openide.text.DataEditorSupport;
+
+
+
+public class GlslFragmentShaderDataObject extends MultiDataObject {
+    
+ private final GlslShaderFileObserver observer;
+    
+    public GlslFragmentShaderDataObject(FileObject pf, GlslFragmentShaderDataLoader loader) throws DataObjectExistsException, IOException {
+        
+        super(pf, loader);
+        
+        CookieSet cookies = getCookieSet();
+        observer= new GlslShaderFileObserver(this);
+        
+        final CloneableEditorSupport support= DataEditorSupport.create(this, getPrimaryEntry(), cookies);
+        support.addPropertyChangeListener(
+            new PropertyChangeListener(){
+                public void propertyChange(PropertyChangeEvent event) {
+                    if("document".equals(event.getPropertyName())){
+                        if(event.getNewValue()!=null)
+                        {
+                            support.getDocument().addDocumentListener(observer);
+                            observer.runCompileTask();
+                        }
+                        else if(event.getOldValue()!=null)
+                        {
+                            // cylab: I think this is never called.
+                            // But I don't know if unregistering the observer makes any difference...
+                            ((Document)event.getOldValue()).removeDocumentListener(observer);
+                        }
+                    }
+                }
+            }
+        );
+        cookies.add((Node.Cookie) support);
+    }
+    
+    @Override
+    protected Node createNodeDelegate() {
+        return new GlslFragmentShaderDataNode(this);
+    }
+
+}

+ 44 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataLoader.java

@@ -0,0 +1,44 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import java.io.IOException;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObjectExistsException;
+import org.openide.loaders.MultiDataObject;
+import org.openide.loaders.UniFileLoader;
+import org.openide.util.NbBundle;
+
+
+/**
+ * @author Michael Bien
+ */
+public class GlslGeometryShaderDataLoader extends UniFileLoader {
+    
+    public static final String REQUIRED_MIME = "text/x-glsl-geometry-shader";
+    
+    private static final long serialVersionUID = 1L;
+    
+    public GlslGeometryShaderDataLoader() {
+        super("net.java.nboglpack.glsleditor.dataobject.GlslGeometryShaderDataObject");
+    }
+    
+    @Override
+    protected String defaultDisplayName() {
+        return NbBundle.getMessage(GlslGeometryShaderDataLoader.class, "LBL_glsl_geometry_shader_loader_name");
+    }
+    
+    @Override
+    protected void initialize() {
+        super.initialize();
+        getExtensions().addMimeType(REQUIRED_MIME);
+    }
+    
+    protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException {
+        return new GlslGeometryShaderDataObject(primaryFile, this);
+    }
+    
+    @Override
+    protected String actionsContext() {
+        return "Loaders/" + REQUIRED_MIME + "/Actions";
+    }
+    
+}

+ 37 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataLoaderBeanInfo.java

@@ -0,0 +1,37 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import java.awt.Image;
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.SimpleBeanInfo;
+import org.openide.loaders.UniFileLoader;
+import org.openide.util.ImageUtilities;
+
+
+/**
+ * @author Michael Bien
+ */
+public class GlslGeometryShaderDataLoaderBeanInfo extends SimpleBeanInfo {
+    
+    public static final String IMAGE_ICON_BASE = "net/java/nboglpack/glsleditor/resources/GeometryShaderIcon.gif";
+
+    @Override
+    public BeanInfo[] getAdditionalBeanInfo() {
+        try {
+            return new BeanInfo[] {Introspector.getBeanInfo(UniFileLoader.class)};
+        } catch (IntrospectionException e) {
+            throw new AssertionError(e);
+        }
+    }
+    
+    @Override
+    public Image getIcon(int type) {
+        if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
+            return ImageUtilities.loadImage(IMAGE_ICON_BASE);
+        } else {
+            return null;
+        }
+    }
+    
+}

+ 34 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataNode.java

@@ -0,0 +1,34 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import org.openide.loaders.DataNode;
+import org.openide.nodes.Children;
+import org.openide.util.Lookup;
+
+
+/**
+ * @author Michael Bien
+ */
+public class GlslGeometryShaderDataNode extends DataNode {
+    
+    public GlslGeometryShaderDataNode(GlslGeometryShaderDataObject obj) {
+        super(obj, Children.LEAF);
+        setIconBaseWithExtension(GlslGeometryShaderDataLoaderBeanInfo.IMAGE_ICON_BASE);
+    }
+    GlslGeometryShaderDataNode(GlslGeometryShaderDataObject obj, Lookup lookup) {
+        super(obj, Children.LEAF, lookup);
+        setIconBaseWithExtension(GlslGeometryShaderDataLoaderBeanInfo.IMAGE_ICON_BASE);
+    }
+    
+    //    /** Creates a property sheet. */
+    //    protected Sheet createSheet() {
+    //        Sheet s = super.createSheet();
+    //        Sheet.Set ss = s.get(Sheet.PROPERTIES);
+    //        if (ss == null) {
+    //            ss = Sheet.createPropertiesSet();
+    //            s.put(ss);
+    //        }
+    //        // TODO add some relevant properties: ss.put(...)
+    //        return s;
+    //    }
+    
+}

+ 60 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslGeometryShaderDataObject.java

@@ -0,0 +1,60 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.IOException;
+import javax.swing.text.Document;
+import net.java.nboglpack.glsleditor.GlslShaderFileObserver;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObjectExistsException;
+import org.openide.loaders.MultiDataObject;
+import org.openide.nodes.CookieSet;
+import org.openide.nodes.Node;
+import org.openide.text.CloneableEditorSupport;
+import org.openide.util.Lookup;
+import org.openide.text.DataEditorSupport;
+
+
+/**
+ * @author Michael Bien
+ */
+public class GlslGeometryShaderDataObject extends MultiDataObject {
+
+    private GlslShaderFileObserver observer;
+
+    public GlslGeometryShaderDataObject(FileObject pf, GlslGeometryShaderDataLoader loader) throws DataObjectExistsException, IOException {
+
+        super(pf, loader);
+
+        CookieSet cookies = getCookieSet();
+        observer = new GlslShaderFileObserver(this);
+
+        final CloneableEditorSupport support = DataEditorSupport.create(this, getPrimaryEntry(), cookies);
+        support.addPropertyChangeListener(new PropertyChangeListener() {
+
+            public void propertyChange(PropertyChangeEvent event) {
+                if ("document".equals(event.getPropertyName())) {
+                    if (event.getNewValue() != null) {
+                        support.getDocument().addDocumentListener(observer);
+                        observer.runCompileTask();
+                    } else if (event.getOldValue() != null) {
+                        // cylab: I think this is never called.
+                        // But I don't know if unregistering the observer makes any difference...
+                        ((Document) event.getOldValue()).removeDocumentListener(observer);
+                    }
+                }
+            }
+        });
+        cookies.add((Node.Cookie) support);
+    }
+
+    @Override
+    protected Node createNodeDelegate() {
+        return new GlslGeometryShaderDataNode(this, getLookup());
+    }
+
+    @Override
+    public Lookup getLookup() {
+        return getCookieSet().getLookup();
+    }
+}

+ 40 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataLoader.java

@@ -0,0 +1,40 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import java.io.IOException;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObjectExistsException;
+import org.openide.loaders.MultiDataObject;
+import org.openide.loaders.UniFileLoader;
+import org.openide.util.NbBundle;
+
+public class GlslVertexShaderDataLoader extends UniFileLoader {
+
+    public static final String REQUIRED_MIME = "text/x-glsl-vertex-shader";
+
+    private static final long serialVersionUID = 1L;
+
+    public GlslVertexShaderDataLoader() {
+        super("net.java.nboglpack.glsleditor.dataobject.GlslVertexShaderDataObject");
+    }
+
+    @Override
+    protected String defaultDisplayName() {
+        return NbBundle.getMessage(GlslFragmentShaderDataLoader.class, "LBL_glsl_vertex_shader_loader_name");
+    }
+
+    @Override
+    protected void initialize() {
+        super.initialize();
+        getExtensions().addMimeType(REQUIRED_MIME);
+    }
+
+    protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException {
+        return new GlslVertexShaderDataObject(primaryFile, this);
+    }
+
+    @Override
+    protected String actionsContext() {
+        return "Loaders/" + REQUIRED_MIME + "/Actions";
+    }
+
+}

+ 32 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataLoaderBeanInfo.java

@@ -0,0 +1,32 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import java.awt.Image;
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.SimpleBeanInfo;
+import org.openide.loaders.UniFileLoader;
+import org.openide.util.ImageUtilities;
+
+public class GlslVertexShaderDataLoaderBeanInfo extends SimpleBeanInfo {
+
+    public static final String IMAGE_ICON_BASE = "net/java/nboglpack/glsleditor/resources/VertexShaderIcon.gif";
+
+    @Override
+    public BeanInfo[] getAdditionalBeanInfo() {
+        try {
+            return new BeanInfo[]{Introspector.getBeanInfo(UniFileLoader.class)};
+        } catch (IntrospectionException e) {
+            throw new AssertionError(e);
+        }
+    }
+
+    @Override
+    public Image getIcon(int type) {
+        if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
+            return ImageUtilities.loadImage(IMAGE_ICON_BASE);
+        } else {
+            return null;
+        }
+    }
+}

+ 24 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataNode.java

@@ -0,0 +1,24 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import org.openide.loaders.DataNode;
+import org.openide.nodes.Children;
+
+public class GlslVertexShaderDataNode extends DataNode
+{
+	public GlslVertexShaderDataNode(GlslVertexShaderDataObject obj)
+	{
+		super(obj, Children.LEAF);
+		setIconBaseWithExtension(GlslVertexShaderDataLoaderBeanInfo.IMAGE_ICON_BASE);
+	}
+//    /** Creates a property sheet. */
+//    protected Sheet createSheet() {
+//        Sheet s = super.createSheet();
+//        Sheet.Set ss = s.get(Sheet.PROPERTIES);
+//        if (ss == null) {
+//            ss = Sheet.createPropertiesSet();
+//            s.put(ss);
+//        }
+//        // TODO add some relevant properties: ss.put(...)
+//        return s;
+//    }
+}

+ 54 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/dataobject/GlslVertexShaderDataObject.java

@@ -0,0 +1,54 @@
+package net.java.nboglpack.glsleditor.dataobject;
+
+import net.java.nboglpack.glsleditor.GlslShaderFileObserver;
+import net.java.nboglpack.glsleditor.GlslShaderFileObserver;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.IOException;
+import javax.swing.text.Document;
+import org.openide.filesystems.FileObject;
+import org.openide.loaders.DataObjectExistsException;
+import org.openide.loaders.MultiDataObject;
+import org.openide.nodes.CookieSet;
+import org.openide.nodes.Node;
+import org.openide.text.CloneableEditorSupport;
+import org.openide.text.DataEditorSupport;
+
+public class GlslVertexShaderDataObject extends MultiDataObject {
+    
+ private GlslShaderFileObserver observer;
+
+    public GlslVertexShaderDataObject(FileObject pf, GlslVertexShaderDataLoader loader) throws DataObjectExistsException, IOException {
+        
+        super(pf, loader);
+        CookieSet cookies = getCookieSet();
+        observer= new GlslShaderFileObserver(this);
+        
+        final CloneableEditorSupport support= DataEditorSupport.create(this, getPrimaryEntry(), cookies);
+        support.addPropertyChangeListener(
+            new PropertyChangeListener(){
+                public void propertyChange(PropertyChangeEvent event) {
+                    if("document".equals(event.getPropertyName())){
+                        if(event.getNewValue()!=null)
+                        {
+                            support.getDocument().addDocumentListener(observer);
+                            observer.runCompileTask();
+                        }
+                        else if(event.getOldValue()!=null)
+                        {
+                            // cylab: I think this is never called.
+                            // But I don't know if unregistering the observer makes any difference...
+                            ((Document)event.getOldValue()).removeDocumentListener(observer);
+                        }
+                    }
+                }
+            }
+        );
+        cookies.add((Node.Cookie) support);
+    }
+    
+    @Override
+    protected Node createNodeDelegate() {
+        return new GlslVertexShaderDataNode(this);
+    }
+}

+ 4 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/glsl/Bundle.properties

@@ -0,0 +1,4 @@
+LBL_SYNTAX_ERROR=Syntax error.
+LBL_UNEXPECTED_CHARACTER=Unexpected character.
+LBL_RESERVED_KEYWORD=Reserved keyword.
+

+ 316 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/glsl/GLSL_120.nbs

@@ -0,0 +1,316 @@
+################################################################################
+# OpenGL Shading Language 1.20 GLF file ########################################
+################################################################################
+# @date 10.09.2007                                                             #
+# @author Michael Bien                                                         #
+# @email [email protected]                                                  #
+################################################################################
+
+BUNDLE "net.java.nboglpack.glsleditor.glsl.Bundle"
+
+SKIP:WHITESPACE
+SKIP:END_OF_LINE
+SKIP:COMMENT
+SKIP:ML_COMMENT
+
+## error highlighting ##########################################################
+MARK:ERROR: {
+    type:"Error";
+    message:"LBL_SYNTAX_ERROR";
+}
+MARK:error: {
+    type:"Error";
+    message:"LBL_UNEXPECTED_CHARACTER";
+}
+MARK:reserved: {
+    type:"Warning";
+    message:"LBL_RESERVED_KEYWORD";
+}
+
+FOLD:function_body: {
+    fold_display_name:"{...}";
+}
+FOLD:struct_body: {
+    fold_display_name:"{...}";
+}
+FOLD:ML_COMMENT: {
+    fold_display_name:"/*...*/";
+}
+
+BRACE "(:)"
+BRACE "{:}"
+BRACE "[:]"
+
+COMPLETE "(:)"
+COMPLETE "{:}"
+COMPLETE "[:]"
+
+INDENT "(:)"
+INDENT "{:}"
+INDENT "[:]"
+INDENT "\\s*(((if|while)\\s*\\(|else\\s*|else\\s+if\\s*\\(|for\\s*\\(.*\\))[^{;]*)"
+
+SELECTION ( ["a"-"z" "A"-"Z" "0"-"9" "_"] )
+
+NAVIGATOR:global_preprocessor: {
+    display_name: net.java.nboglpack.glsleditor.glsl.Glsl.createPreprocessorString;
+    icon: "net/java/nboglpack/glsleditor/resources/preprocessor.png";
+    isLeaf: "true";
+}
+NAVIGATOR:global_declared_identifier, struct_declarator: {
+    display_name: net.java.nboglpack.glsleditor.glsl.Glsl.createFieldDeclarationString;
+    icon: "net/java/nboglpack/glsleditor/resources/field.gif";
+    isLeaf: "true";
+}
+NAVIGATOR:function: {
+    display_name: net.java.nboglpack.glsleditor.glsl.Glsl.createFunctionDeclarationString;
+    icon: "net/java/nboglpack/glsleditor/resources/function.gif";
+    isLeaf: "true";
+}
+#AST {
+#    process: net.java.nboglpack.glsleditor.glsl.Glsl.process;
+#}
+#PROPERTIES {
+#    traceSteps:"true";
+#    printRules:"true";
+#    printFirst:"true";
+#}
+
+##### GLSL 1.2 grammar #########################################################
+
+S = declaration*;
+
+
+## constants ###################################################################
+type_specifier = "float"
+               | "int"
+               | "bool"
+               | "vec2"
+               | "vec3"
+               | "vec4"
+               | "bvec2"
+               | "bvec3"
+               | "bvec4"
+               | "ivec2"
+               | "ivec3"
+               | "ivec4"
+               | "mat2"
+               | "mat3"
+               | "mat4"
+               | "mat2x2"
+               | "mat2x3"
+               | "mat2x4"
+               | "mat3x2"
+               | "mat3x3"
+               | "mat3x4"
+               | "mat4x2"
+               | "mat4x3"
+               | "mat4x4"
+               | "sampler1D"
+               | "sampler2D"
+               | "sampler3D"
+               | "samplerCube"
+               | "sampler1DShadow"
+               | "sampler2DShadow";
+
+type_specifier_or_identifier = type_specifier | <IDENTIFIER>;
+
+type_qualifier = "const";
+
+global_type_qualifier = type_qualifier
+                      | "attribute" # Vertex only.
+                      | "varying"
+                      | ("centroid" "varying")
+                      | ("invariant" ["centroid"] "varying")
+                      | "uniform";
+
+parameter_declaration_qualifier = "in" | "out" | "inout";
+
+boolean_literal = "true" | "false"; # TODO move boolean literal to lexer?
+
+
+assignment_operator = <EQ>
+                    | <MUL_ASSIGN>
+                    | <DIV_ASSIGN>
+                    | <ADD_ASSIGN>
+                    | <SUB_ASSIGN>
+                    | <MOD_ASSIGN>            # reserved
+                    | <LEFT_BITSHIFT_ASSIGN>  # reserved
+                    | <RIGHT_BITSHIFT_ASSIGN> # reserved
+                    | <AND_ASSIGN>            # reserved
+                    | <XOR_ASSIGN>            # reserved
+                    | <OR_ASSIGN>;            # reserved
+
+comperator = <LEFT_ANGLE> | <RIGHT_ANGLE> | <LE> | <GE> | <EQEQ> | <NE>;
+
+operator = <PLUS> 
+         | <MINUS> 
+         | <STAR> 
+         | <SLASH> 
+         | <AMP>
+         | <AMPAMP>
+         | <BAR>            # reserved
+         | <BARBAR>
+         | <CARETCARET>
+         | <CARET>          # reserved
+         | <PERCENT>        # reserved
+         | <RIGHT_BITSHIFT> # reserved
+         | <LEFT_BITSHIFT>; # reserved
+
+unary_operator = <PLUS>
+               | <MINUS> 
+               | <BANG> 
+               | <TILDE>; # reserved
+
+increment_or_decrement_operator = <PLUSPLUS> | <MINUSMINUS>;
+
+reserved = "asm" 
+         | "class"
+         | "union"
+         | "enum"
+         | "typedef"
+         | "template"
+         | "this"
+         | "packed"
+         | "goto"
+         | "switch"
+         | "default"
+         | "inline"
+         | "noinline"
+         | "volatile"
+         | "public"
+         | "static" 
+         | "extern" 
+         | "external" 
+         | "interface"
+         | "long"
+         | "short"
+         | "double"
+         | "half"
+         | "fixed"
+         | "unsigned"
+         | "lowp"
+         | "mediump"
+         | "highp"
+         | "precision"
+         | "input"
+         | "output"
+         | "hvec2"
+         | "hvec3"
+         | "hvec4"
+         | "dvec2"
+         | "dvec3"
+         | "dvec4"
+         | "fvec2"
+         | "fvec3"
+         | "fvec4"
+         | "sampler2DRect"
+         | "sampler3DRect"
+         | "sampler2DRectShadow"
+         | "sizeof"
+         | "cast"
+         | "namespace"
+         | "using";
+
+
+## declarations ################################################################
+declaration = type_specifier_or_identifier [array_index] (function | (global_identifier_list <SEMICOLON>));
+declaration = "void" function;
+declaration = global_type_qualifier struct_declaration <SEMICOLON>;
+declaration = global_type_qualifier global_type_declaration <SEMICOLON>;
+declaration = struct_declaration <SEMICOLON>;
+declaration = global_preprocessor;
+
+global_identifier_list = global_declared_identifier [array_index] (<COMMA> global_declared_identifier [array_index])*;
+global_declared_identifier = <IDENTIFIER>;
+global_preprocessor = <PREPROCESSOR>;
+
+struct_declaration = "struct" <IDENTIFIER> struct_body [global_identifier_list];
+struct_body = "{" (local_type_declaration <SEMICOLON>)+ "}";
+
+global_type_declaration = type_specifier_or_identifier [array_index] global_identifier_list [<EQ> expression];
+type_declaration        = type_specifier_or_identifier [array_index] <IDENTIFIER> [array_index] (<COMMA> <IDENTIFIER> [array_index])*;
+
+local_type_declaration = [type_qualifier] type_declaration;
+
+## function ####################################################################
+function = <FUNCTION> "(" [parameter_declaration_list] ")" (function_body | <SEMICOLON>);
+function_body = code_block;
+
+parameter_declaration = [type_qualifier] [parameter_declaration_qualifier] type_specifier_or_identifier ((array_index <IDENTIFIER>) | (<IDENTIFIER> [array_index]));
+parameter_declaration_list = "void" | (parameter_declaration (<COMMA> parameter_declaration)*);
+
+statement = <PREPROCESSOR>;
+statement = expression_hack <SEMICOLON>;  # statement = local_type_declaration [<EQ> expression] <SEMICOLON>;
+statement = conditional_statement;
+statement = "return" [expression] <SEMICOLON>;
+statement = "break" <SEMICOLON>;   # break just in loops allowed
+statement = "continue" <SEMICOLON>;# continue just in loops allowed
+statement = "discard" <SEMICOLON>; # Fragment shader only.
+
+code_block = "{" statement* "}";
+
+## expresstions and operations #################################################
+# ternary operator
+expression = expression1  ["?" expression1 ":" expression1];
+
+expression1 = [unary_operator] expression2 operation_or_comparison*;
+expression1 = [unary_operator] "(" expression ")" operation_or_comparison*;
+
+expression2 = ( [increment_or_decrement_operator] (<IDENTIFIER> | <BUILD_IN_VAR>) (field_access)* [increment_or_decrement_operator] [assignment])
+            | ((function_call | constructor_call) (field_access)*)
+            | <INTEGER_LITERAL>
+            | <FLOAT_LITERAL>
+            | boolean_literal;
+
+
+
+expression_hack = unary_operator expression1_hack   operation_or_comparison*;
+expression_hack = unary_operator "(" expression ")" operation_or_comparison*;
+expression_hack = expression1_hack   operation_or_comparison*;
+expression_hack = "(" expression ")" operation_or_comparison*;
+
+expression_hack = <IDENTIFIER> (field_access)* [increment_or_decrement_operator] [assignment];
+expression_hack = <IDENTIFIER> (field_access)* <IDENTIFIER> [array_index] (<COMMA> <IDENTIFIER> [array_index])*;
+expression_hack = type_specifier (field_access)* <IDENTIFIER> [array_index] (<COMMA> <IDENTIFIER> [array_index])*;
+
+expression1_hack = (increment_or_decrement_operator (<IDENTIFIER> | <BUILD_IN_VAR>) (field_access)* [increment_or_decrement_operator] [assignment])
+                 | (<BUILD_IN_VAR> (field_access)* [increment_or_decrement_operator] [assignment])
+                 | ((function_call | constructor_call) (field_access)*)
+                 | <INTEGER_LITERAL>
+                 | <FLOAT_LITERAL>
+                 | boolean_literal;
+
+
+
+assignment = assignment_operator expression;
+operation_or_comparison = (comperator | operator) expression;
+
+field_access = array_index;
+field_access = <DOT> <IDENTIFIER>;
+
+array_index = "[" [expression] "]";
+
+function_call = (<FUNCTION> | <BUILD_IN_FUNC>) "(" [expression_list] ")";
+# Note constructor call is something like that: vec2(1.0, 2.0) or float[2] (1.0, 2.0)
+constructor_call = type_specifier [array_index] "(" [expression_list] ")"; #TODO custom structs
+
+expression_list = "void" | (expression (<COMMA> expression)*);
+
+## code flow ###################################################################
+conditional_statement = if_statement 
+                      | for_statement
+                      | while_statement
+                      | do_while_statement;
+
+# TODO if rule not 100% correct, multiple else allowed even before else if
+if_statement = "if" condition statement_or_code_block ("else" ["if" condition] statement_or_code_block)*;
+while_statement = "while" condition statement_or_code_block;
+do_while_statement = "do" statement_or_code_block "while" condition <SEMICOLON>;
+# TODO for rule could be more restrictive
+for_statement = "for" "(" [[type_specifier] <IDENTIFIER> assignment] <SEMICOLON> [expression] <SEMICOLON> [expression] ")" statement_or_code_block;
+
+condition = "(" expression ")";
+statement_or_code_block = (statement | code_block);
+
+

+ 389 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/glsl/GLSL_130.nbs

@@ -0,0 +1,389 @@
+################################################################################
+# OpenGL Shading Language 1.30 GLF file ########################################
+################################################################################
+# @date 10.09.2007                                                             #
+# @author Michael Bien                                                         #
+# @email [email protected]                                                  #
+################################################################################
+
+BUNDLE "net.java.nboglpack.glsleditor.glsl.Bundle"
+
+SKIP:WHITESPACE
+SKIP:END_OF_LINE
+SKIP:COMMENT
+SKIP:ML_COMMENT
+
+## error highlighting ##########################################################
+MARK:ERROR: {
+    type:"Error";
+    message:"LBL_SYNTAX_ERROR";
+}
+MARK:error: {
+    type:"Error";
+    message:"LBL_UNEXPECTED_CHARACTER";
+}
+MARK:reserved: {
+    type:"Warning";
+    message:"LBL_RESERVED_KEYWORD";
+}
+
+FOLD:function_body: {
+    fold_display_name:"{...}";
+}
+FOLD:struct_body: {
+    fold_display_name:"{...}";
+}
+FOLD:ML_COMMENT: {
+    fold_display_name:"/*...*/";
+}
+
+BRACE "(:)"
+BRACE "{:}"
+BRACE "[:]"
+
+COMPLETE "(:)"
+COMPLETE "{:}"
+COMPLETE "[:]"
+
+INDENT "(:)"
+INDENT "{:}"
+INDENT "[:]"
+INDENT "\\s*(((if|while)\\s*\\(|else\\s*|else\\s+if\\s*\\(|for\\s*\\(.*\\))[^{;]*)"
+
+SELECTION ( ["a"-"z" "A"-"Z" "0"-"9" "_"] )
+
+AST {
+    process: net.java.nboglpack.glsleditor.glsl.Glsl.process;
+}
+NAVIGATOR:global_preprocessor: {
+    display_name: net.java.nboglpack.glsleditor.glsl.Glsl.createPreprocessorString;
+    icon: "net/java/nboglpack/glsleditor/resources/preprocessor.png";
+    isLeaf: "true";
+}
+NAVIGATOR:global_declared_identifier: {
+    display_name: net.java.nboglpack.glsleditor.glsl.Glsl.createFieldDeclarationString;
+    icon: "net/java/nboglpack/glsleditor/resources/field.gif";
+    isLeaf: "true";
+}
+NAVIGATOR:function: {
+    display_name: net.java.nboglpack.glsleditor.glsl.Glsl.createFunctionDeclarationString;
+    icon: "net/java/nboglpack/glsleditor/resources/function.gif";
+    isLeaf: "true";
+}
+#PROPERTIES {
+#    traceSteps:"true";
+#    printRules:"true";
+#    printFirst:"true";
+#}
+
+##### GLSL 1.3 grammar #########################################################
+
+S = declaration*;
+
+
+## constants ###################################################################
+type_specifier = "float"
+               | "int"
+               | "uint"
+               | "bool"
+               | "vec2"
+               | "vec3"
+               | "vec4"
+               | "bvec2"
+               | "bvec3"
+               | "bvec4"
+               | "ivec2"
+               | "ivec3"
+               | "ivec4"
+               | "uvec2"
+               | "uvec3"
+               | "uvec4"
+               | "mat2"
+               | "mat3"
+               | "mat4"
+               | "mat2x2"
+               | "mat2x3"
+               | "mat2x4"
+               | "mat3x2"
+               | "mat3x3"
+               | "mat3x4"
+               | "mat4x2"
+               | "mat4x3"
+               | "mat4x4"
+               | "sampler1D"
+               | "sampler2D"
+               | "sampler3D"
+               | "samplerCube"
+               | "sampler1DShadow"
+               | "sampler2DShadow"
+               | "sampler1DArray"
+               | "sampler2DArray"
+               | "sampler1DArrayShadow"
+               | "sampler2DArrayShadow"
+               | "isampler1D"
+               | "isampler2D"
+               | "isampler3D"
+               | "isamplerCube"
+               | "isampler1DArray"
+               | "isampler2DArray"
+               | "usampler1D"
+               | "usampler2D"
+               | "usampler3D"
+               | "usamplerCube"
+               | "usampler1DArray"
+               | "usampler2DArray";
+
+type_specifier_or_identifier = type_specifier | <IDENTIFIER>;
+
+type_qualifier = "const";
+
+interpolation_type_qualifier = "smooth"
+                             | "flat"
+                             | "noperspective";
+
+inout_type_qualifier = "in" | "out";
+
+global_type_qualifier = type_qualifier
+                      | (inout_type_qualifier ["invariant"] ["centroid"])
+                      | (interpolation_type_qualifier ["invariant"] ["centroid"] [inout_type_qualifier])
+                      | ("centroid" [interpolation_type_qualifier] [inout_type_qualifier])
+                      | ("invariant" ["centroid"] [inout_type_qualifier])
+                      | "attribute" # Vertex only.
+                      | "varying"
+                      | ("centroid" "varying")
+                      | ("invariant" ["centroid"] "varying")
+                      | "uniform";
+
+parameter_declaration_qualifier = "in" | "out" | "inout";
+
+boolean_literal = "true" | "false"; # TODO move boolean literal to lexer?
+
+precision_qualifier = "highp"
+                    | "mediump"
+                    | "lowp";
+
+assignment_operator = <EQ>
+                    | <MUL_ASSIGN>
+                    | <DIV_ASSIGN>
+                    | <ADD_ASSIGN>
+                    | <SUB_ASSIGN>
+                    | <MOD_ASSIGN>            # reserved
+                    | <LEFT_BITSHIFT_ASSIGN>  # reserved
+                    | <RIGHT_BITSHIFT_ASSIGN> # reserved
+                    | <AND_ASSIGN>            # reserved
+                    | <XOR_ASSIGN>            # reserved
+                    | <OR_ASSIGN>;            # reserved
+
+comperator = <LEFT_ANGLE> | <RIGHT_ANGLE> | <LE> | <GE> | <EQEQ> | <NE>;
+
+operator = <PLUS> 
+         | <MINUS> 
+         | <STAR> 
+         | <SLASH> 
+         | <AMP>
+         | <AMPAMP>
+         | <BAR>            # reserved
+         | <BARBAR>
+         | <CARETCARET>
+         | <CARET>          # reserved
+         | <PERCENT>        # reserved
+         | <RIGHT_BITSHIFT> # reserved
+         | <LEFT_BITSHIFT>; # reserved
+
+unary_operator = <PLUS>
+               | <MINUS> 
+               | <BANG> 
+               | <TILDE>; # reserved
+
+increment_or_decrement_operator = <PLUSPLUS> | <MINUSMINUS>;
+
+reserved = "asm" 
+         | "common"
+         | "partition"
+         | "active"
+         | "class"
+         | "union"
+         | "enum"
+         | "typedef"
+         | "template"
+         | "this"
+         | "packed"
+         | "goto"
+         | "inline"
+         | "noinline"
+         | "volatile"
+         | "public"
+         | "static" 
+         | "extern" 
+         | "external" 
+         | "interface"
+         | "long"
+         | "short"
+         | "double"
+         | "half"
+         | "fixed"
+         | "unsigned"
+         | "superp"
+         | "input"
+         | "output"
+         | "hvec2"
+         | "hvec3"
+         | "hvec4"
+         | "dvec2"
+         | "dvec3"
+         | "dvec4"
+         | "fvec2"
+         | "fvec3"
+         | "fvec4"
+         | "sampler2DRect"
+         | "sampler3DRect"
+         | "sampler2DRectShadow"
+         | "samplerBuffer"
+         | "filter"
+         | "image1D"
+         | "image2D"
+         | "image3D"
+         | "imageCube"
+         | "iimage1D"
+         | "iimage2D"
+         | "iimage3D"
+         | "iimageCube"
+         | "uimage1D"
+         | "uimage2D"
+         | "uimage3D"
+         | "uimageCube"
+         | "image1DArray"
+         | "image2DArray"
+         | "iimage1DArray"
+         | "iimage2DArray"
+         | "uimage1DArray"
+         | "uimage2DArray"
+         | "image1DShadow"
+         | "image2DShadow"
+         | "image1DArrayShadow"
+         | "image2DArrayShadow"
+         | "imageBuffer"
+         | "iimageBuffer"
+         | "uimageBuffer"
+         | "sizeof"
+         | "cast"
+         | "namespace"
+         | "using"
+         | "row_major";
+
+
+## declarations ################################################################
+declaration = [precision_qualifier] type_specifier_or_identifier [array_index] (function | (global_identifier_list [assignment2] <SEMICOLON>));
+declaration = "void" function;
+declaration = field_declaration <SEMICOLON>;
+declaration = struct_declaration <SEMICOLON>;
+declaration = precision_declaration <SEMICOLON>;
+declaration = global_preprocessor;
+
+global_identifier_list = global_declared_identifier [array_index] (<COMMA> global_declared_identifier [array_index])*;
+global_declared_identifier = <IDENTIFIER>;
+global_preprocessor = <PREPROCESSOR>;
+
+field_declaration = global_type_qualifier struct_declaration;
+field_declaration = global_type_qualifier global_type_declaration [assignment2];
+
+struct_declaration = "struct" <IDENTIFIER> struct_body [global_identifier_list];
+struct_body = "{" (local_type_declaration <SEMICOLON>)+ "}";
+
+global_type_declaration = [precision_qualifier] type_specifier_or_identifier [array_index] global_identifier_list [<EQ> expression];
+type_declaration        = [precision_qualifier] type_specifier_or_identifier [array_index] <IDENTIFIER> [array_index] (<COMMA> <IDENTIFIER> [array_index])*;
+
+local_type_declaration = [type_qualifier] type_declaration;
+
+precision_declaration = "precision" precision_qualifier type_specifier;
+
+## function ####################################################################
+function = <FUNCTION> "(" [parameter_declaration_list] ")" (function_body | <SEMICOLON>);
+function_body = code_block;
+
+parameter_declaration = [type_qualifier] [parameter_declaration_qualifier] [precision_qualifier] type_specifier_or_identifier ((array_index <IDENTIFIER>) | (<IDENTIFIER> [array_index]));
+parameter_declaration_list = "void" | (parameter_declaration (<COMMA> parameter_declaration)*);
+
+statement = <PREPROCESSOR>;
+statement = expression_hack <SEMICOLON>;  # statement = local_type_declaration [<EQ> expression] <SEMICOLON>;
+statement = conditional_statement;
+statement = "return" [expression] <SEMICOLON>;
+statement = "break" <SEMICOLON>;   # break just in loops allowed
+statement = "continue" <SEMICOLON>;# continue just in loops allowed
+statement = "discard" <SEMICOLON>; # Fragment shader only.
+
+code_block = "{" code_block* "}";
+code_block = "{" statement* "}";
+
+## expresstions and operations #################################################
+# ternary operator
+expression = expression1  ["?" expression1 ":" expression1];
+
+expression1 = [unary_operator] expression2 operation_or_comparison*;
+expression1 = [unary_operator] "(" expression ")" operation_or_comparison*;
+
+expression2 = ( [increment_or_decrement_operator] (<IDENTIFIER> | <BUILD_IN_VAR>) (field_access)* [increment_or_decrement_operator] [assignment])
+            | ((function_call | constructor_call) (field_access)*)
+            | <INTEGER_LITERAL>
+            | <FLOAT_LITERAL>
+            | boolean_literal;
+
+
+
+expression_hack = unary_operator expression1_hack   operation_or_comparison*;
+expression_hack = unary_operator "(" expression ")" operation_or_comparison*;
+expression_hack = expression1_hack   operation_or_comparison*;
+expression_hack = "(" expression ")" operation_or_comparison*;
+
+expression_hack = <IDENTIFIER> (field_access)* [increment_or_decrement_operator] [assignment];
+expression_hack = <IDENTIFIER> (field_access)* <IDENTIFIER> [array_index] (<COMMA> <IDENTIFIER> [array_index])*;
+expression_hack = type_specifier (field_access)* <IDENTIFIER> [array_index] (<COMMA> <IDENTIFIER> [array_index])*;
+
+expression1_hack = (increment_or_decrement_operator (<IDENTIFIER> | <BUILD_IN_VAR>) (field_access)* [increment_or_decrement_operator] [assignment])
+                 | (<BUILD_IN_VAR> (field_access)* [increment_or_decrement_operator] [assignment])
+                 | ((function_call | constructor_call) (field_access)*)
+                 | <INTEGER_LITERAL>
+                 | <FLOAT_LITERAL>
+                 | boolean_literal;
+
+
+
+assignment = assignment_operator expression;
+assignment2 = <EQ> expression;
+operation_or_comparison = (comperator | operator) expression;
+
+field_access = array_index;
+field_access = <DOT> <IDENTIFIER>;
+
+array_index = "[" [expression] "]";
+
+function_call = (<FUNCTION> | <BUILD_IN_FUNC>) "(" [expression_list] ")";
+# Note constructor call is something like that: vec2(1.0, 2.0) or float[2] (1.0, 2.0)
+constructor_call = type_specifier [array_index] "(" [expression_list] ")"; #TODO custom structs
+
+expression_list = "void" | (expression (<COMMA> expression)*);
+
+## code flow ###################################################################
+conditional_statement = if_statement 
+                      | for_statement
+                      | while_statement
+                      | do_while_statement
+                      | switch_statement;
+
+# TODO if rule not 100% correct, multiple else allowed even before else if
+if_statement = "if" condition statement_or_code_block ("else" ["if" condition] statement_or_code_block)*;
+
+while_statement = "while" condition statement_or_code_block;
+do_while_statement = "do" statement_or_code_block "while" condition <SEMICOLON>;
+
+# TODO for rule could be more restrictive
+for_statement = "for" "(" [[type_specifier] <IDENTIFIER> assignment] <SEMICOLON> [expression] <SEMICOLON> [expression] ")" statement_or_code_block;
+
+switch_statement = "switch" condition "{" case* "}";
+case = ("case" expression ":" statement*)
+     | ("default" ":" statement*);
+
+condition = "(" expression ")";
+statement_or_code_block = (statement | code_block);
+
+

+ 361 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/glsl/Glsl.java

@@ -0,0 +1,361 @@
+/*
+ * Glsl.java
+ * 
+ * Created on 24.09.2007, 00:46:53
+ * 
+ */
+
+package net.java.nboglpack.glsleditor.glsl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.swing.text.AbstractDocument;
+import net.java.nboglpack.glsleditor.lexer.GlslTokenId;
+import net.java.nboglpack.glsleditor.vocabulary.GLSLElementDescriptor;
+import org.netbeans.api.languages.ASTItem;
+import org.netbeans.api.languages.ASTNode;
+import org.netbeans.api.languages.ASTToken;
+import org.netbeans.api.languages.SyntaxContext;
+import org.netbeans.api.lexer.Token;
+import org.netbeans.api.lexer.TokenHierarchy;
+import org.netbeans.api.lexer.TokenSequence;
+import org.netbeans.api.lexer.TokenUtilities;
+
+/**
+ * Utility methods called from GLSL.nbs.
+ * @author Michael Bien
+ */
+public final class Glsl {
+    
+ private final static String KEYWORD_FONT_COLOR = "<font color=808080>";
+ 
+ public final static Map<String, GLSLElementDescriptor> declaredFunctions = new HashMap<String, GLSLElementDescriptor>();
+    
+ private Glsl() {}
+    
+     /**
+     * Assembles a human readable String containing the declaraton of a function.
+     * Asumes that the current token of the SyntaxContext represents the function name.
+     */
+    public static final String createFunctionDeclarationString(SyntaxContext context) {
+        
+        AbstractDocument document = (AbstractDocument)context.getDocument();
+        
+        StringBuilder sb = new StringBuilder();
+        
+        try {
+
+            document.readLock();
+            
+            TokenSequence sequence = TokenHierarchy.get(context.getDocument()).tokenSequence();
+            sequence.move(context.getOffset());
+            sequence.moveNext();
+            
+            sb.append("<html>");
+
+            int moved = 0;
+            while(sequence.movePrevious() && isIgnoredToken(sequence.token()))
+                moved++;
+
+            String type = sequence.token().toString();
+            while(moved-- >= 0)
+                sequence.moveNext();
+
+            // append function name
+            sb.append(sequence.token().text());
+
+            while(!TokenUtilities.equals(sequence.token().text(), "("))
+                sequence.moveNext();
+
+            sb.append("(");
+
+            Token token;
+            boolean first = true;
+            while(sequence.moveNext() && !TokenUtilities.equals(sequence.token().text(), ")")) {
+
+                token = sequence.token();
+
+                if(!isIgnoredToken(token)) {
+
+                    if(first) {
+                        sb.append(KEYWORD_FONT_COLOR);
+                    }else if(token.id() != GlslTokenId.COMMA && token.id() != GlslTokenId.BRACKET && token.id() != GlslTokenId.INTEGER_LITERAL) {
+                        sb.append(" ");
+                    }
+
+                    if(!TokenUtilities.equals(token.text(), "void")) {
+
+                        moved = 0;
+                        while(sequence.moveNext() && isIgnoredToken(sequence.token())) 
+                            moved++;
+
+                        if(sequence.token().id() == GlslTokenId.COMMA || TokenUtilities.equals(sequence.token().text(), ")"))
+                            sb.append("</font>");
+
+                        while(moved-- >= 0)
+                            sequence.movePrevious();
+
+                        sb.append(token.text());
+
+                        if(token.id() == GlslTokenId.COMMA) 
+                            sb.append(KEYWORD_FONT_COLOR);
+                    }
+
+                    first = false;
+                }
+
+            }
+
+            sb.append("</font>)");
+
+            if(!"void".equals(type)) {
+                sb.append(" : ");
+                sb.append(KEYWORD_FONT_COLOR);
+                sb.append(type);
+                sb.append("</font>");
+            }
+            sb.append("</html>");
+            
+        } finally {
+          document.readUnlock();
+        }         
+        
+        return sb.toString();
+    }
+    
+    /**
+     * Assambles a human readable String containing the declaraton of a field and the field name itself.
+     * Asumes that the current token of the SyntaxContext represents the field name.
+     */
+    public static final String createFieldDeclarationString(SyntaxContext context) {
+        
+        AbstractDocument document = (AbstractDocument)context.getDocument();
+        
+        StringBuilder sb = new StringBuilder();
+        
+        try {
+
+            document.readLock();
+            
+            TokenSequence sequence = TokenHierarchy.get(context.getDocument()).tokenSequence();
+            sequence.move(context.getOffset());
+            sequence.moveNext();
+            
+            sb.append("<html>");
+            sb.append(sequence.token().text());
+            sb.append(KEYWORD_FONT_COLOR);
+            sb.append(" :");
+
+            int insertIndex = sb.length();
+
+            // read forward
+            int moved = 0;
+            Token token;
+            while(     sequence.moveNext()
+                    && sequence.token().id() != GlslTokenId.SEMICOLON
+                    && sequence.token().id() != GlslTokenId.COMMA
+                    && sequence.token().id() != GlslTokenId.EQ  ) {
+                token = sequence.token();
+                if(!isIgnoredToken(token)) 
+                    sb.append(token);
+                moved++;
+            }
+            while(moved-- >= 0)
+                sequence.movePrevious();
+
+            // read backwards throw the declaration
+            boolean skipToken = false;
+
+            while(     sequence.movePrevious() 
+                    && sequence.token().id() != GlslTokenId.SEMICOLON 
+                    && sequence.token().id() != GlslTokenId.END_OF_LINE ) {
+
+                token = sequence.token();
+
+                if(!isIgnoredToken(token)) {
+
+                    // we have a struct declaration; skip everything between { }
+                    if(token.id() == GlslTokenId.BRACE && TokenUtilities.equals(token.text(), "}")) {
+                        movePreviousUntil(sequence, GlslTokenId.BRACE, "}", "{");
+                        continue;
+                    }                
+
+                    // skip token in case of an comma seperated identifier list
+                    if(skipToken) {
+                        if(     token.id() == GlslTokenId.BRACKET
+                             && TokenUtilities.equals(token.text(), "]")    ) {
+                            movePreviousUntil(sequence, GlslTokenId.BRACKET, "]", "[");
+                            skipToken = false;
+                        }else {
+                            skipToken = false;
+                        }
+                        continue;
+                    }
+
+                    if(token.id() == GlslTokenId.COMMA) {
+                        skipToken = true;
+                        continue;
+                    }
+
+                    if(!TokenUtilities.equals(token.text(), "struct")) {
+                        sb.insert(insertIndex, token.text());
+                        sb.insert(insertIndex, " ");
+                    }
+                }
+
+            }
+
+            sb.append("</font></html>");
+        } finally {
+            document.readUnlock();
+        } 
+        
+        
+        return sb.toString();
+    }
+   
+        
+    public static final String createPreprocessorString(SyntaxContext context) {
+        
+        ASTNode node = (ASTNode)context.getASTPath().getLeaf();
+        List<ASTItem> children = node.getChildren();
+        
+        String str = null;
+        
+        for (ASTItem item : children)
+            if (isTokenType(item, GlslTokenId.PREPROCESSOR.name()))
+                str = ((ASTToken)item).getIdentifier();
+        
+        
+        for(int i = 0; i < str.length(); i++) {
+            
+            char c = str.charAt(i);
+            
+            if(c != '#' && !Character.isWhitespace(c))
+                for(int j = str.length()-1; j > i; j--)
+                    if(!Character.isWhitespace(str.charAt(j)))
+                        return str.substring(i, j+1);
+            
+        }
+        
+        return str;
+    }
+    
+    /**
+     * called from withen GLSL_*.nbs each time the document has been modified.
+     */
+    public static void process(SyntaxContext context) {
+        
+        AbstractDocument document = (AbstractDocument)context.getDocument();
+        try{
+            document.readLock();
+            
+            // remember all declared funktions for auto completion
+            synchronized(declaredFunctions) {
+                declaredFunctions.clear();
+            }
+
+            List<ASTItem> declarations = context.getASTPath().getLeaf().getChildren();
+
+            for (ASTItem declaration : declarations) {
+
+                for (ASTItem declarationItem : declaration.getChildren()) {
+
+                    if(isNode(declarationItem, "function")) {
+                        
+                        
+                        List<ASTItem> functionItems = declarationItem.getChildren();
+                        
+                        if(functionItems.size() < 3)
+                            break;
+                        
+                        ASTItem nameToken = functionItems.get(0);
+
+                        if(isTokenType(nameToken, GlslTokenId.FUNCTION.name())) {
+                            
+                            // determine return type
+                            StringBuilder returnType = new StringBuilder();
+                            for (ASTItem typeItem : declaration.getChildren()) {
+
+                                if(isNode(typeItem, "function"))
+                                    break;
+
+                                if(typeItem instanceof ASTNode) {
+                                    returnType.append(((ASTNode)typeItem).getAsText().trim());
+                                }else if(typeItem instanceof ASTToken) {
+                                    final ASTToken t = (ASTToken) typeItem;
+                                    returnType.append(t.getIdentifier().trim());
+                                }
+
+                            }
+                            
+                            // determine name and parameter list
+                            StringBuilder name = new StringBuilder();
+                            
+                            name.append("(");
+                            ASTItem parameterList = functionItems.get(2);
+                            if(isNode(parameterList, "parameter_declaration_list"))
+                                name.append(((ASTNode)parameterList).getAsText());
+                            name.append(")");
+
+                            GLSLElementDescriptor elementDesc = new GLSLElementDescriptor(
+                                    GLSLElementDescriptor.Category.USER_FUNC,
+                                    "",
+                                    "",
+                                    name.toString(),
+                                    returnType.toString());
+
+                            name.insert(0, ((ASTToken) nameToken).getIdentifier());
+                            
+                            synchronized(declaredFunctions) {
+                                declaredFunctions.put(name.toString(), elementDesc);
+                            }
+                            
+//                            System.out.println("|"+returnType.toString()+"|"+name.toString()+"|");
+                        }
+                        
+                        break;
+                    }
+                }
+            }
+        }finally{
+            document.readUnlock();
+        }
+
+
+    }
+    
+    private static final void movePreviousUntil(TokenSequence sequence, GlslTokenId id, String countToken, String stopToken) {
+        int counter = 1;
+        while(sequence.movePrevious() && counter > 0) {
+            if(sequence.token().id() == id) {
+                if(TokenUtilities.equals(sequence.token().text(), stopToken)) {
+                    counter--;
+                }else if(TokenUtilities.equals(sequence.token().text(), countToken)){
+                    counter++;
+                }
+            }
+        }
+    }
+    
+    private static final boolean isIgnoredToken(Token token) {
+        return     token.id() == GlslTokenId.WHITESPACE
+                || token.id() == GlslTokenId.COMMENT
+                || token.id() == GlslTokenId.PREPROCESSOR;
+    }
+    
+    private static final boolean isNode(ASTItem item, String nodeToken) {
+        return item != null && item instanceof ASTNode && ((ASTNode)item).getNT().equals(nodeToken);
+    }
+
+    private static final boolean isToken(ASTItem item, String id) {
+        return item != null && item instanceof ASTToken && ((ASTToken)item).getIdentifier().equals(id);
+    }
+
+    private static final boolean isTokenType(ASTItem item, String type) {
+        return item != null && item instanceof ASTToken && ((ASTToken) item).getTypeName().equals(type);
+    }
+
+
+}

+ 289 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/layer.xml

@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
+<filesystem>
+    <folder name="Editors">
+        <folder name="text">
+            
+            <folder name="x-glsl-vertex-shader">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.Bundle"/>
+                <file name="vocabulary.xml" url="resources/JmeVocabulary.xml"/>
+                <folder name="CompletionProviders">
+                    <file name="GlslCompletionProvider.instance">
+                        <attr name="instanceCreate" methodvalue="net.java.nboglpack.glsleditor.GlslCompletionProvider.createVSCompletionProvider"/>
+                        <attr name="instanceClass" stringvalue="net.java.nboglpack.glsleditor.GlslCompletionProvider"/>
+                    </file>
+                </folder>
+                <folder name="FontsColors">
+                    <folder name="NetBeans">
+                        <folder name="Defaults">
+                            <file name="coloring.xml" url="resources/NetBeans-glsl-fontsColors.xml">
+                                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.Bundle"/>
+                            </file>
+                        </folder>
+                    </folder>
+                </folder>
+                <file name="language.instance">
+                    <attr name="instanceCreate" methodvalue="net.java.nboglpack.glsleditor.lexer.Glsl.vertexLanguage"/>
+                    <attr name="instanceOf" stringvalue="org.netbeans.api.lexer.Language"/>
+                </file>
+              <!--  <file name="EditorKit.instance">
+                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.lexer.editorbridge.LexerEditorKit.create"/>
+                    <attr name="instanceClass" stringvalue="org.netbeans.modules.lexer.editorbridge.LexerEditorKit"/>
+                </file>-->
+                <attr name="createDataObject" boolvalue="false"/>
+                <file name="language.nbs" url="glsl/GLSL_130.nbs"/>
+            </folder>
+            
+            <folder name="x-glsl-fragment-shader">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.Bundle"/>
+                <file name="vocabulary.xml" url="resources/JmeVocabulary.xml"/>
+                <folder name="CompletionProviders">
+                    <file name="GlslCompletionProvider.instance">
+                        <attr name="instanceCreate" methodvalue="net.java.nboglpack.glsleditor.GlslCompletionProvider.createFSCompletionProvider"/>
+                        <attr name="instanceClass" stringvalue="net.java.nboglpack.glsleditor.GlslCompletionProvider"/>
+                    </file>
+                </folder>
+                <folder name="FontsColors">
+                    <folder name="NetBeans">
+                        <folder name="Defaults">
+                            <file name="coloring.xml" url="resources/NetBeans-glsl-fontsColors.xml">
+                                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.Bundle"/>
+                            </file>
+                        </folder>
+                    </folder>
+                </folder>
+                <file name="language.instance">
+                    <attr name="instanceCreate" methodvalue="net.java.nboglpack.glsleditor.lexer.Glsl.fragmentLanguage"/>
+                    <attr name="instanceOf" stringvalue="org.netbeans.api.lexer.Language"/>
+                </file>
+               <!-- <file name="EditorKit.instance">
+                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.lexer.editorbridge.LexerEditorKit.create"/>
+                    <attr name="instanceClass" stringvalue="org.netbeans.modules.lexer.editorbridge.LexerEditorKit"/>
+                </file>-->
+                <attr name="createDataObject" boolvalue="false"/>
+                <file name="language.nbs" url="glsl/GLSL_130.nbs"/>
+            </folder>
+            
+            <folder name="x-glsl-geometry-shader">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.Bundle"/>
+                <file name="vocabulary.xml" url="resources/JmeVocabulary.xml"/>
+                <folder name="CompletionProviders">
+                    <file name="GlslCompletionProvider.instance">
+                        <attr name="instanceCreate" methodvalue="net.java.nboglpack.glsleditor.GlslCompletionProvider.createGSCompletionProvider"/>
+                        <attr name="instanceClass" stringvalue="net.java.nboglpack.glsleditor.GlslCompletionProvider"/>
+                    </file>
+                </folder>
+                <folder name="FontsColors">
+                    <folder name="NetBeans">
+                        <folder name="Defaults">
+                            <file name="coloring.xml" url="resources/NetBeans-glsl-fontsColors.xml">
+                                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.Bundle"/>
+                            </file>
+                        </folder>
+                    </folder>
+                </folder>
+                <file name="language.instance">
+                    <attr name="instanceCreate" methodvalue="net.java.nboglpack.glsleditor.lexer.Glsl.geometryLanguage"/>
+                    <attr name="instanceOf" stringvalue="org.netbeans.api.lexer.Language"/>
+                </file>
+              <!--  <file name="EditorKit.instance">
+                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.lexer.editorbridge.LexerEditorKit.create"/>
+                    <attr name="instanceClass" stringvalue="org.netbeans.modules.lexer.editorbridge.LexerEditorKit"/>
+                </file>-->
+                <attr name="createDataObject" boolvalue="false"/>
+                <file name="language.nbs" url="glsl/GLSL_130.nbs"/>
+            </folder>
+        </folder>
+    </folder>
+    
+    <folder name="OptionsDialog">
+        <folder name="PreviewExamples">
+            <folder name="text">
+                <file name="x-glsl-vertex-shader" url="resources/GlslVertexShaderExample.vert"/>
+                <file name="x-glsl-fragment-shader" url="resources/GlslFragmentShaderExample.frag"/>
+                <file name="x-glsl-geometry-shader" url="resources/GlslGeometryShaderExample.geom"/>
+            </folder>
+        </folder>
+    </folder> 
+    
+    <folder name="Loaders">
+        <folder name="text">
+            <folder name="x-glsl-geometry-shader">
+                <folder name="Actions">
+                    <file name="org-openide-actions-CopyAction.instance">
+                        <attr name="position" intvalue="500"/>
+                    </file>
+                    <file name="org-openide-actions-CutAction.instance">
+                        <attr name="position" intvalue="400"/>
+                    </file>
+                    <file name="org-openide-actions-DeleteAction.instance">
+                        <attr name="position" intvalue="700"/>
+                    </file>
+                    <file name="org-openide-actions-FileSystemAction.instance">
+                        <attr name="position" intvalue="200"/>
+                    </file>
+                    <file name="org-openide-actions-OpenAction.instance">
+                        <attr name="position" intvalue="100"/>
+                    </file>
+                    <file name="org-openide-actions-PropertiesAction.instance">
+                        <attr name="position" intvalue="1300"/>
+                    </file>
+                    <file name="org-openide-actions-RenameAction.instance">
+                        <attr name="position" intvalue="800"/>
+                    </file>
+                    <file name="org-openide-actions-SaveAsTemplateAction.instance">
+                        <attr name="position" intvalue="1000"/>
+                    </file>
+                    <file name="org-openide-actions-ToolsAction.instance">
+                        <attr name="position" intvalue="1200"/>
+                    </file>
+                    <file name="sep-1.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="300"/>
+                    </file>
+                    <file name="sep-2.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="600"/>
+                    </file>
+                    <file name="sep-3.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="900"/>
+                    </file>
+                    <file name="sep-4.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="1100"/>
+                    </file>
+                </folder>
+            </folder>
+            <folder name="x-glsl-vertex-shader">
+                <folder name="Actions">
+                    <file name="org-openide-actions-CopyAction.instance">
+                        <attr name="position" intvalue="500"/>
+                    </file>
+                    <file name="org-openide-actions-CutAction.instance">
+                        <attr name="position" intvalue="400"/>
+                    </file>
+                    <file name="org-openide-actions-DeleteAction.instance">
+                        <attr name="position" intvalue="700"/>
+                    </file>
+                    <file name="org-openide-actions-FileSystemAction.instance">
+                        <attr name="position" intvalue="200"/>
+                    </file>
+                    <file name="org-openide-actions-OpenAction.instance">
+                        <attr name="position" intvalue="100"/>
+                    </file>
+                    <file name="org-openide-actions-PropertiesAction.instance">
+                        <attr name="position" intvalue="1300"/>
+                    </file>
+                    <file name="org-openide-actions-RenameAction.instance">
+                        <attr name="position" intvalue="800"/>
+                    </file>
+                    <file name="org-openide-actions-SaveAsTemplateAction.instance">
+                        <attr name="position" intvalue="1000"/>
+                    </file>
+                    <file name="org-openide-actions-ToolsAction.instance">
+                        <attr name="position" intvalue="1200"/>
+                    </file>
+                    <file name="sep-1.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="300"/>
+                    </file>
+                    <file name="sep-2.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="600"/>
+                    </file>
+                    <file name="sep-3.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="900"/>
+                    </file>
+                    <file name="sep-4.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="1100"/>
+                    </file>
+                </folder>
+            </folder>
+            <folder name="x-glsl-fragment-shader">
+                <folder name="Actions">
+                    <file name="org-openide-actions-CopyAction.instance">
+                        <attr name="position" intvalue="500"/>
+                    </file>
+                    <file name="org-openide-actions-CutAction.instance">
+                        <attr name="position" intvalue="400"/>
+                    </file>
+                    <file name="org-openide-actions-DeleteAction.instance">
+                        <attr name="position" intvalue="700"/>
+                    </file>
+                    <file name="org-openide-actions-FileSystemAction.instance">
+                        <attr name="position" intvalue="200"/>
+                    </file>
+                    <file name="org-openide-actions-OpenAction.instance">
+                        <attr name="position" intvalue="100"/>
+                    </file>
+                    <file name="org-openide-actions-PropertiesAction.instance">
+                        <attr name="position" intvalue="1300"/>
+                    </file>
+                    <file name="org-openide-actions-RenameAction.instance">
+                        <attr name="position" intvalue="800"/>
+                    </file>
+                    <file name="org-openide-actions-SaveAsTemplateAction.instance">
+                        <attr name="position" intvalue="1000"/>
+                    </file>
+                    <file name="org-openide-actions-ToolsAction.instance">
+                        <attr name="position" intvalue="1200"/>
+                    </file>
+                    <file name="sep-1.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="300"/>
+                    </file>
+                    <file name="sep-2.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="600"/>
+                    </file>
+                    <file name="sep-3.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="900"/>
+                    </file>
+                    <file name="sep-4.instance">
+                        <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                        <attr name="position" intvalue="1100"/>
+                    </file>
+                </folder>
+            </folder>
+        </folder>
+    </folder>
+    
+    <folder name="Services">
+        <folder name="MIMEResolver">
+            <file name="GlslFragmentShaderResolver.xml" url="resources/GlslFragmentShaderResolver.xml">
+                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/net/java/nboglpack/glsleditor/resources/FragmentShaderIcon.gif"/>
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.dataobject.Bundle"/>
+            </file>
+            <file name="GlslGeometryShaderResolver.xml" url="resources/GlslGeometryShaderResolver.xml">
+                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/net/java/nboglpack/glsleditor/resources/GeometryShaderIcon.gif"/>
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.dataobject.Bundle"/>
+            </file>
+            <file name="GlslVertexShaderResolver.xml" url="resources/GlslVertexShaderResolver.xml">
+                <attr name="SystemFileSystem.icon" urlvalue="nbresloc:/net/java/nboglpack/glsleditor/resources/VertexShaderIcon.gif"/>
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.dataobject.Bundle"/>
+            </file>
+        </folder>
+    </folder>
+    
+    <folder name="Templates">
+        <folder name="OpenGL">
+            <file name="FragmentShader.frag" url="resources/FragmentShaderTemplate.frag">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.dataobject.Bundle"/>
+                <attr name="template" boolvalue="true"/>
+            </file>
+            <file name="GeometryShader.geom" url="resources/GeometryShaderTemplate.geom">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.dataobject.Bundle"/>
+                <attr name="template" boolvalue="true"/>
+            </file>
+            <file name="VertexShader.vert" url="resources/VertexShaderTemplate.vert">
+                <attr name="SystemFileSystem.localizingBundle" stringvalue="net.java.nboglpack.glsleditor.dataobject.Bundle"/>
+                <attr name="template" boolvalue="true"/>
+            </file>
+            <attr name="position" intvalue="2000"/>
+        </folder>
+    </folder>
+</filesystem>

+ 61 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/lexer/Glsl.java

@@ -0,0 +1,61 @@
+/*
+ * VertexLanguage.java
+ * 
+ * Created on 19.08.2007, 18:25:24
+ * 
+ */
+
+package net.java.nboglpack.glsleditor.lexer;
+
+import java.util.Collection;
+import java.util.EnumSet;
+import net.java.nboglpack.glsleditor.GlslVocabularyManager;
+import net.java.nboglpack.glsleditor.dataobject.GlslFragmentShaderDataLoader;
+import net.java.nboglpack.glsleditor.dataobject.GlslGeometryShaderDataLoader;
+import net.java.nboglpack.glsleditor.dataobject.GlslVertexShaderDataLoader;
+import org.netbeans.api.lexer.Language;
+import org.netbeans.spi.lexer.LanguageHierarchy;
+import org.netbeans.spi.lexer.Lexer;
+import org.netbeans.spi.lexer.LexerRestartInfo;
+
+/**
+ * OpenGL Shading Language.
+ * @author Michael Bien
+ */
+public class Glsl extends LanguageHierarchy<GlslTokenId> {
+ 
+ public static final Glsl VERTEX_LANGUAGE = new Glsl(GlslVertexShaderDataLoader.REQUIRED_MIME);
+ public static final Glsl GEOMETRY_LANGUAGE = new Glsl(GlslGeometryShaderDataLoader.REQUIRED_MIME);
+ public static final Glsl FRAGMENT_LANGUAGE = new Glsl(GlslFragmentShaderDataLoader.REQUIRED_MIME);
+ 
+ private final String mimeType;
+ 
+ private Glsl(String mimeType) {
+     this.mimeType = mimeType;
+ }
+ 
+    @Override
+    protected String mimeType() {
+        return mimeType;
+    }
+
+    @Override
+    protected Collection<GlslTokenId> createTokenIds() {
+        return EnumSet.allOf(GlslTokenId.class);
+    }
+    
+    @Override
+    protected Lexer<GlslTokenId> createLexer(LexerRestartInfo<GlslTokenId> info) {
+        return new GlslLexer(info, GlslVocabularyManager.getInstance(mimeType()));
+    }
+    
+    public static Language<GlslTokenId> vertexLanguage(){
+        return VERTEX_LANGUAGE.language();
+    }
+    public static Language<GlslTokenId> fragmentLanguage(){
+        return FRAGMENT_LANGUAGE.language();
+    }
+    public static Language<GlslTokenId> geometryLanguage(){
+        return GEOMETRY_LANGUAGE.language();
+    }
+}

+ 343 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/lexer/GlslLexer.java

@@ -0,0 +1,343 @@
+/*
+ * GlslLexer.java
+ * 
+ * Created on 19.08.2007, 18:31:16
+ * 
+ */
+
+package net.java.nboglpack.glsleditor.lexer;
+
+import net.java.nboglpack.glsleditor.GlslVocabularyManager;
+import net.java.nboglpack.glsleditor.vocabulary.GLSLElementDescriptor;
+import org.netbeans.api.lexer.Token;
+import org.netbeans.spi.lexer.Lexer;
+import org.netbeans.spi.lexer.LexerInput;
+import org.netbeans.spi.lexer.LexerRestartInfo;
+import org.netbeans.spi.lexer.TokenFactory;
+
+
+/**
+ * Lexer for the OpenGL Shading Language.
+ * @author Michael Bien
+ */
+public class GlslLexer implements Lexer<GlslTokenId> {
+ 
+ private final LexerInput input;
+ private final TokenFactory<GlslTokenId> factory;
+ private final GlslVocabularyManager manager;
+ private final StringBuilder stringBuilder;
+ 
+ 
+ public GlslLexer(LexerRestartInfo<GlslTokenId> info, GlslVocabularyManager manager) {
+     this.input = info.input();
+     this.factory = info.tokenFactory();
+     this.manager = manager;
+     this.stringBuilder = new StringBuilder();
+ }
+
+    @SuppressWarnings("fallthrough")
+    public Token<GlslTokenId> nextToken() {
+        
+        int character = input.read();
+        
+        switch(character) {
+            
+            case '(':
+            case ')':
+                return factory.createToken(GlslTokenId.PAREN);
+            case '{':
+            case '}':
+                return factory.createToken(GlslTokenId.BRACE);
+            case '[':
+            case ']':
+                return factory.createToken(GlslTokenId.BRACKET);
+            case '.':
+                return factory.createToken(GlslTokenId.DOT);
+            case ',':
+                return factory.createToken(GlslTokenId.COMMA);
+            case ':':
+                return factory.createToken(GlslTokenId.COLON);
+            case ';':
+                return factory.createToken(GlslTokenId.SEMICOLON);
+            case '?':
+                return factory.createToken(GlslTokenId.QUESTION);
+            case '~':
+                return factory.createToken(GlslTokenId.TILDE);
+            case '*':
+                if(input.read() == '=') {
+                    return factory.createToken(GlslTokenId.MUL_ASSIGN);
+                }else{
+                    input.backup(1);
+                    return factory.createToken(GlslTokenId.STAR);
+                }
+            case '%':
+                if(input.read() == '=') {
+                    return factory.createToken(GlslTokenId.MOD_ASSIGN);
+                }else{
+                    input.backup(1);
+                    return factory.createToken(GlslTokenId.PERCENT);
+                }
+            case '!':
+                if(input.read() == '=') {
+                    return factory.createToken(GlslTokenId.NE);
+                }else{
+                    input.backup(1);
+                    return factory.createToken(GlslTokenId.BANG);
+                }
+            case '=':
+                if(input.read() == '=') {
+                    return factory.createToken(GlslTokenId.EQEQ);
+                }else{
+                    input.backup(1);
+                    return factory.createToken(GlslTokenId.EQ);
+                }
+            case '^':
+                switch(input.read()) {
+                    case('^'):
+                        return factory.createToken(GlslTokenId.CARETCARET);
+                    case('='):
+                        return factory.createToken(GlslTokenId.XOR_ASSIGN);
+                    default:
+                        input.backup(1);
+                        return factory.createToken(GlslTokenId.CARET);
+                }
+            case '+':
+                switch(input.read()) {
+                    case('+'):
+                        return factory.createToken(GlslTokenId.PLUSPLUS);
+                    case('='):
+                        return factory.createToken(GlslTokenId.ADD_ASSIGN);
+                    default:
+                        input.backup(1);
+                        return factory.createToken(GlslTokenId.PLUS);
+                }
+            case '-':
+                switch(input.read()) {
+                    case('-'):
+                        return factory.createToken(GlslTokenId.MINUSMINUS);
+                    case('='):
+                        return factory.createToken(GlslTokenId.SUB_ASSIGN);
+                    default:
+                        input.backup(1);
+                        return factory.createToken(GlslTokenId.MINUS);
+                }
+            case '&':
+                switch(input.read()) {
+                    case('&'):
+                        return factory.createToken(GlslTokenId.AMPAMP);
+                    case('='):
+                        return factory.createToken(GlslTokenId.AND_ASSIGN);
+                    default:
+                        input.backup(1);
+                        return factory.createToken(GlslTokenId.AMP);
+                }
+            case '|':
+                switch(input.read()) {
+                    case('|'):
+                        return factory.createToken(GlslTokenId.BARBAR);
+                    case ('='):
+                        return factory.createToken(GlslTokenId.OR_ASSIGN);
+                    default:
+                        input.backup(1);
+                        return factory.createToken(GlslTokenId.BAR);
+                }
+            case '<':
+                switch(input.read()) {
+                    case('<'):
+                        if(input.read() == '=') {
+                            return factory.createToken(GlslTokenId.LEFT_BITSHIFT_ASSIGN);
+                        }else{
+                            input.backup(1);
+                            return factory.createToken(GlslTokenId.LEFT_BITSHIFT);
+                        }
+                    case('='):
+                        return factory.createToken(GlslTokenId.LE);
+                    default:
+                        input.backup(1);
+                        return factory.createToken(GlslTokenId.LEFT_ANGLE);
+                }
+            case '>':
+                switch(input.read()) {
+                    case('>'):
+                        if(input.read() == '=') {
+                            return factory.createToken(GlslTokenId.RIGHT_BITSHIFT_ASSIGN);
+                        }else{
+                            input.backup(1);
+                            return factory.createToken(GlslTokenId.RIGHT_BITSHIFT);
+                        }
+                    case('='):
+                        return factory.createToken(GlslTokenId.GE);
+                    default:
+                        input.backup(1);
+                        return factory.createToken(GlslTokenId.RIGHT_ANGLE);
+                }
+            case '/':
+                int c = input.read();
+                if(c == '/') {
+                    readRemainingLine();
+                    return factory.createToken(GlslTokenId.COMMENT);
+                }else if(c == '*') {
+                    return tokenizeMLComment();
+                }else if(c == '=') {
+                    return factory.createToken(GlslTokenId.DIV_ASSIGN);
+                }else{
+                    input.backup(1);
+                    return factory.createToken(GlslTokenId.SLASH);
+                }
+            case '#':
+                readRemainingLine();
+                return factory.createToken(GlslTokenId.PREPROCESSOR);
+            case ' ':
+            case '\t':
+                do{
+                    character = input.read();
+                }while(character == ' ' || character == '\t');
+                input.backup(1);                
+                return factory.createToken(GlslTokenId.WHITESPACE);
+            case '\r':
+                input.consumeNewline();
+            case LexerInput.EOF:
+                if(input.readLength() == 0)
+                    return null;
+            case '\n':
+                return factory.createToken(GlslTokenId.END_OF_LINE);
+            default:
+                if(Character.isDigit(character)) {
+                    return tokenizeNumber();
+                }else if(Character.isUnicodeIdentifierStart(character)) {
+                    return tokenizeName();
+                }else{
+                    return factory.createToken(GlslTokenId.error);
+                }
+        }
+      
+    }
+    
+    @SuppressWarnings("fallthrough")
+    private final void readRemainingLine() {
+        
+        int character = input.read();
+        
+        while(character != LexerInput.EOF) {
+            switch (character) {
+                case '\r':
+                    input.consumeNewline();
+                case '\n':
+                case LexerInput.EOF:
+                    return;
+            }
+            character = input.read();
+        }
+        
+    }
+    
+    private final Token<GlslTokenId> tokenizeMLComment() {
+        
+        int character = input.read();
+        
+        while(character != LexerInput.EOF) {
+            if(character == '*' && input.read() == '/') {
+                return factory.createToken(GlslTokenId.ML_COMMENT);
+            }
+            character = input.read();
+        }
+        return factory.createToken(GlslTokenId.ML_COMMENT);
+        
+    }
+    
+    private final Token<GlslTokenId> tokenizeNumber() {
+        
+        int character;
+        
+        do{
+            character = input.read();
+        }while(Character.isDigit(character));
+        
+        if(character == '.') {
+            
+            do{
+                character = input.read();
+            }while(Character.isDigit(character));
+            
+            if(character != 'f' && character != 'F')
+                input.backup(1);
+            
+            return factory.createToken(GlslTokenId.FLOAT_LITERAL);
+            
+        }else{
+
+            if(character != 'u' && character != 'U')
+                input.backup(1);
+            
+//            input.backup(1);
+            return factory.createToken(GlslTokenId.INTEGER_LITERAL);
+            
+        }
+    }
+    
+    private final Token<GlslTokenId> tokenizeName() {
+        
+        if(stringBuilder.length() > 0)
+            stringBuilder.delete(0, stringBuilder.length());
+        
+        // backup everything read
+        input.backup(input.readLength()); 
+        
+        // assamble token
+        char c;
+        while(Character.isUnicodeIdentifierPart(c = ((char)input.read())))        
+            stringBuilder.append(c);
+        
+        if(stringBuilder.length() > 0)
+            input.backup(1);
+                
+        // categorise token
+        GLSLElementDescriptor[] desc = manager.getDesc(stringBuilder.toString());
+        
+        if(desc != null) {
+            
+            if(desc[0].category != null) {
+                
+                if(desc[0].category == GLSLElementDescriptor.Category.BUILD_IN_FUNC) 
+                    return factory.createToken(GlslTokenId.BUILD_IN_FUNC);
+
+                if(desc[0].category == GLSLElementDescriptor.Category.BUILD_IN_VAR) 
+                    return factory.createToken(GlslTokenId.BUILD_IN_VAR);
+            
+                return factory.createToken(GlslTokenId.KEYWORD);
+                
+            }
+        }
+        
+        // check if token = function name
+        int tokenEnd = input.readLength();
+        int character = input.read();
+        
+        while(true) {
+            switch (character) {
+                case ' ':
+                case '\t':
+                case '\r':
+                case '\n':
+                    character = input.read();
+                    break;
+                case '(':
+                    input.backup(input.readLength()-tokenEnd);
+                    return factory.createToken(GlslTokenId.FUNCTION);
+                default:
+                    input.backup(input.readLength()-tokenEnd);
+                    return factory.createToken(GlslTokenId.IDENTIFIER);
+            }
+        }
+        
+    }
+
+    public Object state() {
+        // we don't need states
+        return null;
+    }
+
+    public void release() {
+    }
+
+}

+ 90 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/lexer/GlslTokenId.java

@@ -0,0 +1,90 @@
+/*
+ * GlslTokenId.java
+ * 
+ * Created on 19.08.2007, 18:09:00
+ * 
+ */
+
+package net.java.nboglpack.glsleditor.lexer;
+
+import org.netbeans.api.lexer.TokenId;
+
+/**
+ * Enumeration of GLSL token ids.
+ * @author Michael Bien
+ */
+public enum GlslTokenId implements TokenId {
+    
+
+ IDENTIFIER("glsl-name"),
+ INTEGER_LITERAL("glsl-literal"),
+ FLOAT_LITERAL("glsl-literal"),
+ FUNCTION("glsl-function"),
+ KEYWORD("glsl-keyword"),
+ BUILD_IN_FUNC("glsl-build-in-func"),
+ BUILD_IN_VAR("glsl-build-in-var"),
+ COMMENT("glsl-comment"),
+ ML_COMMENT("glsl-comment"),
+ 
+ PAREN("glsl-paren"),
+ BRACE("glsl-brace"),
+ BRACKET("glsl-bracket"),
+ LEFT_ANGLE("glsl-angle"),
+ RIGHT_ANGLE("glsl-angle"),
+ 
+ SEMICOLON("glsl-separator"),
+ COMMA("glsl-separator"),
+ DOT("glsl-separator"),
+ COLON("glsl-separator"),
+ 
+ PERCENT("glsl-operation"),
+ STAR("glsl-operation"),
+ TILDE("glsl-operation"),
+ QUESTION("glsl-operation"),
+ BANG("glsl-operation"),
+ SLASH("glsl-operation"),
+ LEFT_BITSHIFT("glsl-operation"),
+ RIGHT_BITSHIFT("glsl-operation"),
+ PLUS("glsl-operation"),
+ PLUSPLUS("glsl-operation"),
+ MINUS("glsl-operation"),
+ MINUSMINUS("glsl-operation"),
+ AMP("glsl-operation"),
+ AMPAMP("glsl-operation"),
+ EQ("glsl-operation"),
+ EQEQ("glsl-operation"),
+ NE("glsl-operation"),
+ LE("glsl-operation"),
+ GE("glsl-operation"),
+ BAR("glsl-operation"),
+ BARBAR("glsl-operation"),
+ CARET("glsl-operation"),
+ CARETCARET("glsl-operation"),
+ ADD_ASSIGN("glsl-operation"),
+ SUB_ASSIGN("glsl-operation"),
+ MUL_ASSIGN("glsl-operation"),
+ DIV_ASSIGN("glsl-operation"),
+ AND_ASSIGN("glsl-operation"),
+ OR_ASSIGN("glsl-operation"),
+ XOR_ASSIGN("glsl-operation"),
+ MOD_ASSIGN("glsl-operation"),
+ LEFT_BITSHIFT_ASSIGN("glsl-operation"),
+ RIGHT_BITSHIFT_ASSIGN("glsl-operation"),
+ 
+ WHITESPACE("glsl-whitespace"),
+ END_OF_LINE("glsl-end-of-line"),
+ PREPROCESSOR("glsl-preprocessor"),
+
+ error("glsl-error");
+ 
+ private final String primaryCategory;
+   
+ private GlslTokenId(String primaryCategory) {
+    this.primaryCategory = primaryCategory;
+ }
+
+    public String primaryCategory() {
+        return primaryCategory;
+    }
+  
+}

BIN
jme3-glsl-support/src/net/java/nboglpack/glsleditor/opengl-icon.gif


BIN
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/FragmentShaderIcon.gif


+ 8 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/FragmentShaderTemplate.frag

@@ -0,0 +1,8 @@
+/*
+* fragment shader template
+*/
+void main() {
+    // Set the fragment color for example to gray, alpha 1.0
+    gl_FragColor = vec4(0.5, 0.5, 0.5, 1.0);  
+}
+

BIN
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GeometryShaderIcon.gif


+ 26 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GeometryShaderTemplate.geom

@@ -0,0 +1,26 @@
+/*
+* geometry shader template
+*/
+
+#version 120 
+#extension GL_EXT_geometry_shader4 : enable 
+ 
+// a passthrough geometry shader for color and position 
+void main(void) { 
+
+    for(int i = 0; i < gl_VerticesIn; ++i) { 
+
+        // copy color 
+        gl_FrontColor = gl_FrontColorIn[i]; 
+
+        // copy position 
+        gl_Position = gl_PositionIn[i]; 
+
+        // done with the vertex 
+        EmitVertex(); 
+
+    } 
+
+    EndPrimitive();
+
+} 

+ 28 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslFragmentShaderExample.frag

@@ -0,0 +1,28 @@
+// ------ Fragment shader ------ //
+
+#pragma debug(on)
+
+varying vec3 normal;
+
+/*
+* Toon shader
+*/
+void main() {
+
+    float intensity;
+    vec4 color;
+    vec3 n = normalize(normal);
+
+    intensity = dot(vec3(gl_LightSource[0].position),n);
+
+    if (intensity > 0.95)
+        color = vec4(1.0,0.5,0.5,1.0);
+    else if (intensity > 0.5)
+        color = vec4(0.6,0.3,0.3,1.0);
+    else if (intensity > 0.25)
+        color = vec4(0.4,0.2,0.2,1.0);
+    else
+        color = vec4(0.2,0.1,0.1,1.0);
+
+    gl_FragColor = color;
+} 

+ 18 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslFragmentShaderResolver.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
+<MIME-resolver>
+    <file>
+        <ext name="frag"/>
+        <ext name="fragment"/>
+        <ext name="glfrag"/>
+        <ext name="glslfrag"/>
+        <ext name="glslfragment"/>
+        <ext name="glfragmentshader"/>
+        <ext name="glslfragmentshader"/>
+        <ext name="glsl-frag"/>
+        <ext name="glsl-fragment"/>
+        <ext name="gl-fragment-shader"/>
+        <ext name="glsl-fragment-shader"/>
+        <resolver mime="text/x-glsl-fragment-shader"/>
+    </file>
+</MIME-resolver>

+ 26 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslGeometryShaderExample.geom

@@ -0,0 +1,26 @@
+// ------ Geometry shader ------ //
+
+#version 120 
+#extension GL_EXT_geometry_shader4 : enable 
+
+/*
+* a passthrough geometry shader for color and position 
+*/
+void main() { 
+
+  for(int i = 0; i < gl_VerticesIn; ++i) { 
+
+    // copy color 
+    gl_FrontColor = gl_FrontColorIn[i]; 
+ 
+    // copy position 
+    gl_Position = gl_PositionIn[i]; 
+ 
+    // done with the vertex 
+    EmitVertex(); 
+
+  } 
+
+  EndPrimitive();
+
+} 

+ 18 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslGeometryShaderResolver.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
+<MIME-resolver>
+    <file>
+        <ext name="geom"/>
+        <ext name="geometry"/>
+        <ext name="glgeom"/>
+        <ext name="glslgeom"/>
+        <ext name="glslgeometry"/>
+        <ext name="glgeometryshader"/>
+        <ext name="glslgeometryshader"/>
+        <ext name="glsl-geom"/>
+        <ext name="glsl-geometry"/>
+        <ext name="gl-geometry-shader"/>
+        <ext name="glsl-geometry-shader"/>
+        <resolver mime="text/x-glsl-geometry-shader"/>
+    </file>
+</MIME-resolver>

+ 29 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslVertexShaderExample.vert

@@ -0,0 +1,29 @@
+// ------ Vertex shader ------ //
+
+#pragma debug(on)
+
+uniform vec3 LightPosition;
+const float SpecularContribution = 0.3;
+varying float LightIntensity;
+
+/*
+* main function
+*/
+void main()  {
+
+    vec3 ecPosition = vec3 (gl_ModelViewMatrix * gl_Vertex);
+    vec3 tnorm      = normalize(gl_NormalMatrix * gl_Normal);
+    vec3 lightVec   = normalize(LightPosition - ecPosition);
+    vec3 reflectVec = reflect(-lightVec, tnorm);
+    vec3 viewVec    = normalize(-ecPosition);
+    float diffuse   = max(dot(lightVec, tnorm), 0.0);
+    float spec      = 0.0;
+
+    if (diffuse > 0.0)    {
+        spec = max(dot(reflectVec, viewVec), 0.0);
+        spec = pow(spec, 16.0);
+    }
+
+    LightIntensity  = 0.7 * diffuse + SpecularContribution * spec;
+    gl_Position     = ftransform();
+}

+ 18 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslVertexShaderResolver.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.0//EN" "http://www.netbeans.org/dtds/mime-resolver-1_0.dtd">
+<MIME-resolver>
+    <file>
+        <ext name="vert"/>
+        <ext name="vertex"/>
+        <ext name="glvert"/>
+        <ext name="glslvert"/>
+        <ext name="glslvertex"/>
+        <ext name="glvertexshader"/>
+        <ext name="glslvertexshader"/>
+        <ext name="glsl-vert"/>
+        <ext name="glsl-vertex"/>
+        <ext name="gl-vertex-shader"/>
+        <ext name="glsl-vertex-shader"/>
+        <resolver mime="text/x-glsl-vertex-shader"/>
+    </file>
+</MIME-resolver>

+ 4724 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/GlslVocabulary.xml

@@ -0,0 +1,4724 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<glslVocabulary>
+    <mainVocabulary>
+        <entry>
+            <key>pow</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>float</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>single floating-point scalar</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>dot</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, vec4)</arguments>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxFragmentUniformComponents</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;=  64 ARB_fragment_shader required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum allowed uniform 
+    components inside the fragment shader.&lt;br&gt; This limit refers to the storage 
+    for the combination of build-in uniform variables and user-defined uniform 
+    variables that are actually used in a fragment shader. This constant can 
+    be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB&lt;/i&gt;. 
+    The minimum value is 64 if &lt;i&gt;ARB_fragment_shader&lt;/i&gt; is supported.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>else</key>
+            <value>
+                <item>
+                    <category>SELECTION</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackLightProduct</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxLights</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform gl_LightProducts</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxVertexAttribs</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 16 ARB_vertex_shader required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum useable vertex attributes 
+    in a vertex shader.&lt;br&gt; This limit consists of the standard (build-in) attributes (these are color, secondary color, normal, vertex position, texture coordinates, and fog coordinates) and the generic attributes left for custom purposes. This constant can be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; 
+    with the symbolic constant &lt;i&gt;GL_MAX_VERTEX_ATTRIBS_ARB&lt;/i&gt;. Every OpenGL 
+    implementation is required to support at least 16 vertex attributes in a 
+    vertex shader.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>log</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture2DLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec2, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uvec2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a two-component unsigned integer vector</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a two-component unsigned integer vector&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>floor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uvec3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a three-component unsigned integer vector</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a three-component unsigned integer vector&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uvec4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a four-component unsigned integer vector</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a four-component unsigned integer vector&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>faceforward</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4 V, vec4 I, vec4 N)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureMatrixTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>smooth</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>perspective correct interpolation</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+      perspective correct interpolation
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler2DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip> a handle for accessing an unsigned integer 2D array texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 2D array texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ceil</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>smoothstep</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture2DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec3, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler1D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 1D texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 1D texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>do</key>
+            <value>
+                <item>
+                    <category>ITERATION</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture1DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, vec2, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>max</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sqrt</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow1DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1DShadow, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>highp</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    qualifier for high precision
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxVertexUniformComponents</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 512 ARB_vertex_shader required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum allowed uniform 
+    components inside the vertex shader.&lt;br&gt; This limit refers to the storage for 
+    the combination of build-in uniform variables and user-defined uniform 
+    variables that are actually used in a vertex shader. This constant can be 
+    also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB&lt;/i&gt;. 
+    The minimum value is 512 if &lt;i&gt;ARB_vertex_shader&lt;/i&gt; is supported.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noise4</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>clamp</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, float, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, float, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, float, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sin</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric sine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric sine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric sine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric sine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noise2</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec2</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noise3</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec3</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noise1</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ProjectionMatrixInverseTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>reflect</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4 I, vec4 N)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>vec4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>four component floating-point vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>cos</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric cosine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric cosine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric cosine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric cosine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>centroid</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>centroid interpolation on multi-sample varyings</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Examples:
+
+    &lt;blockquote&gt;
+      &lt;code&gt;&lt;nobr&gt;centroid varying vec4 color;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;centroid varying float value;&lt;/nobr&gt;&lt;/code&gt;
+    &lt;/blockquote&gt;
+    By definition, varying variables are set per vertex and are interpolated 
+    in a perspective-correct manner over the primitive being rendered.
+
+    &lt;ul&gt;
+      &lt;li&gt;
+        If single-sampling, the value is interpolated to the pixel's center, 
+        and the &lt;b&gt;centroid &lt;/b&gt;qualifier, if present, is ignored.
+      &lt;/li&gt;
+      &lt;li&gt;
+        If multi-sampling, and &lt;b&gt;varying&lt;/b&gt; is not qualified with &lt;b&gt;centroid&lt;/b&gt;, 
+        then the value must be interpolated to the pixel's center, or anywhere 
+        within the pixel, or to one of the pixel's samples.
+      &lt;/li&gt;
+      &lt;li&gt;
+        If multi-sampling and &lt;b&gt;varying &lt;/b&gt;is qualified with &lt;b&gt;centroid&lt;/b&gt;, 
+        then the value must be interpolated to a point that lies in both the 
+        pixel and in the primitive being rendered, or to one of the pixel's 
+        samples that falls within the primitive. Due to the less regular 
+        location of centroids, their derivatives may be less accurate than 
+        non-centroid varying variables.
+      &lt;/li&gt;
+    &lt;/ul&gt;
+    &lt;p&gt;
+      When using the &lt;b&gt;centroid &lt;/b&gt;keyword, it must immediately precede the &lt;b&gt;varying 
+      &lt;/b&gt;keyword. A fragment shader may read from varying variables and the 
+      value read will be the interpolated value, as a function of the 
+      fragment's position within the primitive. A fragment shader can not 
+      write to a varying variable.
+    &lt;/p&gt;
+    &lt;p&gt;
+      The type and presence of the &lt;b&gt;centroid &lt;/b&gt;and &lt;b&gt;invariant &lt;/b&gt;qualifiers 
+      of varying variables with the same name declared in linked vertex and 
+      fragments shaders must match, otherwise the link command will fail. Only 
+      those varying variables used (i.e. read) in the fragment shader 
+      executable must be written to by the vertex shader executable; declaring 
+      superfluous varying variables in a vertex shader is permissible.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture1D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, float, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ivec4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>four component integer vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ivec3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>three component integer vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow2D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2DShadow, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>varying</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>output from Vertex shader (READ/WRITE), interpolated, then input to Fragment shader (READ-ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+       &lt;b&gt;Deprecated since 1.3, use &lt;i&gt;smooth&lt;/i&gt; instead&lt;/b&gt;
+    &lt;/p&gt;
+    &lt;p&gt;
+    &lt;/p&gt;
+    Varying variables provide the interface between the vertex shader and 
+    geometry shader and also between the geometry shader and fragment shader 
+    and the fixed functionality between them. If no geometry shader is 
+    present, &lt;b&gt;varying&lt;/b&gt; variables also provide the interface between the 
+    vertex shader and fragment shader.
+
+    &lt;p&gt;
+      The vertex, or geometry shader will compute values per vertex (such as 
+      color, texture coordinates, etc) and write them to output variables 
+      declared with the &amp;quot;varying&amp;quot; qualifier (vertex) or &amp;quot;varying out&amp;quot; 
+      qualifiers (geometry). A vertex or geometry shader may also read these 
+      output varying variables, getting back the same values it has written. 
+      Reading an output varying variable in a vertex or geometry shader 
+      returns undefined results if it is read before being written.
+    &lt;/p&gt;
+    &lt;p&gt;
+      A geometry shader may also read from an input &lt;b&gt;varying&lt;/b&gt; variable 
+      declared with the &amp;quot;varying in&amp;quot; qualifiers. The value read will be the 
+      same value as written by the vertex shader for that &lt;b&gt;varying&lt;/b&gt; 
+      variable. Since a geometry shader operates on primitives, each input 
+      varying variable needs to be declared as an array. Each element of such 
+      an array corresponds to a vertex of the primitive being processed. If 
+      the varying variable is declared as a scalar or matrix in the vertex 
+      shader, it will be a one-dimensional array in the geometry shader. Each 
+      array can optionally have a size declared. If a size is not specified, 
+      it inferred by the linker and depends on the value of the input 
+      primitive type. See table 4.3.xxx (GLSL specification) to determine the 
+      exact size. The read-only built-in constant &lt;b&gt;gl_VerticesIn&lt;/b&gt; will be 
+      set to this value by the linker. If a size is specified, it has to be 
+      the size as given by table 4.3.xxx, otherwise a link error will occur. 
+      The built-in constant &lt;b&gt;gl_VerticesIn&lt;/b&gt;, if so desired, can be used 
+      to size the array correctly for each input primitive type. Varying 
+      variables can also be declared as arrays in the vertex shader. This 
+      means that those, on input to the geometry shader, must be declared as 
+      two- dimensional arrays. The first index to the two-dimensional array 
+      holds the vertex number. Declaring a size for the first range of the 
+      array is optional, just as it is for one-dimensional arrays. The second 
+      index holds the per-vertex array data. Declaring a size for the second 
+      range of the array is not optional, and has to match the declaration in 
+      the vertex shader.
+    &lt;/p&gt;
+    &lt;p&gt;
+      By definition, varying variables are set per vertex and are interpolated 
+      in a perspective-correct manner over the primitive being rendered. If 
+      single-sampling, the value is interpolated to the pixel's center, and 
+      the &lt;b&gt;centroid &lt;/b&gt;qualifier, if present, is ignored. If 
+      multi-sampling, and &lt;b&gt;varying&lt;/b&gt; is not qualified with &lt;b&gt;centroid&lt;/b&gt;, 
+      then the value must be interpolated to the pixel's center, or anywhere 
+      within the pixel, or to one of the pixel's samples. If multi-sampling 
+      and &lt;b&gt;varying &lt;/b&gt;is qualified with &lt;b&gt;centroid&lt;/b&gt;, then the value 
+      must be interpolated to a point that lies in both the pixel and in the 
+      primitive being rendered, or to one of the pixel's samples that falls 
+      within the primitive. Due to the less regular location of centroids, 
+      their derivatives may be less accurate than non-centroid varying 
+      variables.
+    &lt;/p&gt;
+    &lt;p&gt;
+      When using the &lt;b&gt;centroid &lt;/b&gt;keyword, it must immediately precede the &lt;b&gt;varying 
+      &lt;/b&gt;keyword. A fragment shader may read from varying variables and the 
+      value read will be the interpolated value, as a function of the 
+      fragment's position within the primitive. A fragment shader can not 
+      write to a varying variable.
+    &lt;/p&gt;
+    &lt;p&gt;
+      The type and presence of the &lt;b&gt;centroid &lt;/b&gt;and &lt;b&gt;invariant &lt;/b&gt;qualifiers 
+      of varying variables with the same name declared in linked vertex and 
+      fragments shaders must match, otherwise the link command will fail. Only 
+      those varying variables used (i.e. read) in the fragment shader 
+      executable must be written to by the vertex shader executable; declaring 
+      superfluous varying variables in a vertex shader is permissible.
+    &lt;/p&gt;
+    &lt;p&gt;
+      Varying variables are declared as in the following examples:
+    &lt;/p&gt;
+    &lt;blockquote&gt;
+      &lt;nobr&gt;&lt;code&gt;varying vec3 normal;&lt;/code&gt;&lt;/nobr&gt;&lt;code&gt;&lt;br&gt;&lt;nobr&gt;centroid 
+      varying vec2 TexCoord;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;invariant centroid varying vec4 
+      Color;&lt;/nobr&gt;&lt;br&gt;&lt;/code&gt;
+    &lt;/blockquote&gt;
+    &lt;p&gt;
+      The &lt;b&gt;varying &lt;/b&gt;qualifier can be used only with &lt;b&gt;float&lt;/b&gt;, 
+      floating-point vectors, matrices, or arrays of these. Structures cannot 
+      be &lt;b&gt;varying&lt;/b&gt;. If no vertex shader executable is active, the fixed 
+      functionality pipeline of OpenGL will compute values for the built-in 
+      varying variables that will be consumed by the fragment shader 
+      executable. Similarly, if no fragment shader executable is active, the 
+      vertex shader executable is responsible for computing and writing to the 
+      varying variables that are needed for OpenGL's fixed functionality 
+      fragment pipeline. Varying variables are required to have global scope, 
+      and must be declared outside of function bodies, before their first use.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>any</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2)</arguments>
+                    <type>bool</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3)</arguments>
+                    <type>bool</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4)</arguments>
+                    <type>bool</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>notEqual</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2, bvec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3, bvec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4, bvec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ivec2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>two component integer vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler1DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing a 1D array texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing a 1D array texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                    <type></type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler2DArrayShadow</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing a 2D array depth texture with comparison
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type></type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>radians</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts degrees to radians, i.e. pi / 180 * degrees
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts degrees to radians, i.e. pi / 180 * degrees
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts degrees to radians, i.e. pi / 180 * degrees
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts degrees to radians, i.e. pi / 180 * degrees
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usamplerCube</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer cube mapped texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer cube mapped texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureMatrixInverse</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture2D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec2, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler1DArrayShadow</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing a 1D array depth texture with comparison</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing a 1D array depth texture with comparison&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                    <type></type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sign</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture2DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow1D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1DShadow, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxTextureCoords</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 2 ARB_fragment_program required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum allowed number of 
+    texture coordinate sets.&lt;br&gt;The number of texture coordinate sets defines 
+    the maximum number of texture coordinates that can be attached to a 
+    vertex. A texture coordinate set encompasses vertex texture coordinate attributes, as well as the texture matrix stack and texture generation state. This limit applies regardless of using a vertex shader or 
+    fixed-function pipeline to perform vertex processing. This constant can be 
+    also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_TEXTURE_COORDS_ARB&lt;/i&gt;. 
+    Minimum value is 2.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxVertexTextureImageUnits</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 0 ARB_vertex_shader required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum available texture image 
+    units in a vertex shader.&lt;br&gt; The texture image unit constant specifyes the 
+    number of hardware units that can be used simultaneously for accessing 
+    texture maps. This constant can be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; 
+    with the symbolic constant &lt;i&gt;GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB&lt;/i&gt;. 
+    The minimum value is 0.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>vec3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>three component floating-point vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>vec2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>two component floating-point vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>case</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture1DLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, float, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>asin</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc sine. Returns an angle whose sine is x. The range of values returned 
+                        by this function is [- Pi / 2 , Pi / 2 ] Results are undefined if |x| &amp;gt; 1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc sine. Returns an angle whose sine is x. The range of values returned 
+                        by this function is [- Pi / 2 , Pi / 2 ] Results are undefined if |x| &amp;gt; 1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc sine. Returns an angle whose sine is x. The range of values returned 
+                        by this function is [- Pi / 2 , Pi / 2 ] Results are undefined if |x| &amp;gt; 1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc sine. Returns an angle whose sine is x. The range of values returned 
+                        by this function is [- Pi / 2 , Pi / 2 ] Results are undefined if |x| &amp;gt; 1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture3D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler3D, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_LightModel</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_LightModelParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>bvec2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>two component boolean vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>bvec3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>three component boolean vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>bvec4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>four component boolean vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>normalize</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxCombinedTextureImageUnits</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 2</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum available combined 
+    texture image units in all shader processing parts of OpenGL.&lt;br&gt;The 
+    texture image unit constant specifys the number of hardware units that can 
+    be used simultaneously for accessing texture maps. This constant can be 
+    also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB&lt;/i&gt;. 
+    The minimum value is 2.
+
+    &lt;p&gt;
+      &lt;b&gt;Note:&lt;/b&gt; If a vertex shader and a fragment shader both use the same 
+      texture image unit, that counts as two units against this limit.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>struct</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Once a structure is defined, and its type is given a name, a constructor 
+    is available with the same name to construct instances of that structure. 
+    For example:
+
+    &lt;pre&gt;&lt;code&gt;struct light {
+    float intensity;
+    vec3 position;
+};
+&lt;nobr&gt;light lightVar = light(3.0, vec3(1.0, 2.0, 3.0));&lt;/nobr&gt;&lt;/code&gt;
+    &lt;/pre&gt;
+    &lt;p&gt;
+      The arguments to the constructor will be used to set the structure's 
+      fields, in order, using one argument per field. Each argument must be 
+      the same type as the field it sets.
+    &lt;/p&gt;
+    &lt;p&gt;
+      Structure constructors can be used as initializers or in expressions.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>all</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2)</arguments>
+                    <type>bool</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3)</arguments>
+                    <type>bool</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4)</arguments>
+                    <type>bool</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow2DLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2DShadow, vec3, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>precision</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The precision statement
+&lt;pre&gt;
+precision precision-qualifier type; 
+&lt;/pre&gt;
+can be used to establish a default precision qualifier. The type field can be either int or &lt;b&gt;float&lt;/b&gt;, and the
+precision-qualifier can be &lt;b&gt;lowp, mediump, or highp&lt;/b&gt;. Any other types or qualifiers will result in an error.
+If type is float, the directive applies to non-precision-qualified floating point type (scalar, vector, and
+matrix) declarations. If type is &lt;b&gt;int&lt;/b&gt;, the directive applies to all non-precision-qualified integer type (scalar,
+vector, signed, and unsigned) declarations. This includes global variable declarations, function return declarations,
+function parameter declarations, and local variable declarations. Non-precision qualified declarations will use the precision qualifier
+specified in the most recent precision statement that is still in scope. The &lt;b&gt;precision&lt;/b&gt; statement has the same scoping rules as variable
+declarations. If it is declared inside a compound statement, its effect stops at the end of the innermost
+statement it was declared in. Precision statements in nested scopes override &lt;b&gt;precision&lt;/b&gt; statements in outer
+scopes. Multiple precision statements for the same basic type can appear inside the same scope, with later
+statements overriding earlier statements within that scope.
+&lt;p&gt;
+The vertex language has the following predeclared globally scoped default 
+    precision statements:
+&lt;pre&gt;
+precision highp float;
+precision highp int;
+&lt;/pre&gt;
+&lt;/p&gt;
+&lt;p&gt;
+The fragment language has the following predeclared globally scoped default 
+    precision statement:
+&lt;pre&gt;
+precision mediump int;
+&lt;/pre&gt;
+&lt;/p&gt;
+The fragment language has no default precision qualifier for floating point types. Hence for float, floating
+point vector and matrix variable declarations, either the declaration must include a precision qualifier or
+the default float precision must have been previously declared.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackMaterial</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_MaterialParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uniform</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>input to Vertex and Fragment shader from OpenGL or application (READ-ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;nobr&gt;The &lt;b&gt;uniform &lt;/b&gt;qualifier is used to declare global variables 
+    whose values are the same across the entire&lt;/nobr&gt; &lt;nobr&gt;primitive being 
+    processed. All &lt;b&gt;uniform &lt;/b&gt;variables are read-only and are initialized 
+    externally either at link&lt;/nobr&gt; &lt;nobr&gt;time or through the API. The link 
+    time initial value is either the value of the variable's initializer, if&lt;/nobr&gt; 
+    &lt;nobr&gt;present, or 0 if no initializer is present. Sampler types cannot 
+    have initializers.&lt;/nobr&gt;&lt;br&gt;Example declarations are:
+
+    &lt;pre&gt;      &lt;nobr&gt;uniform vec4 lightPosition;&lt;/nobr&gt;
+      &lt;nobr&gt;uniform vec3 color = vec3(0.7, 0.7, 0.2); // value assigned at link time &lt;/nobr&gt;&lt;/pre&gt;
+&lt;p&gt;
+    &lt;nobr&gt;The &lt;b&gt;uniform &lt;/b&gt;qualifier can be used with any of the basic data 
+    types, or when declaring a variable whose&lt;/nobr&gt; &lt;nobr&gt;type is a 
+    structure, or an array of any of these.&lt;/nobr&gt; &lt;nobr&gt;There is an 
+    implementation dependent limit on the amount of storage for uniforms that 
+    can be used for&lt;/nobr&gt; &lt;nobr&gt;each type of shader and if this is exceeded 
+    it will cause a compile-time or link-time error. Uniform&lt;/nobr&gt; &lt;nobr&gt;variables 
+    that are declared but not used do not count against this limit. The number 
+    of user-defined&lt;/nobr&gt; &lt;nobr&gt;uniform variables and the number of built-in 
+    uniform variables that are used within a shader are added&lt;/nobr&gt; &lt;nobr&gt;together 
+    to determine whether available uniform storage has been exceeded.&lt;/nobr&gt;
+
+    &lt;p&gt;
+      &lt;nobr&gt;If multiple shaders are linked together, then they will share a 
+      single global uniform name space. Hence,&lt;/nobr&gt; &lt;nobr&gt;the types and 
+      initializers of uniform variables with the same name must match across 
+      all shaders that are&lt;/nobr&gt; &lt;nobr&gt;linked into a single executable. It is 
+      legal for some shaders to provide an initializer for a particular&lt;/nobr&gt; &lt;nobr&gt;uniform 
+      variable, while another shader does not, but all provided initializers 
+      must be equal.&lt;/nobr&gt;
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>matrixCompMult</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(mat2, mat2)</arguments>
+                    <type>mat2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(mat3, mat3)</arguments>
+                    <type>mat3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(mat4, mat4)</arguments>
+                    <type>mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackLightModelProduct</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_LightModelProducts</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>equal</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2, bvec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3, bvec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4, bvec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_NormalScale</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewProjectionMatrixInverse</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_DepthRange</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_DepthRangeParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler2DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 2D array texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 2D array texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>out</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>copied out on return, but not initialized</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noperspective</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>linear interpolation</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+      linear interpolation
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>samplerCube</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a cube mapped texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+                        &lt;head&gt;&#xD;
+                        &#xD;
+                        &lt;/head&gt;&#xD;
+                        &lt;body&gt;&#xD;
+                        &lt;/body&gt;&#xD;
+                        &lt;/html&gt;&#xD;
+                    </doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler2DShadow</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 2D depth texture with comparison</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>for</key>
+            <value>
+                <item>
+                    <category>ITERATION</category>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>break</key>
+            <value>
+                <item>
+                    <category>JUMP</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>invariant</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>ensures all calculations of this variable give identical values across programs</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    To ensure that a particular output variable is invariant, it is necessary 
+    to use the &lt;b&gt;invariant &lt;/b&gt;qualifier. It can either be used to qualify a 
+    previously declared variable as being invariant
+
+    &lt;blockquote&gt;
+      &lt;code&gt;&lt;nobr&gt;invariant gl_Position; // make existing gl_Position be invariant&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;varying 
+      vec3 Color;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;invariant Color; // make existing Color be invariant&lt;/nobr&gt;&lt;br&gt;&lt;/code&gt;
+    &lt;/blockquote&gt;
+    &lt;p&gt;
+      or as part of a declaration when a variable is declared
+    &lt;/p&gt;
+    &lt;blockquote&gt;
+      &lt;code&gt;&lt;nobr&gt;invariant varying vec3 Color;&lt;/nobr&gt;&lt;/code&gt;
+    &lt;/blockquote&gt;
+    &lt;p&gt;
+      The invariant qualifier must appear before any storage qualifiers (&lt;b&gt;varying&lt;/b&gt;) 
+      when combined with a declaration. Only variables output from a vertex 
+      shader can be candidates for invariance. This includes user-defined 
+      varying variables, the built-in vertex-side varying variables, and the 
+      special vertex variables &lt;i&gt;gl_Position &lt;/i&gt;and &lt;i&gt;gl_PointSize&lt;/i&gt;. For 
+      varying variables leaving a vertex shader and coming into a fragment 
+      shader with the same name, the &lt;b&gt;invariant &lt;/b&gt;keyword has to be used 
+      in both the vertex and fragment shaders. The &lt;b&gt;invariant &lt;/b&gt;keyword 
+      can be followed by a comma separated list of previously declared 
+      identifiers. All uses of &lt;b&gt;invariant &lt;/b&gt;must be at the global scope, 
+      and before any use of the variables being declared as invariant.
+    &lt;/p&gt;
+    &lt;p&gt;
+      To guarantee invariance of a particular output variable across two 
+      programs, the following must also be true:
+    &lt;/p&gt;
+    &lt;ul&gt;
+      &lt;li&gt;
+        The output variable is declared as invariant in both programs.
+      &lt;/li&gt;
+      &lt;li&gt;
+        The same values must be input to all shader input variables consumed 
+        by expressions and flow control contributing to the value assigned to 
+        the output variable.
+      &lt;/li&gt;
+      &lt;li&gt;
+        The texture formats, texel values, and texture filtering are set the 
+        same way for any texture function calls contributing to the value of 
+        the output variable.
+      &lt;/li&gt;
+      &lt;li&gt;
+        All input values are all operated on in the same way. All operations 
+        in the consuming expressions and any intermediate expressions must be 
+        the same, with the same order of operands and same associativity, to 
+        give the same order of evaluation. Intermediate variables and 
+        functions must be declared as the same type with the same explicit or 
+        implicit precision qualifiers. Any control flow affecting the output 
+        value must be the same, and any expressions consumed to determine this 
+        control flow must also follow these invariance rules.
+      &lt;/li&gt;
+      &lt;li&gt;
+        All the data flow and control flow leading to setting the invariant 
+        output variable reside in a single compilation unit.
+      &lt;/li&gt;
+    &lt;/ul&gt;
+    &lt;p&gt;
+      Essentially, all the data flow and control flow leading to an invariant 
+      output must match. Initially, by default, all output variables are 
+      allowed to be variant. To force all output variables to be invariant, 
+      use the pragma
+    &lt;/p&gt;
+    &lt;blockquote&gt;
+      &lt;code&gt;#pragma STDGL invariant(all)&lt;/code&gt;
+    &lt;/blockquote&gt;
+    &lt;p&gt;
+      before all declarations in a shader. If this pragma is used after the 
+      declaration of any variables or functions, then the set of outputs that 
+      behave as invariant is undefined. It is an error to use this pragma in a 
+      fragment shader.
+    &lt;/p&gt;
+    &lt;p&gt;
+      Generally, invariance is ensured at the cost of flexibility in 
+      optimization, so performance can be degraded by use of invariance. 
+      Hence, use of this pragma is intended as a debug aid, to avoid 
+      individually declaring all output variables as invariant.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>abs</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Returns x if x &amp;gt;= 0, otherwise it returns -x
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Returns x if x &amp;gt;= 0, otherwise it returns -x
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Returns x if x &amp;gt;= 0, otherwise it returns -x
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Returns x if x &amp;gt;= 0, otherwise it returns -x
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>greaterThanEqual</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec2, ivec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec3, ivec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec4, ivec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_NormalMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat3</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>false</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                    <tooltip>boolean value</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewMatrixInverse</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewProjectionMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>refract</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float eta)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2, float eta)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3, float eta)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4 I, vec4 M, float eta)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>dFdx</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>dFdy</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewProjectionMatrixInverseTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>lessThanEqual</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec2, ivec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec3, ivec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec4, ivec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler1D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer 1D texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 1D texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>not</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewMatrixInverseTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>greaterThan</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec2, ivec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec3, ivec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec4, ivec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Fog</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_FogParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>tan</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric tangent function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric tangent function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric tangent function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric tangent function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>cross</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ClipPlane</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxClipPlanes</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>textureCube</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(samplerCube, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>const</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>constant function input</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxTextureUnits</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 2 since OpenGL 1.3</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum available multitexture 
+    statges.&lt;br&gt;This constant can 
+    be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_TEXTURE_UNITS&lt;/i&gt;. 
+    The minimum value is 2.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mediump</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    qualifier for medium precision
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>inout</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>value initialized on entry, and copied out on return</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>switch</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontLightModelProduct</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_LightModelProducts</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow1DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1DShadow, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler1DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer 1D array texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 1D array texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_EyePlaneT</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_EyePlaneS</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_EyePlaneR</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>distance</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, vec4)</arguments>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_EyePlaneQ</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler1DShadow</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 1D depth texture with comparison</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing a 1D depth texture with comparison
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ProjectionMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureEnvColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureUnits</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>length</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewMatrixTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontMaterial</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_MaterialParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler2DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing a 2D array texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing a 2D array texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                    <type></type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>min</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_LightSource</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxLights</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform gl_LightSourceParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>return</key>
+            <value>
+                <item>
+                    <category>JUMP</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>void</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>for functions that do not return a value</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>true</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                    <tooltip>boolean value</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, vec4, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture3DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler3D, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxDrawBuffers</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 1 ARB_draw_buffers required</tooltip>
+                    <doc>min = 1; // proposed ARB_draw_buffers</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ProjectionMatrixTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>lowp</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    qualifier for low precision
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isamplerCube</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer cube mapped texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer cube mapped texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>fwidth</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>atan</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y 
+                        are used to determine what quadrant the angle is in. The range of values 
+                        returned by this function is [-Pi, Pi]. Results are undefined if x and y 
+                        are both 0.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y 
+                        are used to determine what quadrant the angle is in. The range of values 
+                        returned by this function is [-Pi, Pi]. Results are undefined if x and y 
+                        are both 0.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y 
+                        are used to determine what quadrant the angle is in. The range of values 
+                        returned by this function is [-Pi, Pi]. Results are undefined if x and y 
+                        are both 0.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y 
+                        are used to determine what quadrant the angle is in. The range of values 
+                        returned by this function is [-Pi, Pi]. Results are undefined if x and y 
+                        are both 0.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4, vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxVaryingFloats</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 32</tooltip>
+                    <doc>min = 32; // ARB_vertex_shader</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>fract</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Point</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_PointParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture3DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler3D, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ObjectPlaneS</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ObjectPlaneT</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler2D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 2D texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 2D texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>exp2</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ObjectPlaneR</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ObjectPlaneQ</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>lessThan</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec2, ivec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec3, ivec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec4, ivec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow2DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2DShadow, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxTextureImageUnits</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 2</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum available texture image 
+    units in a fragment shader.&lt;br&gt; The texture image unit constant specifyes the 
+    number of hardware units that can be used simultaneously for accessing 
+    texture maps. This constant can be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; 
+    with the symbolic constant &lt;i&gt;GL_MAX_TEXTURE_IMAGE_UNITS_ARB&lt;/i&gt;. The 
+    minimum value is 2.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontLightProduct</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxLights</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform gl_LightProducts</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxClipPlanes</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 6 since OpenGL 1.0</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum supported clip planes.
+
+    &lt;p&gt;
+      This constant can be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with 
+      the symbolic constant &lt;i&gt;GL_MAX_CLIP_PLANES_ARB&lt;/i&gt;. The minimum value 
+      is 6.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>inversesqrt</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureMatrixInverseTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>int</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>signed integer</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxLights</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 8 since OpenGL 1.0</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum allowed dynamic light 
+    sources.&lt;br&gt; The minimum value is 8.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>flat</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>no interpolation</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+      no interpolation.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>log2</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler3D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 3D texture </tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 3D texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>exp</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ftransform</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>()</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mat4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>4×4 floating-point matrix</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>default</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler1D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 1D texture</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mat2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>2×2 floating-point matrix</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mat3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>3×3 floating-point matrix</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewProjectionMatrixTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>textureCubeLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(samplerCube, vec3, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler2D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer 2D texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 2D texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ProjectionMatrixInverse</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow1DLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1DShadow, vec3, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>while</key>
+            <value>
+                <item>
+                    <category>ITERATION</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler2D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 2D texture</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture1DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, vec2, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>if</key>
+            <value>
+                <item>
+                    <category>SELECTION</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow2DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2DShadow, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler1DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 1D array texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 1D array texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>acos</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc cosine. Returns an angle whose cosine is x. The range of values 
+                        returned by this function is [0, pi]. Results are undefined if |x|&amp;gt;1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc cosine. Returns an angle whose cosine is x. The range of values 
+                        returned by this function is [0, pi]. Results are undefined if |x|&amp;gt;1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc cosine. Returns an angle whose cosine is x. The range of values 
+                        returned by this function is [0, pi]. Results are undefined if |x|&amp;gt;1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc cosine. Returns an angle whose cosine is x. The range of values 
+                        returned by this function is [0, pi]. Results are undefined if |x|&amp;gt;1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler3D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer 3D texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 3D texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>degrees</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts radians to degrees, i.e. 180/Pi * radians
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts radians to degrees, i.e. 180/Pi * radians
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts radians to degrees, i.e. 180/Pi * radians
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts radians to degrees, i.e. 180/Pi * radians
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>in</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>value initialized on entry, not copied on return (default)</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler3D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 3D texture</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>continue</key>
+            <value>
+                <item>
+                    <category>JUMP</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>bool</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>conditional type, taking on values of true or false (also known as boolean)</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>step</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uint</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>an unsigned integer</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    an unsigned integer&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+    </mainVocabulary>
+    <fragmentShaderVocabulary>
+        <entry>
+            <key>gl_FragDepth</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>pixel depth</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Writing to &lt;i&gt;gl_FragDepth &lt;/i&gt;will establish the depth value for the 
+                        fragment being processed. If depth buffering is enabled, and no shader 
+                        writes &lt;i&gt;gl_FragDepth&lt;/i&gt;, then the fixed function value for depth will 
+                        be used as the fragment&amp;#8217;s depth value. If a shader statically assigns a 
+                        value to &lt;i&gt;gl_FragDepth&lt;/i&gt;, and there is an execution path through the 
+                        shader that does not set &lt;i&gt;gl_FragDepth&lt;/i&gt;, then the value of the 
+                        fragment&amp;#8217;s depth may be undefined for executions of the shader that take 
+                        that path. That is, if the set of linked fragment shaders statically 
+                        contain a write to &lt;i&gt;gl_FragDepth&lt;/i&gt;, then it is responsible for always 
+                        writing it.
+                        
+                        &lt;p&gt;
+                        (A shader contains a &lt;i&gt;static assignment &lt;/i&gt;to a variable &lt;i&gt;x &lt;/i&gt;if, 
+                        after pre-processing, the shader contains a statement that would write 
+                        to &lt;i&gt;x&lt;/i&gt;, whether or not run-time flow of control will cause that 
+                        statement to be executed.)
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FragCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>pixel coordinate (READ ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_FragCoord &lt;/i&gt;is available as a read-only variable from 
+                        within fragment shaders and it holds the window relative coordinates x, y, 
+                        z, and 1/w values for the fragment. If multi-sampling, this value can be 
+                        for any location within the pixel, or one of the fragment samples. The use 
+                        of &lt;b&gt;centroid &lt;/b&gt;varyings does not further restrict this value to be 
+                        inside the current primitive. This value is the result of the fixed 
+                        functionality that interpolates primitives after vertex processing to 
+                        generate fragments. The &lt;i&gt;z &lt;/i&gt;component is the depth value that would 
+                        be used for the fragment&amp;#8217;s depth if no shader contained no writes to &lt;i&gt;gl_FragDepth. 
+                        &lt;/i&gt;This is useful for invariance if a shader conditionally computes &lt;i&gt;gl_FragDepth 
+                        &lt;/i&gt;but otherwise wants the fixed functionality fragment depth.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PointCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The values in &lt;i&gt;gl_PointCoord &lt;/i&gt;are two-dimensional coordinates 
+                        indicating where within a point primitive the current fragment is located, 
+                        when point sprites are enabled. They range from 0.0 to 1.0 across the 
+                        point. If the current primitive is not a point, or if point sprites are 
+                        not enabled, then the values read from gl_PointCoord are undefined.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec2</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontFacing</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>(READ ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Fragment shaders have access to the read-only built-in variable &lt;i&gt;gl_FrontFacing, 
+    &lt;/i&gt;whose value is &lt;b&gt;true &lt;/b&gt;if the fragment belongs to a front-facing 
+    primitive.&lt;p&gt; One use of this is to emulate two-sided lighting
+    by selecting one of two colors calculated by the vertex shader or geometry
+    shader.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>bool</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Color</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The values in &lt;i&gt;gl_Color &lt;/i&gt;and &lt;i&gt;gl_SecondaryColor &lt;/i&gt;will be derived 
+                        automatically by the system from &lt;i&gt;gl_FrontColor, gl_BackColor, 
+                        gl_FrontSecondaryColor, &lt;/i&gt;and &lt;i&gt;gl_BackSecondaryColor &lt;/i&gt;based on 
+                        which face is visible. If fixed functionality is used for vertex 
+                        processing, then &lt;i&gt;gl_FogFragCoord &lt;/i&gt;will either be the z-coordinate of 
+                        the fragment in eye space, or the interpolation of the fog coordinate, as 
+                        described in section 3.10 of the OpenGL 1.4 Specification. The &lt;i&gt;gl_TexCoord[] 
+                        &lt;/i&gt;values are the interpolated &lt;i&gt;gl_TexCoord[] &lt;/i&gt;values from a vertex 
+                        shader or the texture coordinates of any fixed pipeline based vertex 
+                        functionality.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>discard</key>
+            <value>
+                <item>
+                    <category>JUMP</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The &lt;b&gt;discard &lt;/b&gt;keyword is only allowed within fragment shaders. It can 
+                        be used within a fragment shader to abandon the operation on the current 
+                        fragment. This keyword causes the fragment to be discarded and no updates 
+                        to any buffers will occur. It would typically be used within a conditional 
+                        statement, for example:
+                        
+                        &lt;pre&gt;    if (intensity &amp;lt; 0.0)
+                        discard;
+                        &lt;/pre&gt;
+                        A fragment shader may test a fragment&amp;#8217;s alpha value and discard the 
+                        fragment based on that test. However, it should be noted that coverage 
+                        testing occurs after the fragment shader runs, and the coverage test can 
+                        change the alpha value.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_SecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The values in &lt;i&gt;gl_Color &lt;/i&gt;and &lt;i&gt;gl_SecondaryColor &lt;/i&gt;will be derived 
+                        automatically by the system from &lt;i&gt;gl_FrontColor, gl_BackColor, 
+                        gl_FrontSecondaryColor, &lt;/i&gt;and &lt;i&gt;gl_BackSecondaryColor &lt;/i&gt;based on 
+                        which face is visible. If fixed functionality is used for vertex 
+                        processing, then &lt;i&gt;gl_FogFragCoord &lt;/i&gt;will either be the z-coordinate of 
+                        the fragment in eye space, or the interpolation of the fog coordinate, as 
+                        described in section 3.10 of the OpenGL 1.4 Specification. The &lt;i&gt;gl_TexCoord[] 
+                        &lt;/i&gt;values are the interpolated &lt;i&gt;gl_TexCoord[] &lt;/i&gt;values from a vertex 
+                        shader or the texture coordinates of any fixed pipeline based vertex 
+                        functionality.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FragData</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX&lt;gl_MaxDrawBuffers</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_FragData &lt;/i&gt;is an array. Writing to &lt;i&gt;gl_FragData[n] &lt;/i&gt;specifies 
+                        the fragment data that will be used by the subsequent fixed functionality 
+                        pipeline for data &lt;i&gt;n&lt;/i&gt;. If subsequent fixed functionality consumes 
+                        fragment data and an execution of a fragment shader executable does not 
+                        write a value to it, then the fragment data consumed is undefined.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>[]</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FragColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>pixel color</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        If a shader statically assigns a value to &lt;i&gt;gl_FragColor&lt;/i&gt;, it may not 
+                        assign a value to any element of &lt;i&gt;gl_FragData&lt;/i&gt;. If a shader 
+                        statically writes a value to any element of &lt;i&gt;gl_FragData&lt;/i&gt;, it may not 
+                        assign a value to &lt;i&gt;gl_FragColor&lt;/i&gt;. That is, a shader may assign values 
+                        to either &lt;i&gt;gl_FragColor &lt;/i&gt;or &lt;i&gt;gl_FragData&lt;/i&gt;, but not both. 
+                        Multiple shaders linked together must also consistently write just one of 
+                        these variables.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+    </fragmentShaderVocabulary>
+    <vertexShaderVocabulary>
+        <entry>
+            <key>gl_BackColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>enable GL_VERTEX_PROGRAM_TWO_SIDE</tooltip>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FogFragCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        For &lt;i&gt;gl_FogFragCoord&lt;/i&gt;, the value written will be used as the &amp;quot;c&amp;quot; 
+                        value on page 160 of the OpenGL 1.4 Specification by the fixed 
+                        functionality pipeline. For example, if the z-coordinate of the fragment 
+                        in eye space is desired as &amp;quot;c&amp;quot;, then that's what the vertex or geometry shader
+                        executable should write into &lt;i&gt;gl_FogFragCoord&lt;/i&gt;.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>varying float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Position</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>must be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The variable &lt;i&gt;gl_Position&lt;/i&gt; is available only in the vertex and 
+    geometry language and is intended for writing the homogeneous vertex 
+    position.
+
+    &lt;p&gt;
+      It can be written at any time during shader execution. It may also be 
+      read back by the shader after being written. This value will be used by 
+      primitive assembly, clipping, culling, and other fixed functionality 
+      operations that operate on primitives after vertex or geometry 
+      processing has occurred. Compilers may generate a diagnostic message if 
+      they detect &lt;i&gt;gl_Position&lt;/i&gt; is read before being written, but not all 
+      such cases are detectable. Writing to &lt;i&gt;gl_Position&lt;/i&gt; is optional. If &lt;i&gt;gl_Position&lt;/i&gt; 
+      is not written but subsequent stages of the OpenGL pipeline consume &lt;i&gt;gl_Position&lt;/i&gt;, 
+      then results are undefined.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TexCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX&lt;gl_MaxTextureCoords</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        As with all arrays, indices used to subscript &lt;i&gt;gl_TexCoord &lt;/i&gt;must 
+                        either be an integral constant expressions, or this array must be 
+                        re-declared by the shader with a size. The size can be at most &lt;i&gt;gl_MaxTextureCoords&lt;/i&gt;. 
+                        Using indexes close to 0 may aid the implementation in preserving varying 
+                        resources.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>[]</arguments>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontSecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>attribute</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>linkage between a vertex shader and OpenGL for per-vertex data (READ-ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The &lt;b&gt;attribute &lt;/b&gt;qualifier is used to declare variables that are 
+    passed to a vertex shader from OpenGL on a per-vertex basis. It is an 
+    error to declare an attribute variable in any type of shader other than a 
+    vertex shader. Attribute variables are read-only as far as the vertex 
+    shader is concerned. Values for attribute variables are passed to a vertex 
+    shader through the OpenGL vertex API or as part of a vertex array. They 
+    convey vertex attributes to the vertex shader and are expected to change 
+    on every vertex shader run. The attribute qualifier can be used only with &lt;b&gt;float, 
+    &lt;/b&gt;floating-point vectors, and matrices. Attribute variables cannot be 
+    declared as arrays or structures.&lt;p&gt;Example declarations:
+
+    &lt;pre&gt;attribute vec4 position;
+attribute vec3 normal;
+attribute vec2 texCoord;&lt;/pre&gt;
+    &lt;p&gt;
+      All the standard OpenGL vertex attributes have built-in variable names 
+      to allow easy integration between user programs and OpenGL vertex 
+      functions. See Section 7 &amp;quot;Built-in Variables&amp;quot; of the OpenGL Shading 
+      Language specification; for a list of the built-in attribute names.
+    &lt;/p&gt;
+    &lt;p&gt;
+      It is expected that graphics hardware will have a small number of fixed 
+      locations for passing vertex attributes. Therefore, the OpenGL Shading 
+      language defines each non-matrix attribute variable as having space for 
+      up to four floating-point values (i.e., a vec4). There is an 
+      implementation dependent limit on the number of attribute variables that 
+      can be used and if this is exceeded it will cause a link error. 
+      (Declared attribute variables that are not used do not count against 
+      this limit.) A float attribute counts the same amount against this limit 
+      as a vec4, so applications may want to consider packing groups of four 
+      unrelated float attributes together into a vec4 to better utilize the 
+      capabilities of the underlying hardware. A matrix attribute will use up 
+      multiple attribute locations. The number of locations used will equal 
+      the number of columns in the matrix.
+    &lt;/p&gt;
+    &lt;p&gt;
+      Attribute variables are required to have global scope, and must be 
+      declared outside of function bodies, before their first use.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackSecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>enable GL_VERTEX_PROGRAM_TWO_SIDE</tooltip>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FogCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord7</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord6</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord5</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PointSize</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>may be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_PointSize &lt;/i&gt;is available only in the vertex and geometry language 
+                        and is intended to write the size of the point to be 
+                        rasterized. It is measured in pixels.
+                        
+                        &lt;p&gt;
+                        If &lt;i&gt;gl_PointSize &lt;/i&gt;or &lt;i&gt;gl_ClipVertex &lt;/i&gt;are not written to, their 
+                        values are undefined. Any of these variables can be read back by the 
+                        shader after writing to them, to retrieve what was written. Reading them 
+                        before writing them results in undefined behavior. If they are written 
+                        more than once, it is the last value written that is consumed by the 
+                        subsequent operations. These built-in variables have global scope.
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Color</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord0</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Normal</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec3</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Vertex</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_SecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord4</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord3</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ClipVertex</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>may be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_ClipVertex &lt;/i&gt;is available only in the vertex and geometry language 
+                        and provides a place for vertex and geometry shaders to write the coordinate to be used 
+                        with the user clipping planes. The user must ensure the clip vertex and 
+                        user clipping planes are defined in the same coordinate space. User clip 
+                        planes work properly only under linear transform. It is undefined what 
+                        happens under non-linear transform.
+                        
+                        &lt;p&gt;
+                        If &lt;i&gt;gl_PointSize &lt;/i&gt;or &lt;i&gt;gl_ClipVertex &lt;/i&gt;are not written to, their 
+                        values are undefined. Any of these variables can be read back by the 
+                        shader after writing to them, to retrieve what was written. Reading them 
+                        before writing them results in undefined behavior. If they are written 
+                        more than once, it is the last value written that is consumed by the 
+                        subsequent operations. These built-in variables have global scope.
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord2</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord1</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+    </vertexShaderVocabulary>
+    <geometryShaderVocabulary>
+        <entry>
+            <key>gl_FogFragCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        For &lt;i&gt;gl_FogFragCoord&lt;/i&gt;, the value written will be used as the &amp;quot;c&amp;quot; 
+                        value on page 160 of the OpenGL 1.4 Specification by the fixed 
+                        functionality pipeline. For example, if the z-coordinate of the fragment 
+                        in eye space is desired as &amp;quot;c&amp;quot;, then that's what the vertex or geometry shader
+                        executable should write into &lt;i&gt;gl_FogFragCoord&lt;/i&gt;.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>varying out float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>enable GL_VERTEX_PROGRAM_TWO_SIDE</tooltip>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Layer</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The built-in output variable &lt;i&gt;gl_Layer&lt;/i&gt; is available only in the 
+    geometry language, and provides the number of the layer of textures 
+    attached to a FBO to direct rendering to.&lt;p&gt; If a shader statically assigns a 
+    value to &lt;i&gt;gl_Layer&lt;/i&gt;, layered rendering mode is enabled. See section 
+    2.16.4 for a detailed explanation. If a shader statically assigns a value 
+    to &lt;i&gt;gl_Layer&lt;/i&gt;, and there is an execution path through the shader that 
+    does not set &lt;i&gt;gl_Layer&lt;/i&gt;, then the value of &lt;i&gt;gl_Layer&lt;/i&gt; may be 
+    undefined for executions of the shader that take that path.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Position</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>must be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The variable &lt;i&gt;gl_Position&lt;/i&gt; is available only in the vertex and 
+    geometry language and is intended for writing the homogeneous vertex 
+    position.
+
+    &lt;p&gt;
+      It can be written at any time during shader execution. It may also be 
+      read back by the shader after being written. This value will be used by 
+      primitive assembly, clipping, culling, and other fixed functionality 
+      operations that operate on primitives after vertex or geometry 
+      processing has occurred. Compilers may generate a diagnostic message if 
+      they detect &lt;i&gt;gl_Position&lt;/i&gt; is read before being written, but not all 
+      such cases are detectable. Writing to &lt;i&gt;gl_Position&lt;/i&gt; is optional. If &lt;i&gt;gl_Position&lt;/i&gt; 
+      is not written but subsequent stages of the OpenGL pipeline consume &lt;i&gt;gl_Position&lt;/i&gt;, 
+      then results are undefined.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TexCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX&lt;gl_MaxTextureCoords</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        As with all arrays, indices used to subscript &lt;i&gt;gl_TexCoord &lt;/i&gt;must 
+                        either be an integral constant expressions, or this array must be 
+                        re-declared by the shader with a size. The size can be at most &lt;i&gt;gl_MaxTextureCoords&lt;/i&gt;. 
+                        Using indexes close to 0 may aid the implementation in preserving varying 
+                        resources.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>[]</arguments>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FogFragCoordIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>EmitVertex</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The function &lt;b&gt;EmitVertex()&lt;/b&gt; specifies that a vertex is completed. A 
+    vertex is added to the current output primitive using the current values 
+    of the varying output variables and the current values of the special 
+    built-in output variables &lt;b&gt;gl_PointSize&lt;/b&gt;, &lt;b&gt;gl_ClipVertex&lt;/b&gt;, &lt;b&gt;gl_Layer&lt;/b&gt;, 
+    gl_Position&lt;/b&gt; and &lt;b&gt;gl_PrimitiveID&lt;/b&gt;.
+
+    &lt;p&gt;
+      The values of any unwritten output variables are undefined. The values 
+      of all varying output variables and the special built-in output 
+      variables are undefined after a call to &lt;b&gt;EmitVertex()&lt;/b&gt;. If a 
+      geometry shader, in one invocation, emits more vertices than the value &lt;i&gt;GEOMETRY_VERTICES_OUT_EXT&lt;/i&gt;, 
+      these emits may have no effect.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <arguments>()</arguments>
+                    <type>void</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackColorIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PointSizeIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontSecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackSecondaryColorIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ClipVertexIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackSecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>enable GL_VERTEX_PROGRAM_TWO_SIDE</tooltip>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TexCoordIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &lt;= gl_MaxTextureCoords</tooltip>
+                    <doc>
+value &lt;= gl_MaxTextureCoords</doc>
+                    <arguments>[gl_VerticesIn][]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontColorIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontSecondaryColorIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_VerticesIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+      Value set at link time.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PointSize</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>may be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_PointSize &lt;/i&gt;is available only in the vertex and geometry language 
+                        and is intended to write the size of the point to be 
+                        rasterized. It is measured in pixels.
+                        
+                        &lt;p&gt;
+                        If &lt;i&gt;gl_PointSize &lt;/i&gt;or &lt;i&gt;gl_ClipVertex &lt;/i&gt;are not written to, their 
+                        values are undefined. Any of these variables can be read back by the 
+                        shader after writing to them, to retrieve what was written. Reading them 
+                        before writing them results in undefined behavior. If they are written 
+                        more than once, it is the last value written that is consumed by the 
+                        subsequent operations. These built-in variables have global scope.
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>EndPrimitive</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The function &lt;b&gt;EndPrimitive()&lt;/b&gt; specifies that the current output 
+    primitive is completed and a new output primitive (of the same type) 
+    should be started. This function does not emit a vertex.&lt;br&gt; The effect of &lt;b&gt;EndPrimitive()&lt;/b&gt; 
+    is roughly equivalent to calling End followed by a new Begin, where the 
+    primitive mode is taken from the program object parameter &lt;i&gt;GEOMETRY_OUTPUT_TYPE_EXT&lt;/i&gt;. 
+    If the output primitive type is &lt;i&gt;POINTS&lt;/i&gt;, calling &lt;b&gt;EndPrimitive()&lt;/b&gt; 
+    is optional.
+
+    &lt;p&gt;
+      A geometry shader starts with an output primitive containing no 
+      vertices. When a geometry shader terminates, the current output 
+      primitive is automatically completed. It is not necessary to call &lt;b&gt;EndPrimitive()&lt;/b&gt; 
+      if the geometry shader writes only a single primitive.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <arguments>()</arguments>
+                    <type>void</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PositionIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PrimitiveID</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+
+  &lt;/head&gt;
+  &lt;body&gt;
+        The built-in output variable &lt;i&gt;gl_PrimitiveID&lt;/i&gt; is available only in the
+    geometry language and provides a single integer that serves as a primitive
+    identifier.&lt;p&gt;  This written primitive ID is available to fragment shaders.
+    If a fragment shader using primitive IDs is active and a geometry shader
+    is also active, the geometry shader must write to &lt;i&gt;gl_PrimitiveID&lt;/i&gt; or the
+    primitive ID in the fragment shader number is undefined.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ClipVertex</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>may be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_ClipVertex &lt;/i&gt;is available only in the vertex and geometry language 
+                        and provides a place for vertex and geometry shaders to write the coordinate to be used 
+                        with the user clipping planes. The user must ensure the clip vertex and 
+                        user clipping planes are defined in the same coordinate space. User clip 
+                        planes work properly only under linear transform. It is undefined what 
+                        happens under non-linear transform.
+                        
+                        &lt;p&gt;
+                        If &lt;i&gt;gl_PointSize &lt;/i&gt;or &lt;i&gt;gl_ClipVertex &lt;/i&gt;are not written to, their 
+                        values are undefined. Any of these variables can be read back by the 
+                        shader after writing to them, to retrieve what was written. Reading them 
+                        before writing them results in undefined behavior. If they are written 
+                        more than once, it is the last value written that is consumed by the 
+                        subsequent operations. These built-in variables have global scope.
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+    </geometryShaderVocabulary>
+</glslVocabulary>

+ 4724 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/JmeVocabulary.xml

@@ -0,0 +1,4724 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<glslVocabulary>
+    <mainVocabulary>
+        <entry>
+            <key>pow</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>float</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>single floating-point scalar</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>dot</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, vec4)</arguments>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxFragmentUniformComponents</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;=  64 ARB_fragment_shader required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum allowed uniform 
+    components inside the fragment shader.&lt;br&gt; This limit refers to the storage 
+    for the combination of build-in uniform variables and user-defined uniform 
+    variables that are actually used in a fragment shader. This constant can 
+    be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB&lt;/i&gt;. 
+    The minimum value is 64 if &lt;i&gt;ARB_fragment_shader&lt;/i&gt; is supported.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>else</key>
+            <value>
+                <item>
+                    <category>SELECTION</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackLightProduct</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxLights</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform gl_LightProducts</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxVertexAttribs</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 16 ARB_vertex_shader required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum useable vertex attributes 
+    in a vertex shader.&lt;br&gt; This limit consists of the standard (build-in) attributes (these are color, secondary color, normal, vertex position, texture coordinates, and fog coordinates) and the generic attributes left for custom purposes. This constant can be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; 
+    with the symbolic constant &lt;i&gt;GL_MAX_VERTEX_ATTRIBS_ARB&lt;/i&gt;. Every OpenGL 
+    implementation is required to support at least 16 vertex attributes in a 
+    vertex shader.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>log</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture2DLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec2, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uvec2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a two-component unsigned integer vector</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a two-component unsigned integer vector&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>floor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uvec3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a three-component unsigned integer vector</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a three-component unsigned integer vector&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uvec4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a four-component unsigned integer vector</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a four-component unsigned integer vector&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>faceforward</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4 V, vec4 I, vec4 N)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureMatrixTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>smooth</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>perspective correct interpolation</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+      perspective correct interpolation
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler2DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip> a handle for accessing an unsigned integer 2D array texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 2D array texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ceil</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>smoothstep</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture2DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec3, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler1D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 1D texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 1D texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>do</key>
+            <value>
+                <item>
+                    <category>ITERATION</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture1DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, vec2, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>max</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sqrt</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow1DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1DShadow, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>highp</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    qualifier for high precision
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxVertexUniformComponents</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 512 ARB_vertex_shader required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum allowed uniform 
+    components inside the vertex shader.&lt;br&gt; This limit refers to the storage for 
+    the combination of build-in uniform variables and user-defined uniform 
+    variables that are actually used in a vertex shader. This constant can be 
+    also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB&lt;/i&gt;. 
+    The minimum value is 512 if &lt;i&gt;ARB_vertex_shader&lt;/i&gt; is supported.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noise4</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>clamp</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, float, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, float, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, float, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sin</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric sine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric sine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric sine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric sine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noise2</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec2</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noise3</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec3</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noise1</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ProjectionMatrixInverseTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>reflect</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4 I, vec4 N)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>vec4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>four component floating-point vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>cos</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric cosine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric cosine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric cosine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric cosine function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>centroid</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>centroid interpolation on multi-sample varyings</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Examples:
+
+    &lt;blockquote&gt;
+      &lt;code&gt;&lt;nobr&gt;centroid varying vec4 color;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;centroid varying float value;&lt;/nobr&gt;&lt;/code&gt;
+    &lt;/blockquote&gt;
+    By definition, varying variables are set per vertex and are interpolated 
+    in a perspective-correct manner over the primitive being rendered.
+
+    &lt;ul&gt;
+      &lt;li&gt;
+        If single-sampling, the value is interpolated to the pixel's center, 
+        and the &lt;b&gt;centroid &lt;/b&gt;qualifier, if present, is ignored.
+      &lt;/li&gt;
+      &lt;li&gt;
+        If multi-sampling, and &lt;b&gt;varying&lt;/b&gt; is not qualified with &lt;b&gt;centroid&lt;/b&gt;, 
+        then the value must be interpolated to the pixel's center, or anywhere 
+        within the pixel, or to one of the pixel's samples.
+      &lt;/li&gt;
+      &lt;li&gt;
+        If multi-sampling and &lt;b&gt;varying &lt;/b&gt;is qualified with &lt;b&gt;centroid&lt;/b&gt;, 
+        then the value must be interpolated to a point that lies in both the 
+        pixel and in the primitive being rendered, or to one of the pixel's 
+        samples that falls within the primitive. Due to the less regular 
+        location of centroids, their derivatives may be less accurate than 
+        non-centroid varying variables.
+      &lt;/li&gt;
+    &lt;/ul&gt;
+    &lt;p&gt;
+      When using the &lt;b&gt;centroid &lt;/b&gt;keyword, it must immediately precede the &lt;b&gt;varying 
+      &lt;/b&gt;keyword. A fragment shader may read from varying variables and the 
+      value read will be the interpolated value, as a function of the 
+      fragment's position within the primitive. A fragment shader can not 
+      write to a varying variable.
+    &lt;/p&gt;
+    &lt;p&gt;
+      The type and presence of the &lt;b&gt;centroid &lt;/b&gt;and &lt;b&gt;invariant &lt;/b&gt;qualifiers 
+      of varying variables with the same name declared in linked vertex and 
+      fragments shaders must match, otherwise the link command will fail. Only 
+      those varying variables used (i.e. read) in the fragment shader 
+      executable must be written to by the vertex shader executable; declaring 
+      superfluous varying variables in a vertex shader is permissible.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture1D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, float, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ivec4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>four component integer vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ivec3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>three component integer vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow2D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2DShadow, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>varying</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>output from Vertex shader (READ/WRITE), interpolated, then input to Fragment shader (READ-ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+       &lt;b&gt;Deprecated since 1.3, use &lt;i&gt;smooth&lt;/i&gt; instead&lt;/b&gt;
+    &lt;/p&gt;
+    &lt;p&gt;
+    &lt;/p&gt;
+    Varying variables provide the interface between the vertex shader and 
+    geometry shader and also between the geometry shader and fragment shader 
+    and the fixed functionality between them. If no geometry shader is 
+    present, &lt;b&gt;varying&lt;/b&gt; variables also provide the interface between the 
+    vertex shader and fragment shader.
+
+    &lt;p&gt;
+      The vertex, or geometry shader will compute values per vertex (such as 
+      color, texture coordinates, etc) and write them to output variables 
+      declared with the &amp;quot;varying&amp;quot; qualifier (vertex) or &amp;quot;varying out&amp;quot; 
+      qualifiers (geometry). A vertex or geometry shader may also read these 
+      output varying variables, getting back the same values it has written. 
+      Reading an output varying variable in a vertex or geometry shader 
+      returns undefined results if it is read before being written.
+    &lt;/p&gt;
+    &lt;p&gt;
+      A geometry shader may also read from an input &lt;b&gt;varying&lt;/b&gt; variable 
+      declared with the &amp;quot;varying in&amp;quot; qualifiers. The value read will be the 
+      same value as written by the vertex shader for that &lt;b&gt;varying&lt;/b&gt; 
+      variable. Since a geometry shader operates on primitives, each input 
+      varying variable needs to be declared as an array. Each element of such 
+      an array corresponds to a vertex of the primitive being processed. If 
+      the varying variable is declared as a scalar or matrix in the vertex 
+      shader, it will be a one-dimensional array in the geometry shader. Each 
+      array can optionally have a size declared. If a size is not specified, 
+      it inferred by the linker and depends on the value of the input 
+      primitive type. See table 4.3.xxx (GLSL specification) to determine the 
+      exact size. The read-only built-in constant &lt;b&gt;gl_VerticesIn&lt;/b&gt; will be 
+      set to this value by the linker. If a size is specified, it has to be 
+      the size as given by table 4.3.xxx, otherwise a link error will occur. 
+      The built-in constant &lt;b&gt;gl_VerticesIn&lt;/b&gt;, if so desired, can be used 
+      to size the array correctly for each input primitive type. Varying 
+      variables can also be declared as arrays in the vertex shader. This 
+      means that those, on input to the geometry shader, must be declared as 
+      two- dimensional arrays. The first index to the two-dimensional array 
+      holds the vertex number. Declaring a size for the first range of the 
+      array is optional, just as it is for one-dimensional arrays. The second 
+      index holds the per-vertex array data. Declaring a size for the second 
+      range of the array is not optional, and has to match the declaration in 
+      the vertex shader.
+    &lt;/p&gt;
+    &lt;p&gt;
+      By definition, varying variables are set per vertex and are interpolated 
+      in a perspective-correct manner over the primitive being rendered. If 
+      single-sampling, the value is interpolated to the pixel's center, and 
+      the &lt;b&gt;centroid &lt;/b&gt;qualifier, if present, is ignored. If 
+      multi-sampling, and &lt;b&gt;varying&lt;/b&gt; is not qualified with &lt;b&gt;centroid&lt;/b&gt;, 
+      then the value must be interpolated to the pixel's center, or anywhere 
+      within the pixel, or to one of the pixel's samples. If multi-sampling 
+      and &lt;b&gt;varying &lt;/b&gt;is qualified with &lt;b&gt;centroid&lt;/b&gt;, then the value 
+      must be interpolated to a point that lies in both the pixel and in the 
+      primitive being rendered, or to one of the pixel's samples that falls 
+      within the primitive. Due to the less regular location of centroids, 
+      their derivatives may be less accurate than non-centroid varying 
+      variables.
+    &lt;/p&gt;
+    &lt;p&gt;
+      When using the &lt;b&gt;centroid &lt;/b&gt;keyword, it must immediately precede the &lt;b&gt;varying 
+      &lt;/b&gt;keyword. A fragment shader may read from varying variables and the 
+      value read will be the interpolated value, as a function of the 
+      fragment's position within the primitive. A fragment shader can not 
+      write to a varying variable.
+    &lt;/p&gt;
+    &lt;p&gt;
+      The type and presence of the &lt;b&gt;centroid &lt;/b&gt;and &lt;b&gt;invariant &lt;/b&gt;qualifiers 
+      of varying variables with the same name declared in linked vertex and 
+      fragments shaders must match, otherwise the link command will fail. Only 
+      those varying variables used (i.e. read) in the fragment shader 
+      executable must be written to by the vertex shader executable; declaring 
+      superfluous varying variables in a vertex shader is permissible.
+    &lt;/p&gt;
+    &lt;p&gt;
+      Varying variables are declared as in the following examples:
+    &lt;/p&gt;
+    &lt;blockquote&gt;
+      &lt;nobr&gt;&lt;code&gt;varying vec3 normal;&lt;/code&gt;&lt;/nobr&gt;&lt;code&gt;&lt;br&gt;&lt;nobr&gt;centroid 
+      varying vec2 TexCoord;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;invariant centroid varying vec4 
+      Color;&lt;/nobr&gt;&lt;br&gt;&lt;/code&gt;
+    &lt;/blockquote&gt;
+    &lt;p&gt;
+      The &lt;b&gt;varying &lt;/b&gt;qualifier can be used only with &lt;b&gt;float&lt;/b&gt;, 
+      floating-point vectors, matrices, or arrays of these. Structures cannot 
+      be &lt;b&gt;varying&lt;/b&gt;. If no vertex shader executable is active, the fixed 
+      functionality pipeline of OpenGL will compute values for the built-in 
+      varying variables that will be consumed by the fragment shader 
+      executable. Similarly, if no fragment shader executable is active, the 
+      vertex shader executable is responsible for computing and writing to the 
+      varying variables that are needed for OpenGL's fixed functionality 
+      fragment pipeline. Varying variables are required to have global scope, 
+      and must be declared outside of function bodies, before their first use.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>any</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2)</arguments>
+                    <type>bool</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3)</arguments>
+                    <type>bool</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4)</arguments>
+                    <type>bool</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>notEqual</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2, bvec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3, bvec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4, bvec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ivec2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>two component integer vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler1DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing a 1D array texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing a 1D array texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                    <type></type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler2DArrayShadow</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing a 2D array depth texture with comparison
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type></type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>radians</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts degrees to radians, i.e. pi / 180 * degrees
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts degrees to radians, i.e. pi / 180 * degrees
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts degrees to radians, i.e. pi / 180 * degrees
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts degrees to radians, i.e. pi / 180 * degrees
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usamplerCube</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer cube mapped texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer cube mapped texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureMatrixInverse</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture2D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec2, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler1DArrayShadow</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing a 1D array depth texture with comparison</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing a 1D array depth texture with comparison&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                    <type></type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sign</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture2DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2D, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow1D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1DShadow, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxTextureCoords</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 2 ARB_fragment_program required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum allowed number of 
+    texture coordinate sets.&lt;br&gt;The number of texture coordinate sets defines 
+    the maximum number of texture coordinates that can be attached to a 
+    vertex. A texture coordinate set encompasses vertex texture coordinate attributes, as well as the texture matrix stack and texture generation state. This limit applies regardless of using a vertex shader or 
+    fixed-function pipeline to perform vertex processing. This constant can be 
+    also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_TEXTURE_COORDS_ARB&lt;/i&gt;. 
+    Minimum value is 2.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxVertexTextureImageUnits</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 0 ARB_vertex_shader required</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum available texture image 
+    units in a vertex shader.&lt;br&gt; The texture image unit constant specifyes the 
+    number of hardware units that can be used simultaneously for accessing 
+    texture maps. This constant can be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; 
+    with the symbolic constant &lt;i&gt;GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB&lt;/i&gt;. 
+    The minimum value is 0.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>vec3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>three component floating-point vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>vec2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>two component floating-point vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>case</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture1DLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, float, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>asin</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc sine. Returns an angle whose sine is x. The range of values returned 
+                        by this function is [- Pi / 2 , Pi / 2 ] Results are undefined if |x| &amp;gt; 1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc sine. Returns an angle whose sine is x. The range of values returned 
+                        by this function is [- Pi / 2 , Pi / 2 ] Results are undefined if |x| &amp;gt; 1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc sine. Returns an angle whose sine is x. The range of values returned 
+                        by this function is [- Pi / 2 , Pi / 2 ] Results are undefined if |x| &amp;gt; 1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc sine. Returns an angle whose sine is x. The range of values returned 
+                        by this function is [- Pi / 2 , Pi / 2 ] Results are undefined if |x| &amp;gt; 1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture3D</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler3D, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_LightModel</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_LightModelParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>bvec2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>two component boolean vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>bvec3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>three component boolean vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>bvec4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>four component boolean vector</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>normalize</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxCombinedTextureImageUnits</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 2</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum available combined 
+    texture image units in all shader processing parts of OpenGL.&lt;br&gt;The 
+    texture image unit constant specifys the number of hardware units that can 
+    be used simultaneously for accessing texture maps. This constant can be 
+    also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB&lt;/i&gt;. 
+    The minimum value is 2.
+
+    &lt;p&gt;
+      &lt;b&gt;Note:&lt;/b&gt; If a vertex shader and a fragment shader both use the same 
+      texture image unit, that counts as two units against this limit.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>struct</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Once a structure is defined, and its type is given a name, a constructor 
+    is available with the same name to construct instances of that structure. 
+    For example:
+
+    &lt;pre&gt;&lt;code&gt;struct light {
+    float intensity;
+    vec3 position;
+};
+&lt;nobr&gt;light lightVar = light(3.0, vec3(1.0, 2.0, 3.0));&lt;/nobr&gt;&lt;/code&gt;
+    &lt;/pre&gt;
+    &lt;p&gt;
+      The arguments to the constructor will be used to set the structure's 
+      fields, in order, using one argument per field. Each argument must be 
+      the same type as the field it sets.
+    &lt;/p&gt;
+    &lt;p&gt;
+      Structure constructors can be used as initializers or in expressions.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>all</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2)</arguments>
+                    <type>bool</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3)</arguments>
+                    <type>bool</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4)</arguments>
+                    <type>bool</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow2DLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2DShadow, vec3, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>precision</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The precision statement
+&lt;pre&gt;
+precision precision-qualifier type; 
+&lt;/pre&gt;
+can be used to establish a default precision qualifier. The type field can be either int or &lt;b&gt;float&lt;/b&gt;, and the
+precision-qualifier can be &lt;b&gt;lowp, mediump, or highp&lt;/b&gt;. Any other types or qualifiers will result in an error.
+If type is float, the directive applies to non-precision-qualified floating point type (scalar, vector, and
+matrix) declarations. If type is &lt;b&gt;int&lt;/b&gt;, the directive applies to all non-precision-qualified integer type (scalar,
+vector, signed, and unsigned) declarations. This includes global variable declarations, function return declarations,
+function parameter declarations, and local variable declarations. Non-precision qualified declarations will use the precision qualifier
+specified in the most recent precision statement that is still in scope. The &lt;b&gt;precision&lt;/b&gt; statement has the same scoping rules as variable
+declarations. If it is declared inside a compound statement, its effect stops at the end of the innermost
+statement it was declared in. Precision statements in nested scopes override &lt;b&gt;precision&lt;/b&gt; statements in outer
+scopes. Multiple precision statements for the same basic type can appear inside the same scope, with later
+statements overriding earlier statements within that scope.
+&lt;p&gt;
+The vertex language has the following predeclared globally scoped default 
+    precision statements:
+&lt;pre&gt;
+precision highp float;
+precision highp int;
+&lt;/pre&gt;
+&lt;/p&gt;
+&lt;p&gt;
+The fragment language has the following predeclared globally scoped default 
+    precision statement:
+&lt;pre&gt;
+precision mediump int;
+&lt;/pre&gt;
+&lt;/p&gt;
+The fragment language has no default precision qualifier for floating point types. Hence for float, floating
+point vector and matrix variable declarations, either the declaration must include a precision qualifier or
+the default float precision must have been previously declared.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackMaterial</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_MaterialParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uniform</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>input to Vertex and Fragment shader from OpenGL or application (READ-ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;nobr&gt;The &lt;b&gt;uniform &lt;/b&gt;qualifier is used to declare global variables 
+    whose values are the same across the entire&lt;/nobr&gt; &lt;nobr&gt;primitive being 
+    processed. All &lt;b&gt;uniform &lt;/b&gt;variables are read-only and are initialized 
+    externally either at link&lt;/nobr&gt; &lt;nobr&gt;time or through the API. The link 
+    time initial value is either the value of the variable's initializer, if&lt;/nobr&gt; 
+    &lt;nobr&gt;present, or 0 if no initializer is present. Sampler types cannot 
+    have initializers.&lt;/nobr&gt;&lt;br&gt;Example declarations are:
+
+    &lt;pre&gt;      &lt;nobr&gt;uniform vec4 lightPosition;&lt;/nobr&gt;
+      &lt;nobr&gt;uniform vec3 color = vec3(0.7, 0.7, 0.2); // value assigned at link time &lt;/nobr&gt;&lt;/pre&gt;
+&lt;p&gt;
+    &lt;nobr&gt;The &lt;b&gt;uniform &lt;/b&gt;qualifier can be used with any of the basic data 
+    types, or when declaring a variable whose&lt;/nobr&gt; &lt;nobr&gt;type is a 
+    structure, or an array of any of these.&lt;/nobr&gt; &lt;nobr&gt;There is an 
+    implementation dependent limit on the amount of storage for uniforms that 
+    can be used for&lt;/nobr&gt; &lt;nobr&gt;each type of shader and if this is exceeded 
+    it will cause a compile-time or link-time error. Uniform&lt;/nobr&gt; &lt;nobr&gt;variables 
+    that are declared but not used do not count against this limit. The number 
+    of user-defined&lt;/nobr&gt; &lt;nobr&gt;uniform variables and the number of built-in 
+    uniform variables that are used within a shader are added&lt;/nobr&gt; &lt;nobr&gt;together 
+    to determine whether available uniform storage has been exceeded.&lt;/nobr&gt;
+
+    &lt;p&gt;
+      &lt;nobr&gt;If multiple shaders are linked together, then they will share a 
+      single global uniform name space. Hence,&lt;/nobr&gt; &lt;nobr&gt;the types and 
+      initializers of uniform variables with the same name must match across 
+      all shaders that are&lt;/nobr&gt; &lt;nobr&gt;linked into a single executable. It is 
+      legal for some shaders to provide an initializer for a particular&lt;/nobr&gt; &lt;nobr&gt;uniform 
+      variable, while another shader does not, but all provided initializers 
+      must be equal.&lt;/nobr&gt;
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>matrixCompMult</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(mat2, mat2)</arguments>
+                    <type>mat2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(mat3, mat3)</arguments>
+                    <type>mat3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(mat4, mat4)</arguments>
+                    <type>mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackLightModelProduct</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_LightModelProducts</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>equal</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2, bvec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3, bvec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4, bvec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_NormalScale</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewProjectionMatrixInverse</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_DepthRange</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_DepthRangeParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler2DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 2D array texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 2D array texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>out</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>copied out on return, but not initialized</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>noperspective</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>linear interpolation</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+      linear interpolation
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>samplerCube</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a cube mapped texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+                        &lt;head&gt;&#xD;
+                        &#xD;
+                        &lt;/head&gt;&#xD;
+                        &lt;body&gt;&#xD;
+                        &lt;/body&gt;&#xD;
+                        &lt;/html&gt;&#xD;
+                    </doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler2DShadow</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 2D depth texture with comparison</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>for</key>
+            <value>
+                <item>
+                    <category>ITERATION</category>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>break</key>
+            <value>
+                <item>
+                    <category>JUMP</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>invariant</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>ensures all calculations of this variable give identical values across programs</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    To ensure that a particular output variable is invariant, it is necessary 
+    to use the &lt;b&gt;invariant &lt;/b&gt;qualifier. It can either be used to qualify a 
+    previously declared variable as being invariant
+
+    &lt;blockquote&gt;
+      &lt;code&gt;&lt;nobr&gt;invariant gl_Position; // make existing gl_Position be invariant&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;varying 
+      vec3 Color;&lt;/nobr&gt;&lt;br&gt;&lt;nobr&gt;invariant Color; // make existing Color be invariant&lt;/nobr&gt;&lt;br&gt;&lt;/code&gt;
+    &lt;/blockquote&gt;
+    &lt;p&gt;
+      or as part of a declaration when a variable is declared
+    &lt;/p&gt;
+    &lt;blockquote&gt;
+      &lt;code&gt;&lt;nobr&gt;invariant varying vec3 Color;&lt;/nobr&gt;&lt;/code&gt;
+    &lt;/blockquote&gt;
+    &lt;p&gt;
+      The invariant qualifier must appear before any storage qualifiers (&lt;b&gt;varying&lt;/b&gt;) 
+      when combined with a declaration. Only variables output from a vertex 
+      shader can be candidates for invariance. This includes user-defined 
+      varying variables, the built-in vertex-side varying variables, and the 
+      special vertex variables &lt;i&gt;gl_Position &lt;/i&gt;and &lt;i&gt;gl_PointSize&lt;/i&gt;. For 
+      varying variables leaving a vertex shader and coming into a fragment 
+      shader with the same name, the &lt;b&gt;invariant &lt;/b&gt;keyword has to be used 
+      in both the vertex and fragment shaders. The &lt;b&gt;invariant &lt;/b&gt;keyword 
+      can be followed by a comma separated list of previously declared 
+      identifiers. All uses of &lt;b&gt;invariant &lt;/b&gt;must be at the global scope, 
+      and before any use of the variables being declared as invariant.
+    &lt;/p&gt;
+    &lt;p&gt;
+      To guarantee invariance of a particular output variable across two 
+      programs, the following must also be true:
+    &lt;/p&gt;
+    &lt;ul&gt;
+      &lt;li&gt;
+        The output variable is declared as invariant in both programs.
+      &lt;/li&gt;
+      &lt;li&gt;
+        The same values must be input to all shader input variables consumed 
+        by expressions and flow control contributing to the value assigned to 
+        the output variable.
+      &lt;/li&gt;
+      &lt;li&gt;
+        The texture formats, texel values, and texture filtering are set the 
+        same way for any texture function calls contributing to the value of 
+        the output variable.
+      &lt;/li&gt;
+      &lt;li&gt;
+        All input values are all operated on in the same way. All operations 
+        in the consuming expressions and any intermediate expressions must be 
+        the same, with the same order of operands and same associativity, to 
+        give the same order of evaluation. Intermediate variables and 
+        functions must be declared as the same type with the same explicit or 
+        implicit precision qualifiers. Any control flow affecting the output 
+        value must be the same, and any expressions consumed to determine this 
+        control flow must also follow these invariance rules.
+      &lt;/li&gt;
+      &lt;li&gt;
+        All the data flow and control flow leading to setting the invariant 
+        output variable reside in a single compilation unit.
+      &lt;/li&gt;
+    &lt;/ul&gt;
+    &lt;p&gt;
+      Essentially, all the data flow and control flow leading to an invariant 
+      output must match. Initially, by default, all output variables are 
+      allowed to be variant. To force all output variables to be invariant, 
+      use the pragma
+    &lt;/p&gt;
+    &lt;blockquote&gt;
+      &lt;code&gt;#pragma STDGL invariant(all)&lt;/code&gt;
+    &lt;/blockquote&gt;
+    &lt;p&gt;
+      before all declarations in a shader. If this pragma is used after the 
+      declaration of any variables or functions, then the set of outputs that 
+      behave as invariant is undefined. It is an error to use this pragma in a 
+      fragment shader.
+    &lt;/p&gt;
+    &lt;p&gt;
+      Generally, invariance is ensured at the cost of flexibility in 
+      optimization, so performance can be degraded by use of invariance. 
+      Hence, use of this pragma is intended as a debug aid, to avoid 
+      individually declaring all output variables as invariant.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>abs</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Returns x if x &amp;gt;= 0, otherwise it returns -x
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Returns x if x &amp;gt;= 0, otherwise it returns -x
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Returns x if x &amp;gt;= 0, otherwise it returns -x
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Returns x if x &amp;gt;= 0, otherwise it returns -x
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>greaterThanEqual</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec2, ivec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec3, ivec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec4, ivec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>g_NormalMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat3</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>false</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                    <tooltip>boolean value</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewMatrixInverse</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>g_WorldViewProjectionMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>refract</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float eta)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2, float eta)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3, float eta)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4 I, vec4 M, float eta)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>dFdx</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>dFdy</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewProjectionMatrixInverseTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>lessThanEqual</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec2, ivec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec3, ivec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec4, ivec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler1D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer 1D texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 1D texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>not</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(bvec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewMatrixInverseTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>greaterThan</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec2, ivec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec3, ivec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec4, ivec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Fog</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_FogParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>tan</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric tangent function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric tangent function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric tangent function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The standard trigonometric tangent function. Angle in radians.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>cross</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ClipPlane</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxClipPlanes</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>textureCube</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(samplerCube, vec3, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>const</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>constant function input</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxTextureUnits</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 2 since OpenGL 1.3</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum available multitexture 
+    statges.&lt;br&gt;This constant can 
+    be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with the symbolic constant &lt;i&gt;GL_MAX_TEXTURE_UNITS&lt;/i&gt;. 
+    The minimum value is 2.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mediump</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    qualifier for medium precision
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>inout</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>value initialized on entry, and copied out on return</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>switch</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontLightModelProduct</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_LightModelProducts</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow1DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1DShadow, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler1DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer 1D array texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 1D array texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_EyePlaneT</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_EyePlaneS</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_EyePlaneR</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>distance</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, vec4)</arguments>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_EyePlaneQ</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler1DShadow</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 1D depth texture with comparison</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing a 1D depth texture with comparison
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>g_ProjectionMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureEnvColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureUnits</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>length</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewMatrixTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontMaterial</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_MaterialParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler2DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing a 2D array texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing a 2D array texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                    <type></type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>min</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_LightSource</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxLights</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform gl_LightSourceParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>return</key>
+            <value>
+                <item>
+                    <category>JUMP</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>void</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>for functions that do not return a value</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>true</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                    <tooltip>boolean value</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2, vec2, float)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3, vec3, float)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4, vec4, float)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture3DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler3D, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxDrawBuffers</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 1 ARB_draw_buffers required</tooltip>
+                    <doc>min = 1; // proposed ARB_draw_buffers</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ProjectionMatrixTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>lowp</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    qualifier for low precision
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isamplerCube</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer cube mapped texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer cube mapped texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>g_WorldViewMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>fwidth</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>atan</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y 
+                        are used to determine what quadrant the angle is in. The range of values 
+                        returned by this function is [-Pi, Pi]. Results are undefined if x and y 
+                        are both 0.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y 
+                        are used to determine what quadrant the angle is in. The range of values 
+                        returned by this function is [-Pi, Pi]. Results are undefined if x and y 
+                        are both 0.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y 
+                        are used to determine what quadrant the angle is in. The range of values 
+                        returned by this function is [-Pi, Pi]. Results are undefined if x and y 
+                        are both 0.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y 
+                        are used to determine what quadrant the angle is in. The range of values 
+                        returned by this function is [-Pi, Pi]. Results are undefined if x and y 
+                        are both 0.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4, vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxVaryingFloats</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 32</tooltip>
+                    <doc>min = 32; // ARB_vertex_shader</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>fract</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Point</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform gl_PointParameters</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture3DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler3D, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ObjectPlaneS</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ObjectPlaneT</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler2D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 2D texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 2D texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>exp2</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ObjectPlaneR</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ObjectPlaneQ</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>lessThan</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec2, ivec2)</arguments>
+                    <type>bvec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec3, ivec3)</arguments>
+                    <type>bvec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(ivec4, ivec4)</arguments>
+                    <type>bvec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow2DProjLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2DShadow, vec4, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxTextureImageUnits</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 2</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum available texture image 
+    units in a fragment shader.&lt;br&gt; The texture image unit constant specifyes the 
+    number of hardware units that can be used simultaneously for accessing 
+    texture maps. This constant can be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; 
+    with the symbolic constant &lt;i&gt;GL_MAX_TEXTURE_IMAGE_UNITS_ARB&lt;/i&gt;. The 
+    minimum value is 2.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontLightProduct</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxLights</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform gl_LightProducts</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxClipPlanes</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 6 since OpenGL 1.0</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum supported clip planes.
+
+    &lt;p&gt;
+      This constant can be also queried by calling &lt;b&gt;glGetIntegerv&lt;/b&gt; with 
+      the symbolic constant &lt;i&gt;GL_MAX_CLIP_PLANES_ARB&lt;/i&gt;. The minimum value 
+      is 6.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>inversesqrt</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureMatrixInverseTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>int</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>signed integer</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MaxLights</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &gt;= 8 since OpenGL 1.0</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Implementation dependent constant for the maximum allowed dynamic light 
+    sources.&lt;br&gt; The minimum value is 8.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>flat</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>no interpolation</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+      no interpolation.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>log2</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler3D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 3D texture </tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 3D texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>exp</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>ftransform</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>()</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mat4</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>4×4 floating-point matrix</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>default</key>
+            <value>
+                <item>
+                    <category>KEYWORD</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler1D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 1D texture</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mat2</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>2×2 floating-point matrix</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>mat3</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>3×3 floating-point matrix</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ModelViewProjectionMatrixTranspose</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>textureCubeLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(samplerCube, vec3, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler2D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer 2D texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 2D texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TextureMatrix</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX &lt; gl_MaxTextureCoords</tooltip>
+                    <arguments>[]</arguments>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ProjectionMatrixInverse</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>uniform mat4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow1DLod</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1DShadow, vec3, float lod)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>while</key>
+            <value>
+                <item>
+                    <category>ITERATION</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler2D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 2D texture</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>texture1DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, vec2, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler1D, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>if</key>
+            <value>
+                <item>
+                    <category>SELECTION</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>shadow2DProj</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(sampler2DShadow, vec4, float bias)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>isampler1DArray</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an integer 1D array texture</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    a handle for accessing an integer 1D array texture
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>acos</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc cosine. Returns an angle whose cosine is x. The range of values 
+                        returned by this function is [0, pi]. Results are undefined if |x|&amp;gt;1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc cosine. Returns an angle whose cosine is x. The range of values 
+                        returned by this function is [0, pi]. Results are undefined if |x|&amp;gt;1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc cosine. Returns an angle whose cosine is x. The range of values 
+                        returned by this function is [0, pi]. Results are undefined if |x|&amp;gt;1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Arc cosine. Returns an angle whose cosine is x. The range of values 
+                        returned by this function is [0, pi]. Results are undefined if |x|&amp;gt;1.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>usampler3D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>a handle for accessing an unsigned integer 3D texture</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    a handle for accessing an unsigned integer 3D texture&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>degrees</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts radians to degrees, i.e. 180/Pi * radians
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts radians to degrees, i.e. 180/Pi * radians
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts radians to degrees, i.e. 180/Pi * radians
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Converts radians to degrees, i.e. 180/Pi * radians
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>(vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>in</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>value initialized on entry, not copied on return (default)</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>sampler3D</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>handle for accessing a 3D texture</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>continue</key>
+            <value>
+                <item>
+                    <category>JUMP</category>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>bool</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>conditional type, taking on values of true or false (also known as boolean)</tooltip>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>step</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, float)</arguments>
+                    <type>float</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, vec2)</arguments>
+                    <type>vec2</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, vec3)</arguments>
+                    <type>vec3</type>
+                </item>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <arguments>(float, vec4)</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>uint</key>
+            <value>
+                <item>
+                    <category>TYPE</category>
+                    <tooltip>an unsigned integer</tooltip>
+                    <doc>&lt;html&gt;&#xD;
+  &lt;head&gt;&#xD;
+    &#xD;
+  &lt;/head&gt;&#xD;
+  &lt;body&gt;&#xD;
+    an unsigned integer&#xD;
+  &lt;/body&gt;&#xD;
+&lt;/html&gt;&#xD;
+</doc>
+                </item>
+            </value>
+        </entry>
+    </mainVocabulary>
+    <fragmentShaderVocabulary>
+        <entry>
+            <key>gl_FragDepth</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>pixel depth</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        Writing to &lt;i&gt;gl_FragDepth &lt;/i&gt;will establish the depth value for the 
+                        fragment being processed. If depth buffering is enabled, and no shader 
+                        writes &lt;i&gt;gl_FragDepth&lt;/i&gt;, then the fixed function value for depth will 
+                        be used as the fragment&amp;#8217;s depth value. If a shader statically assigns a 
+                        value to &lt;i&gt;gl_FragDepth&lt;/i&gt;, and there is an execution path through the 
+                        shader that does not set &lt;i&gt;gl_FragDepth&lt;/i&gt;, then the value of the 
+                        fragment&amp;#8217;s depth may be undefined for executions of the shader that take 
+                        that path. That is, if the set of linked fragment shaders statically 
+                        contain a write to &lt;i&gt;gl_FragDepth&lt;/i&gt;, then it is responsible for always 
+                        writing it.
+                        
+                        &lt;p&gt;
+                        (A shader contains a &lt;i&gt;static assignment &lt;/i&gt;to a variable &lt;i&gt;x &lt;/i&gt;if, 
+                        after pre-processing, the shader contains a statement that would write 
+                        to &lt;i&gt;x&lt;/i&gt;, whether or not run-time flow of control will cause that 
+                        statement to be executed.)
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FragCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>pixel coordinate (READ ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_FragCoord &lt;/i&gt;is available as a read-only variable from 
+                        within fragment shaders and it holds the window relative coordinates x, y, 
+                        z, and 1/w values for the fragment. If multi-sampling, this value can be 
+                        for any location within the pixel, or one of the fragment samples. The use 
+                        of &lt;b&gt;centroid &lt;/b&gt;varyings does not further restrict this value to be 
+                        inside the current primitive. This value is the result of the fixed 
+                        functionality that interpolates primitives after vertex processing to 
+                        generate fragments. The &lt;i&gt;z &lt;/i&gt;component is the depth value that would 
+                        be used for the fragment&amp;#8217;s depth if no shader contained no writes to &lt;i&gt;gl_FragDepth. 
+                        &lt;/i&gt;This is useful for invariance if a shader conditionally computes &lt;i&gt;gl_FragDepth 
+                        &lt;/i&gt;but otherwise wants the fixed functionality fragment depth.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PointCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The values in &lt;i&gt;gl_PointCoord &lt;/i&gt;are two-dimensional coordinates 
+                        indicating where within a point primitive the current fragment is located, 
+                        when point sprites are enabled. They range from 0.0 to 1.0 across the 
+                        point. If the current primitive is not a point, or if point sprites are 
+                        not enabled, then the values read from gl_PointCoord are undefined.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec2</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontFacing</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>(READ ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    Fragment shaders have access to the read-only built-in variable &lt;i&gt;gl_FrontFacing, 
+    &lt;/i&gt;whose value is &lt;b&gt;true &lt;/b&gt;if the fragment belongs to a front-facing 
+    primitive.&lt;p&gt; One use of this is to emulate two-sided lighting
+    by selecting one of two colors calculated by the vertex shader or geometry
+    shader.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>bool</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Color</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The values in &lt;i&gt;gl_Color &lt;/i&gt;and &lt;i&gt;gl_SecondaryColor &lt;/i&gt;will be derived 
+                        automatically by the system from &lt;i&gt;gl_FrontColor, gl_BackColor, 
+                        gl_FrontSecondaryColor, &lt;/i&gt;and &lt;i&gt;gl_BackSecondaryColor &lt;/i&gt;based on 
+                        which face is visible. If fixed functionality is used for vertex 
+                        processing, then &lt;i&gt;gl_FogFragCoord &lt;/i&gt;will either be the z-coordinate of 
+                        the fragment in eye space, or the interpolation of the fog coordinate, as 
+                        described in section 3.10 of the OpenGL 1.4 Specification. The &lt;i&gt;gl_TexCoord[] 
+                        &lt;/i&gt;values are the interpolated &lt;i&gt;gl_TexCoord[] &lt;/i&gt;values from a vertex 
+                        shader or the texture coordinates of any fixed pipeline based vertex 
+                        functionality.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>discard</key>
+            <value>
+                <item>
+                    <category>JUMP</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The &lt;b&gt;discard &lt;/b&gt;keyword is only allowed within fragment shaders. It can 
+                        be used within a fragment shader to abandon the operation on the current 
+                        fragment. This keyword causes the fragment to be discarded and no updates 
+                        to any buffers will occur. It would typically be used within a conditional 
+                        statement, for example:
+                        
+                        &lt;pre&gt;    if (intensity &amp;lt; 0.0)
+                        discard;
+                        &lt;/pre&gt;
+                        A fragment shader may test a fragment&amp;#8217;s alpha value and discard the 
+                        fragment based on that test. However, it should be noted that coverage 
+                        testing occurs after the fragment shader runs, and the coverage test can 
+                        change the alpha value.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_SecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The values in &lt;i&gt;gl_Color &lt;/i&gt;and &lt;i&gt;gl_SecondaryColor &lt;/i&gt;will be derived 
+                        automatically by the system from &lt;i&gt;gl_FrontColor, gl_BackColor, 
+                        gl_FrontSecondaryColor, &lt;/i&gt;and &lt;i&gt;gl_BackSecondaryColor &lt;/i&gt;based on 
+                        which face is visible. If fixed functionality is used for vertex 
+                        processing, then &lt;i&gt;gl_FogFragCoord &lt;/i&gt;will either be the z-coordinate of 
+                        the fragment in eye space, or the interpolation of the fog coordinate, as 
+                        described in section 3.10 of the OpenGL 1.4 Specification. The &lt;i&gt;gl_TexCoord[] 
+                        &lt;/i&gt;values are the interpolated &lt;i&gt;gl_TexCoord[] &lt;/i&gt;values from a vertex 
+                        shader or the texture coordinates of any fixed pipeline based vertex 
+                        functionality.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FragData</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX&lt;gl_MaxDrawBuffers</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_FragData &lt;/i&gt;is an array. Writing to &lt;i&gt;gl_FragData[n] &lt;/i&gt;specifies 
+                        the fragment data that will be used by the subsequent fixed functionality 
+                        pipeline for data &lt;i&gt;n&lt;/i&gt;. If subsequent fixed functionality consumes 
+                        fragment data and an execution of a fragment shader executable does not 
+                        write a value to it, then the fragment data consumed is undefined.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>[]</arguments>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FragColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>pixel color</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        If a shader statically assigns a value to &lt;i&gt;gl_FragColor&lt;/i&gt;, it may not 
+                        assign a value to any element of &lt;i&gt;gl_FragData&lt;/i&gt;. If a shader 
+                        statically writes a value to any element of &lt;i&gt;gl_FragData&lt;/i&gt;, it may not 
+                        assign a value to &lt;i&gt;gl_FragColor&lt;/i&gt;. That is, a shader may assign values 
+                        to either &lt;i&gt;gl_FragColor &lt;/i&gt;or &lt;i&gt;gl_FragData&lt;/i&gt;, but not both. 
+                        Multiple shaders linked together must also consistently write just one of 
+                        these variables.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+    </fragmentShaderVocabulary>
+    <vertexShaderVocabulary>
+        <entry>
+            <key>gl_BackColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>enable GL_VERTEX_PROGRAM_TWO_SIDE</tooltip>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FogFragCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        For &lt;i&gt;gl_FogFragCoord&lt;/i&gt;, the value written will be used as the &amp;quot;c&amp;quot; 
+                        value on page 160 of the OpenGL 1.4 Specification by the fixed 
+                        functionality pipeline. For example, if the z-coordinate of the fragment 
+                        in eye space is desired as &amp;quot;c&amp;quot;, then that's what the vertex or geometry shader
+                        executable should write into &lt;i&gt;gl_FogFragCoord&lt;/i&gt;.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>varying float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Position</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>must be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The variable &lt;i&gt;gl_Position&lt;/i&gt; is available only in the vertex and 
+    geometry language and is intended for writing the homogeneous vertex 
+    position.
+
+    &lt;p&gt;
+      It can be written at any time during shader execution. It may also be 
+      read back by the shader after being written. This value will be used by 
+      primitive assembly, clipping, culling, and other fixed functionality 
+      operations that operate on primitives after vertex or geometry 
+      processing has occurred. Compilers may generate a diagnostic message if 
+      they detect &lt;i&gt;gl_Position&lt;/i&gt; is read before being written, but not all 
+      such cases are detectable. Writing to &lt;i&gt;gl_Position&lt;/i&gt; is optional. If &lt;i&gt;gl_Position&lt;/i&gt; 
+      is not written but subsequent stages of the OpenGL pipeline consume &lt;i&gt;gl_Position&lt;/i&gt;, 
+      then results are undefined.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TexCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX&lt;gl_MaxTextureCoords</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        As with all arrays, indices used to subscript &lt;i&gt;gl_TexCoord &lt;/i&gt;must 
+                        either be an integral constant expressions, or this array must be 
+                        re-declared by the shader with a size. The size can be at most &lt;i&gt;gl_MaxTextureCoords&lt;/i&gt;. 
+                        Using indexes close to 0 may aid the implementation in preserving varying 
+                        resources.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>[]</arguments>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontSecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>attribute</key>
+            <value>
+                <item>
+                    <category>QUALIFIER</category>
+                    <tooltip>linkage between a vertex shader and OpenGL for per-vertex data (READ-ONLY)</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The &lt;b&gt;attribute &lt;/b&gt;qualifier is used to declare variables that are 
+    passed to a vertex shader from OpenGL on a per-vertex basis. It is an 
+    error to declare an attribute variable in any type of shader other than a 
+    vertex shader. Attribute variables are read-only as far as the vertex 
+    shader is concerned. Values for attribute variables are passed to a vertex 
+    shader through the OpenGL vertex API or as part of a vertex array. They 
+    convey vertex attributes to the vertex shader and are expected to change 
+    on every vertex shader run. The attribute qualifier can be used only with &lt;b&gt;float, 
+    &lt;/b&gt;floating-point vectors, and matrices. Attribute variables cannot be 
+    declared as arrays or structures.&lt;p&gt;Example declarations:
+
+    &lt;pre&gt;attribute vec4 position;
+attribute vec3 normal;
+attribute vec2 texCoord;&lt;/pre&gt;
+    &lt;p&gt;
+      All the standard OpenGL vertex attributes have built-in variable names 
+      to allow easy integration between user programs and OpenGL vertex 
+      functions. See Section 7 &amp;quot;Built-in Variables&amp;quot; of the OpenGL Shading 
+      Language specification; for a list of the built-in attribute names.
+    &lt;/p&gt;
+    &lt;p&gt;
+      It is expected that graphics hardware will have a small number of fixed 
+      locations for passing vertex attributes. Therefore, the OpenGL Shading 
+      language defines each non-matrix attribute variable as having space for 
+      up to four floating-point values (i.e., a vec4). There is an 
+      implementation dependent limit on the number of attribute variables that 
+      can be used and if this is exceeded it will cause a link error. 
+      (Declared attribute variables that are not used do not count against 
+      this limit.) A float attribute counts the same amount against this limit 
+      as a vec4, so applications may want to consider packing groups of four 
+      unrelated float attributes together into a vec4 to better utilize the 
+      capabilities of the underlying hardware. A matrix attribute will use up 
+      multiple attribute locations. The number of locations used will equal 
+      the number of columns in the matrix.
+    &lt;/p&gt;
+    &lt;p&gt;
+      Attribute variables are required to have global scope, and must be 
+      declared outside of function bodies, before their first use.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackSecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>enable GL_VERTEX_PROGRAM_TWO_SIDE</tooltip>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>varying vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FogCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord7</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord6</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord5</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PointSize</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>may be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_PointSize &lt;/i&gt;is available only in the vertex and geometry language 
+                        and is intended to write the size of the point to be 
+                        rasterized. It is measured in pixels.
+                        
+                        &lt;p&gt;
+                        If &lt;i&gt;gl_PointSize &lt;/i&gt;or &lt;i&gt;gl_ClipVertex &lt;/i&gt;are not written to, their 
+                        values are undefined. Any of these variables can be read back by the 
+                        shader after writing to them, to retrieve what was written. Reading them 
+                        before writing them results in undefined behavior. If they are written 
+                        more than once, it is the last value written that is consumed by the 
+                        subsequent operations. These built-in variables have global scope.
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>inColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>inTexCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>inNormal</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec3</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>inPosition</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_SecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord4</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord3</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ClipVertex</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>may be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_ClipVertex &lt;/i&gt;is available only in the vertex and geometry language 
+                        and provides a place for vertex and geometry shaders to write the coordinate to be used 
+                        with the user clipping planes. The user must ensure the clip vertex and 
+                        user clipping planes are defined in the same coordinate space. User clip 
+                        planes work properly only under linear transform. It is undefined what 
+                        happens under non-linear transform.
+                        
+                        &lt;p&gt;
+                        If &lt;i&gt;gl_PointSize &lt;/i&gt;or &lt;i&gt;gl_ClipVertex &lt;/i&gt;are not written to, their 
+                        values are undefined. Any of these variables can be read back by the 
+                        shader after writing to them, to retrieve what was written. Reading them 
+                        before writing them results in undefined behavior. If they are written 
+                        more than once, it is the last value written that is consumed by the 
+                        subsequent operations. These built-in variables have global scope.
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord2</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_MultiTexCoord1</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>attribute vec4</type>
+                </item>
+            </value>
+        </entry>
+    </vertexShaderVocabulary>
+    <geometryShaderVocabulary>
+        <entry>
+            <key>gl_FogFragCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        For &lt;i&gt;gl_FogFragCoord&lt;/i&gt;, the value written will be used as the &amp;quot;c&amp;quot; 
+                        value on page 160 of the OpenGL 1.4 Specification by the fixed 
+                        functionality pipeline. For example, if the z-coordinate of the fragment 
+                        in eye space is desired as &amp;quot;c&amp;quot;, then that's what the vertex or geometry shader
+                        executable should write into &lt;i&gt;gl_FogFragCoord&lt;/i&gt;.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>varying out float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>enable GL_VERTEX_PROGRAM_TWO_SIDE</tooltip>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Layer</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The built-in output variable &lt;i&gt;gl_Layer&lt;/i&gt; is available only in the 
+    geometry language, and provides the number of the layer of textures 
+    attached to a FBO to direct rendering to.&lt;p&gt; If a shader statically assigns a 
+    value to &lt;i&gt;gl_Layer&lt;/i&gt;, layered rendering mode is enabled. See section 
+    2.16.4 for a detailed explanation. If a shader statically assigns a value 
+    to &lt;i&gt;gl_Layer&lt;/i&gt;, and there is an execution path through the shader that 
+    does not set &lt;i&gt;gl_Layer&lt;/i&gt;, then the value of &lt;i&gt;gl_Layer&lt;/i&gt; may be 
+    undefined for executions of the shader that take that path.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_Position</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>must be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The variable &lt;i&gt;gl_Position&lt;/i&gt; is available only in the vertex and 
+    geometry language and is intended for writing the homogeneous vertex 
+    position.
+
+    &lt;p&gt;
+      It can be written at any time during shader execution. It may also be 
+      read back by the shader after being written. This value will be used by 
+      primitive assembly, clipping, culling, and other fixed functionality 
+      operations that operate on primitives after vertex or geometry 
+      processing has occurred. Compilers may generate a diagnostic message if 
+      they detect &lt;i&gt;gl_Position&lt;/i&gt; is read before being written, but not all 
+      such cases are detectable. Writing to &lt;i&gt;gl_Position&lt;/i&gt; is optional. If &lt;i&gt;gl_Position&lt;/i&gt; 
+      is not written but subsequent stages of the OpenGL pipeline consume &lt;i&gt;gl_Position&lt;/i&gt;, 
+      then results are undefined.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TexCoord</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>INDEX&lt;gl_MaxTextureCoords</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        As with all arrays, indices used to subscript &lt;i&gt;gl_TexCoord &lt;/i&gt;must 
+                        either be an integral constant expressions, or this array must be 
+                        re-declared by the shader with a size. The size can be at most &lt;i&gt;gl_MaxTextureCoords&lt;/i&gt;. 
+                        Using indexes close to 0 may aid the implementation in preserving varying 
+                        resources.
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <arguments>[]</arguments>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FogFragCoordIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>EmitVertex</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The function &lt;b&gt;EmitVertex()&lt;/b&gt; specifies that a vertex is completed. A 
+    vertex is added to the current output primitive using the current values 
+    of the varying output variables and the current values of the special 
+    built-in output variables &lt;b&gt;gl_PointSize&lt;/b&gt;, &lt;b&gt;gl_ClipVertex&lt;/b&gt;, &lt;b&gt;gl_Layer&lt;/b&gt;, 
+    gl_Position&lt;/b&gt; and &lt;b&gt;gl_PrimitiveID&lt;/b&gt;.
+
+    &lt;p&gt;
+      The values of any unwritten output variables are undefined. The values 
+      of all varying output variables and the special built-in output 
+      variables are undefined after a call to &lt;b&gt;EmitVertex()&lt;/b&gt;. If a 
+      geometry shader, in one invocation, emits more vertices than the value &lt;i&gt;GEOMETRY_VERTICES_OUT_EXT&lt;/i&gt;, 
+      these emits may have no effect.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <arguments>()</arguments>
+                    <type>void</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackColorIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PointSizeIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontSecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackSecondaryColorIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ClipVertexIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_BackSecondaryColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>enable GL_VERTEX_PROGRAM_TWO_SIDE</tooltip>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_TexCoordIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>value &lt;= gl_MaxTextureCoords</tooltip>
+                    <doc>
+value &lt;= gl_MaxTextureCoords</doc>
+                    <arguments>[gl_VerticesIn][]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontColorIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontColor</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <type>varying out vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_FrontSecondaryColorIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_VerticesIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;
+      Value set at link time.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>const int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PointSize</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>may be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_PointSize &lt;/i&gt;is available only in the vertex and geometry language 
+                        and is intended to write the size of the point to be 
+                        rasterized. It is measured in pixels.
+                        
+                        &lt;p&gt;
+                        If &lt;i&gt;gl_PointSize &lt;/i&gt;or &lt;i&gt;gl_ClipVertex &lt;/i&gt;are not written to, their 
+                        values are undefined. Any of these variables can be read back by the 
+                        shader after writing to them, to retrieve what was written. Reading them 
+                        before writing them results in undefined behavior. If they are written 
+                        more than once, it is the last value written that is consumed by the 
+                        subsequent operations. These built-in variables have global scope.
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>float</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>EndPrimitive</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_FUNC</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+    
+  &lt;/head&gt;
+  &lt;body&gt;
+    The function &lt;b&gt;EndPrimitive()&lt;/b&gt; specifies that the current output 
+    primitive is completed and a new output primitive (of the same type) 
+    should be started. This function does not emit a vertex.&lt;br&gt; The effect of &lt;b&gt;EndPrimitive()&lt;/b&gt; 
+    is roughly equivalent to calling End followed by a new Begin, where the 
+    primitive mode is taken from the program object parameter &lt;i&gt;GEOMETRY_OUTPUT_TYPE_EXT&lt;/i&gt;. 
+    If the output primitive type is &lt;i&gt;POINTS&lt;/i&gt;, calling &lt;b&gt;EndPrimitive()&lt;/b&gt; 
+    is optional.
+
+    &lt;p&gt;
+      A geometry shader starts with an output primitive containing no 
+      vertices. When a geometry shader terminates, the current output 
+      primitive is automatically completed. It is not necessary to call &lt;b&gt;EndPrimitive()&lt;/b&gt; 
+      if the geometry shader writes only a single primitive.
+    &lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <arguments>()</arguments>
+                    <type>void</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PositionIn</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <arguments>[gl_VerticesIn]</arguments>
+                    <type>varying in vec4</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_PrimitiveID</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <doc>&lt;html&gt;
+  &lt;head&gt;
+
+  &lt;/head&gt;
+  &lt;body&gt;
+        The built-in output variable &lt;i&gt;gl_PrimitiveID&lt;/i&gt; is available only in the
+    geometry language and provides a single integer that serves as a primitive
+    identifier.&lt;p&gt;  This written primitive ID is available to fragment shaders.
+    If a fragment shader using primitive IDs is active and a geometry shader
+    is also active, the geometry shader must write to &lt;i&gt;gl_PrimitiveID&lt;/i&gt; or the
+    primitive ID in the fragment shader number is undefined.
+  &lt;/body&gt;
+&lt;/html&gt;
+</doc>
+                    <type>int</type>
+                </item>
+            </value>
+        </entry>
+        <entry>
+            <key>gl_ClipVertex</key>
+            <value>
+                <item>
+                    <category>BUILD_IN_VAR</category>
+                    <tooltip>may be written from vertex shader</tooltip>
+                    <doc>&lt;html&gt;
+                        &lt;head&gt;
+                        
+                        &lt;/head&gt;
+                        &lt;body&gt;
+                        The variable &lt;i&gt;gl_ClipVertex &lt;/i&gt;is available only in the vertex and geometry language 
+                        and provides a place for vertex and geometry shaders to write the coordinate to be used 
+                        with the user clipping planes. The user must ensure the clip vertex and 
+                        user clipping planes are defined in the same coordinate space. User clip 
+                        planes work properly only under linear transform. It is undefined what 
+                        happens under non-linear transform.
+                        
+                        &lt;p&gt;
+                        If &lt;i&gt;gl_PointSize &lt;/i&gt;or &lt;i&gt;gl_ClipVertex &lt;/i&gt;are not written to, their 
+                        values are undefined. Any of these variables can be read back by the 
+                        shader after writing to them, to retrieve what was written. Reading them 
+                        before writing them results in undefined behavior. If they are written 
+                        more than once, it is the last value written that is consumed by the 
+                        subsequent operations. These built-in variables have global scope.
+                        &lt;/p&gt;
+                        &lt;/body&gt;
+                        &lt;/html&gt;
+                    </doc>
+                    <type>vec4</type>
+                </item>
+            </value>
+        </entry>
+    </geometryShaderVocabulary>
+</glslVocabulary>

+ 26 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/NetBeans-glsl-fontsColors.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE fontscolors PUBLIC "-//NetBeans//DTD Editor Fonts and Colors settings 1.1//EN" "http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd">
+<fontscolors>
+    <fontcolor name="glsl-keyword" default="keyword"/>
+    <fontcolor name="glsl-name" default="identifier"/>
+    <fontcolor name="glsl-function" default="identifier">
+        <font style="bold"/>
+    </fontcolor>
+    <fontcolor name="glsl-brace" default="operator"/>
+    <fontcolor name="glsl-value" default="number"/>
+    <fontcolor name="glsl-curly-brace" default="operator"/>
+    <fontcolor name="glsl-string-value" default="default"/>
+    <fontcolor name="glsl-comment" default="comment"/>
+    <fontcolor name="glsl-separator" default="operator"/>
+    <fontcolor name="glsl-whitespace" default="whitespace"/>
+    <fontcolor name="glsl-end-of-line" default="whitespace"/>
+    <fontcolor name="glsl-build-in-var" default="string">
+        <font style="bold"/>
+    </fontcolor>
+    <fontcolor name="glsl-build-in-func" default="identifier">
+        <font style="bold,italic"/>
+    </fontcolor>
+    <fontcolor name="glsl-preprocessor" foreColor="ff6060D0">
+        <font style="bold,italic" />
+    </fontcolor>
+</fontscolors>

BIN
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/OptionsIcon.gif


BIN
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/VertexShaderIcon.gif


+ 7 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/VertexShaderTemplate.vert

@@ -0,0 +1,7 @@
+/*
+* vertex shader template
+*/
+void main() { 
+    // Vertex transformation 
+    gl_Position = ftransform(); 
+}

BIN
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/field.gif


BIN
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/function.gif


BIN
jme3-glsl-support/src/net/java/nboglpack/glsleditor/resources/preprocessor.png


+ 56 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/vocabulary/GLSLElementDescriptor.java

@@ -0,0 +1,56 @@
+/*
+ * GLSLElementDescriptor.java
+ * 
+ * Created on 03.06.2007, 23:03:57
+ * 
+ */
+package net.java.nboglpack.glsleditor.vocabulary;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ *
+ * @author Michael Bien
+ */
+public class GLSLElementDescriptor {
+ 
+ @XmlType
+ @XmlEnum(String.class)
+ public enum Category { BUILD_IN_FUNC, BUILD_IN_VAR, USER_FUNC, JUMP, ITERATION, SELECTION, QUALIFIER, TYPE, KEYWORD  }
+ 
+  @XmlElement
+  public final Category category;
+  
+  @XmlElement(required = true)
+  public final String tooltip;
+  
+  @XmlElement(required = true)
+  public final String doc;
+  
+  @XmlElement(required = true)
+  public final String arguments;
+  
+  @XmlElement(required = true)
+  public final String type;
+
+    /*bean constructor, fields are directly injected*/
+    public GLSLElementDescriptor() {
+        category    = Category.KEYWORD;
+        tooltip     = null;
+        doc         = null;
+        arguments   = null;
+        type        = null;
+    }
+
+    public GLSLElementDescriptor(Category category, String tooltip, String doc, String arguments, String type) {
+        this.category  = category;
+        this.tooltip   = tooltip;
+        this.doc       = doc;
+        this.arguments = arguments;
+        this.type      = type;
+    }
+
+
+}

+ 33 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/vocabulary/GLSLVocabulary.java

@@ -0,0 +1,33 @@
+/*
+ * GLSLVocabulary.java
+ * 
+ * Created on 03.06.2007, 23:03:57
+ * 
+ */
+package net.java.nboglpack.glsleditor.vocabulary;
+
+import java.util.HashMap;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ *
+ * @author Michael Bien
+ */
+@XmlRootElement
+public class GLSLVocabulary {
+
+ public final HashMap<String, GLSLElementDescriptor[]> mainVocabulary;
+ public final HashMap<String, GLSLElementDescriptor[]> fragmentShaderVocabulary;
+ public final HashMap<String, GLSLElementDescriptor[]> vertexShaderVocabulary;
+ public final HashMap<String, GLSLElementDescriptor[]> geometryShaderVocabulary;
+ 
+    
+    public GLSLVocabulary() {
+        mainVocabulary           = new HashMap<String, GLSLElementDescriptor[]>();
+        vertexShaderVocabulary   = new HashMap<String, GLSLElementDescriptor[]>();
+        fragmentShaderVocabulary = new HashMap<String, GLSLElementDescriptor[]>();
+        geometryShaderVocabulary = new HashMap<String, GLSLElementDescriptor[]>();
+    }
+ 
+ 
+}

+ 2 - 0
jme3-glsl-support/src/net/java/nboglpack/glsleditor/vocabulary/jaxb.index

@@ -0,0 +1,2 @@
+GLSLElementDescriptor
+GLSLVocabulary

+ 1 - 0
jme3-glsl-support/test/unit/src/META-INF/services/org.openide.loaders.DataLoader

@@ -0,0 +1 @@
+net.java.nboglpack.glsleditor.GlslGeometryShaderDataLoader

+ 0 - 1
nbproject/platform.properties

@@ -51,7 +51,6 @@ disabled.modules=\
     org.netbeans.modules.jellytools.java,\
     org.netbeans.modules.jellytools.platform,\
     org.netbeans.modules.jemmy,\
-    org.netbeans.modules.languages,\
     org.netbeans.modules.maven,\
     org.netbeans.modules.maven.coverage,\
     org.netbeans.modules.maven.embedder,\

+ 2 - 0
nbproject/project.properties

@@ -44,6 +44,7 @@ modules=\
     ${project.com.jme3.gde.obfuscate}:\
     ${project.com.jme3.gde.blender}:\
     ${project.com.jme3.gde.angelfont}:\
+    ${project.net.java.nboglpack.glsleditor}:\
     ${project.com.jme3.gde.android}
 project.com.jme3.gde.android=jme3-android
 project.com.jme3.gde.angelfont=jme3-angelfont
@@ -51,6 +52,7 @@ project.com.jme3.gde.blender=jme3-blender
 project.com.jme3.gde.codecheck=jme3-code-check
 project.com.jme3.gde.customcontrols=jme3-custom-controls
 project.com.jme3.gde.desktop.executables=jme3-desktop-executables
+project.net.java.nboglpack.glsleditor=jme3-glsl-support
 project.com.jme3.gde.assetpack=jme3-assetpack-support
 project.com.jme3.gde.cinematics=jme3-cinematics
 project.com.jme3.gde.codepalette=jme3-codepalette