GLSL in Codelite

General questions regarding the usage of CodeLite
User avatar
zaphod
CodeLite Veteran
Posts: 55
Joined: Fri Sep 11, 2009 6:20 pm
Contact:

GLSL in Codelite

Post 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.
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: GLSL in Codelite

Post 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.
User avatar
zaphod
CodeLite Veteran
Posts: 55
Joined: Fri Sep 11, 2009 6:20 pm
Contact:

Re: GLSL in Codelite

Post 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...
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: GLSL in Codelite

Post by eranif »

You need your lexer to pre-exist and supported by wxStyledTextCtrl - a quick look shows that it does not exist...

Eran
Make sure you have read the HOW TO POST thread
User avatar
zaphod
CodeLite Veteran
Posts: 55
Joined: Fri Sep 11, 2009 6:20 pm
Contact:

Re: GLSL in Codelite

Post 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.
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: GLSL in Codelite

Post 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.
Post Reply