* Put comment markers around imported library contents when loading shader
This commit is contained in:
parent
ad7fdb6fab
commit
be3a6c03b2
@ -84,7 +84,10 @@ public class GLSLLoader implements AssetLoader {
|
||||
try {
|
||||
bufReader = new BufferedReader(reader);
|
||||
String ln;
|
||||
while ((ln = bufReader.readLine()) != null) {
|
||||
if (!nodeName.equals("[main]")) {
|
||||
sb.append("// -- begin import ").append(nodeName).append(" --\n");
|
||||
}
|
||||
while ((ln = bufReader.readLine()) != null) {
|
||||
if (ln.trim().startsWith("#import ")) {
|
||||
ln = ln.trim().substring(8).trim();
|
||||
if (ln.startsWith("\"") && ln.endsWith("\"") && ln.length() > 3) {
|
||||
@ -109,6 +112,9 @@ public class GLSLLoader implements AssetLoader {
|
||||
sb.append(ln).append('\n');
|
||||
}
|
||||
}
|
||||
if (!nodeName.equals("[main]")) {
|
||||
sb.append("// -- end import ").append(nodeName).append(" --\n");
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
if (bufReader != null) {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user