benfry / processing4

Processing 4.x releases for Java 17
https://processing.org
Other
1.35k stars 238 forks source link

Add the ability to edit .glsl files from the Editor window #178

Closed andrevenancio closed 2 years ago

andrevenancio commented 3 years ago

This is probably more like a suggestion than an issue.

I just recently started playing with Processing. One of the things I find it difficult is not being able to import a glsl into the file explorer. I can create a new file and it creates a new .pde file, I can import a shader as long as it's on the data folder but there's no way of editing the shader directly on the processing window.

Would be nice to edit it on the processing window. :)

danieltorrer commented 3 years ago

Hey @andrevenancio, not sure if you already knew them, but there are some non-official extensions that might have what you need:

They can be helpful in the meantime, while the discussion to add shader support continues

andrevenancio commented 3 years ago

One of them I knew (doesn't work on processing 4) the other I'll give it a go. Thanks

benfry commented 3 years ago

Thanks; it'd be great to have a Tool that does this well for now, though I totally understand the need for it.

While support could be hacked in, it means 1) setting a new precedent where we're showing entries from the data folder as tabs, and 2) needing to support syntax highlighting, indenting, etc for glsl. Neither are terribly difficult, but just introduces some inconsistencies (wait, why not txt files? json? etc) and potential headaches (syntax support) which mean a Tool would be a good way to bridge the gap until someone has the time to do it “right.”

scudly commented 2 years ago

So, don't add syntax highlighting, auto-indenting, or any of the headaches. Just let us edit generic text files, of any extension, from within the editor. Raw text editing gets us 99% of the way there.

benfry commented 2 years ago

So, don't add syntax highlighting, auto-indenting, or any of the headaches. Just let us edit generic text files, of any extension, from within the editor. Raw text editing gets us 99% of the way there.

That only covers 50% of what I wrote. But again, this is why Tools exist: someone could make this in a day, and maintain it themselves—without introducing inconsistencies to how the development environment works, or more feature requests to add more than raw text editing.

github-actions[bot] commented 2 years ago

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.