Sign in to follow this  
Muncher

GLSL issues

Recommended Posts

Hi, i am finding using GLSL incredibly frustrating, and i was wondering if anyone has had issues developing with it? For example, the act of commenting out a line or adding a new variable is causing the application to crash when the shader is compiled. Also, adding an extra space between an '=' and a variable also crashes the app... I'm wondering whether this a deliberate ploy by nVidia to re-enforce thier cG language by providing a basic, "just adequate" implementation. It may work to, because if this keeps happening i probbably will have to revert to cG :) Paul

Share this post


Link to post
Share on other sites
only issues i've ever had is when i've done something wrong :)

How is the application crashing?
Changing a shader can potetially change alot of things about it, for example if you comment out the line where a uniform varible is used then it wont get included in teh shader, thus any attempt to access it will result in an error.
As for adding a varible, well that could very well end up in a syntax error, causing the shader to fail to compile and thus not be avaible (again, causing problems when you go to access any varibles).

You have to keep in mind that NV's GLSL implimentation is built in terms of CG, that is you can program in GLSL and use CG functions and constructs (such as automatic type promotion), so if there are any problems then its infact in their underlaying CG code and maybe their bad translation to it from GLSL.

Do you have the most recent set of drivers for your card?

Share this post


Link to post
Share on other sites
Quote:
Original post by Muncher
Hi,

i am finding using GLSL incredibly frustrating, and i was wondering if anyone has had issues developing with it?

For example, the act of commenting out a line or adding a new variable is causing the application to crash when the shader is compiled. Also, adding an extra space between an '=' and a variable also crashes the app...
I'm wondering whether this a deliberate ploy by nVidia to re-enforce thier cG language by providing a basic, "just adequate" implementation. It may work to, because if this keeps happening i probbably will have to revert to cG :)

Paul


Yep, the only problem I have found in GLSL is substracting vectors.

Apart from that everything works really smoothly.

I recoment you update your drivers, but dont use beta drivers because they have lots of bugs.

Have you tried "Shader Designer" or "RenderMonkey"?
If those work then you must be doing something wrong.


Share this post


Link to post
Share on other sites
never any problems with the parsing and i have shaders 200+ lines long with comments eg // and /* */ everywhere, are u calling glGetError and also write the return string from the glsl program into your console window it will tell u if there are warnings/errors in your program

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this