mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 21:29:17 +01:00
Update shader preprocessing to strip version correctly
Previously the whole line was removed, now only the end of the line is removed to handle the case when version is in a comment
This commit is contained in:
@@ -1989,8 +1989,9 @@ public abstract class PGL {
|
||||
String[] src = new String[src0.length+offset];
|
||||
for (int i = 0; i < src0.length; i++) {
|
||||
String line = src0[i];
|
||||
if (line.contains("#version")) {
|
||||
line = "";
|
||||
int versionIndex = line.indexOf("#version");
|
||||
if (versionIndex >= 0) {
|
||||
line = line.substring(0, versionIndex);
|
||||
}
|
||||
for (int j = 0; j < search.length; j++) {
|
||||
line = search[j].matcher(line).replaceAll(replace[j]);
|
||||
|
||||
Reference in New Issue
Block a user