GLSL Syntax Highlighter plugin for NetBeans
- You can download the latest version from here.
SHA-1 hash: ca9b3e6594e8b6529d007be95915bbe7d64c6efe *glsl-syntax-highlighter-v0.1.1.nbm
- Supports GLSL 4.3 (based on the OpenGL Shading Language 4.3 specification).
- Supports the following file extensions: glsl, vert, tessc, tesse, geom, frag, comp, vs, tcs, tes, gs, fs.
- Highlights keywords, built-in types, built-in functions, built-in variables, numbers, identifiers, comments, preprocessor directives and more.
- Highlighting colors are customizable through the Options menu.
- Brace matching support: position the cursor over a brace (e.g.
() and the matching brace will be highlighted.
- Adds a custom icon in the editor for the GLSL files, so they are easily differentiable from the other types of text files.
- Compatible with NetBeans 7.2, 7.3, 8.0 and 8.1.
- Source code available under the GPL v3 license.
Contribute to the project!
If you like NetBeans and also programming shaders in GLSL, please feel free to fork this repo and share whatever improvements you think are the most useful! Here are some ideas:
- Supporting GLSL ES shaders.
- Supporting older GLSL versions.
- Highlighting deprecated keywords and built-ins differently.
- Implementing a proper parser (beyond the current very basic tokenizer), which would make some very cool features feasible:
- Syntax checking.
- Code completion.
- Code formatting.
- Smart coding hints like the ones NetBeans offers when editing Java source code.
- Perhaps opening a headless OpenGL context to actually compile each shader and show the errors and warnings reported by the video driver in the info log.
About implementing a parser, note that the "Shading Language Grammar for Core Profile" is available as the last chapter of the official GLSL specification, which can be downloaded here.
Also, please post any issues and suggestions in the issue tracker.
- I would like to say many thanks for the author of the www.lighthouse3d.com website for his several high quality GLSL tutorials and especially for the GLSL syntax highlight UDL files he made for Notepad++. They inspired me to start coding this plugin! So, many thanks!! :)
- Also, thanks for all the NetBeans programmers for making this great IDE, of course!
About the author
I'm a computer graphics researcher and game programmer who loves OpenGL. Some of my work can be seen here.