Shader code editors do not refresh properly

When I open a shader code file in the IDE, it does not immediately shows up in the editor. Instead the editor is only refreshed at positions where I move the mouse.

It is lots of fun, but since my game heavily depends on custom shaders, It also is annoying.

Editors for Java-files do not show this behaviour.

What is happening here?

Vanilla Netbeans does not have this problem, by the way.

1 Like

Is there anything on the IDE logs when this happens?

On the top of my head, I see that lookup is slow:

Where are those logs? I have looked in /usr/local/jmonkeyplatform but it looks like there are no logs there.

I don’t have access now. But I would remember that View or Edit menu had an item called IDE logs.

Found it, but there are no lines generated when I open or scroll the shader files.

1 Like

Hmm, yeah, I guess the only thing to do then is to profile. I’ll try to look into it. I really suspect the lookup. I read the code through and it just seems very inefficient. Well, need to see.

Just some more things to narrow it down: I am working on a fully updated Ubuntu 24.04LTS and just moved to JME3.7 somewhere in november - I am pretty sure I did not have these problems this summer when I did a lot of shader work. The OS on my machines was the same back then.

And it does happen on both my machines.

1 Like

I am experiencing this as well.
I think it might be to do with the new versions of netbeans, but I might be wrong.
It is only on the .frag and .vert shader editor.

And vert just do nothing:

Oh yes and I am on Linux Mint.

2 Likes

I managed to reproduce this on Kubuntu. With SDK 3.6 this works fine, but in 3.7 works poorly as described. I created an issue: GLSL highlighter doesn't work properly · Issue #632 · jMonkeyEngine/sdk · GitHub

2 Likes

Alrighty, thanks for bringing this to our attention. I think we will release a new SDK soonish. Hopefully before xmas, we have some nice fixes accumulated already.

This GLSL code highlighter code some additional love beyond the fix as well. Hopefully boosting your productivity through the roof (in case you want to make some New Year’s resolutions :wink: ).

I case you want to try etc:

5 Likes

Awesome @tonihele , this is very good news.

2 Likes

And speaking of… Release SDK Release 3.7.0-sdk2 · jMonkeyEngine/sdk · GitHub. Also auto-completion feature as an xmas bonus was thrown in. I actually don’t know how useful it will be, hopefully at least to someone. Quite bare bones at the moment as I’m not sure what it should contain.

4 Likes

This is brilliant, thanks.
I will give it a spin soonest I can.

2 Likes