Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


glsl syntax highlight and auto completion


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Wh0p   Members   -  Reputation: 358

Like
8Likes
Like

Posted 16 June 2014 - 01:22 PM

Yes that's right the never ending story...

 

I've gone through a lot now tested different editors, tools, plugins and there's always something not the way I wanted. I think most people here know what I mean.

So recently I began searching for another solution (again). I came across a pretty nice solution in a forum post from like ages.

 

The main idea is to let your c-compiler think that .glsl files are to be parsed as header files. Not overwhelmingly new so far. But then you can go ahead an write another include file that defines all the glsl names and symbols and you are basically done, fore the c-compiler does the rest.

 

I took a liking to it and spend a night long crawling the glsl reference pages copy pasting function definitions and so on. Ill gladly share the result with you: https://github.com/Wh0p/Wh0psGarbageDump

You are free to test and improve this yourself! (However, I am totally new to all this git stuff and might need some time to figure this out)

 

Just have a look at the example on the bottom, how it looks in Visual Studio...

 

Still there are some drawbacks, you have to write a preprocessor that resolves or stripps the "#include" directives from the .glsl file.

The syntax for uniform buffer is somewhat broke.

 

Sooo, tell me if you like/hate/ignore it, or even have a better solution to this. Personally I think I have found a solution I can be happy with (for the time being).

 

 

 

cFc8dz6.png?1

 

 

 

 



Sponsor:

#2 tmason   Members   -  Reputation: 326

Like
0Likes
Like

Posted 18 June 2014 - 12:50 PM

Looks good. Will try it out.

Keep it up! I'd love to see this fleshed out.

#3 Vilem Otte   Crossbones+   -  Reputation: 2053

Like
0Likes
Like

Posted 18 June 2014 - 02:07 PM

Seems interesting (especially the intellisense part), any plans to add MSVC comments for intellisense (that <summary>, <param> etc.)?


My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com


#4 Wh0p   Members   -  Reputation: 358

Like
0Likes
Like

Posted 19 June 2014 - 07:37 AM

Seems interesting (especially the intellisense part), any plans to add MSVC comments for intellisense (that <summary>, <param> etc.)?

 

yeah, thought about that too. Slowly but gradually i might integrate this too. Doing this manually would be a pain, though.



#5 Vilem Otte   Crossbones+   -  Reputation: 2053

Like
0Likes
Like

Posted 19 June 2014 - 08:48 AM


Doing this manually would be a pain, though.

True, also for allowing F.e. include in your glsl file (if you F.e. preprocess it in your "shader loader"), you can just exclude glsl files from build. You will still get all the intellisense magic and syntax (if you have it correctly set up).


My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS