Page 1 of 1

GLSL in Codelite

Posted: Tue Sep 23, 2014 5:42 am
by zaphod
My principal development involves C code and OpenGL and, Eran, I'm really happy using Codelite for all of this.

I also work in GLSL some of the time. It would be cool to have GLSL syntax highlighting available in Codelite. This then leads to the idea of having Codelite handle 'evaluation' compilation of GLSL. GLSL is compiled by the GPU's driver through a standard OpenGL interface but is compiled and loaded from source at OpenGL runtime. I have written a small module that handles the OpenGL interface to GLSL code files.

I have no idea how to generate syntax files for Codelite and even less idea about how to make a plugin. There are no good GLSL IDEs available.

Re: GLSL in Codelite

Posted: Tue Sep 23, 2014 9:57 am
by Gibbon1
If you look under

C:\Program Files (x86)\CodeLite\lexers

There are some xml files that to me look suspiciously like fodder for syntax highlighting.

If just adding a entry for GLSL gives you what you need, I'd expect a patch would be accepted.

Re: GLSL in Codelite

Posted: Tue Sep 23, 2014 6:06 pm
by zaphod
Thanks. I found them in Linux under /usr/share/codelite/lexers (now there is a surprise!)

They look quite straightforward. GLSL has several file types with no formal standard for their extension (.frag and .vert are common enough though). I'll put something together to see how i works...

Re: GLSL in Codelite

Posted: Tue Sep 23, 2014 7:05 pm
by eranif
You need your lexer to pre-exist and supported by wxStyledTextCtrl - a quick look shows that it does not exist...

Eran

Re: GLSL in Codelite

Posted: Fri Sep 26, 2014 7:24 pm
by zaphod
That is a pity. GLSL is very C-like and contains most of C's keywords but adds a huge number of its own that are pertinent only to GPU work.

Is it conceivable to to use the wx C lexer but an extended keword list? Probably not.

Re: GLSL in Codelite

Posted: Sat Sep 27, 2014 3:07 am
by Gibbon1
Maybe I could try this and see if I can make it work more or less?

PS: I'm also back on using gdb to debug a couple of things in my code so I can likely try remote debugging with codelite.