First open up the preferences and go to the editor section and choose the generic highlighter section
Next select the download definitions and choose which ones you want (I chose Python and GLSL) as shown
This will download the file into the directory $(HOME).config/Nokia/qtcreator/generic-highlighter and for glsl it is a file called glsl.xml. I usually name my Vertex shaders with a .vs extension and my Fragment shaders with a .fs extension so we need to add this to the xml file
<language name="GLSL" section="Sources" extensions="*.glsl;*.vert;*.frag;*.vs;*.fs" mimetype="text/x-glslsrc" version="1.02" kateversion="2.4" author="Oliver Richers (o.richers@tu-bs.de)" license="LGPL">
Now all we need to do is re-start QtCreator and we have syntax highlighted glsl ;-)
No comments:
Post a Comment