Weird warnings in GLSL Editor

This line causes a “IDENTIFIER expected” warning in the GLSL editor:



uniform mat4 g_WorldViewProjectionMatrix;



It happens for other variables as well. Anyone know how to fix this?

I’ve never used the GLSL editor but what stuff is above that?



Like many parsing errors… it may not be the line itself but something in a previous line confusing the parsers. Trying to debug through a tiny one-line window may not be possible. It may not be possible anyway. :slight_smile: But we might as well give it the best chance.

Its not a bug really, and it does not prevent me from running the code, its just weird errors being reported in the editor.



I think i figured it out tho, it seems to be when using jMonkey-specific variables (like inTexCoord) that have different names then the standard ones.



Thanks tho. :slight_smile:

Hm, the jMonkey keywords and variables should be registered in the editor… I’m not 100% familiar with the GLSL plugin but I’ll check.

1 Like

Yeah, I’m getting the same thing:



https://img.skitch.com/20120228-nr4ub39fxc82je57xt4g4uda6y.png



It’s weird because the code still works fine. I’m also getting underlines in the shaders packaged with jmonkey (like Unshaded.vert), which definitely can’t be right…

Yep, this happens frequently for me to, kind of annoying. I shall try to see exactly what triggers the errors.

It’s as @normen says. There are keywords which are either misspelled or wrong in the plugin itself. I had those warnings too when I dabbled with GLSL. Those errors mean nothing to the GLSL engine itself, only to the editor.

Yeah, the editor highlighting / shader support is taken from a (discontinued) NetBeans plugin, we extended it a bit to support jME3’s globals etc. Maybe some adopter would do good for it :slight_smile: (As said I don’t have much of a firm idea of shaders so I don’t know what it should and shouldn’t handle)