mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 10:55:38 +01:00
takes care of log messages of size = 0
This commit is contained in:
@@ -1851,9 +1851,13 @@ public class PGL {
|
||||
gl2.glGetShaderiv(prog, GL2.GL_INFO_LOG_LENGTH, val, 0);
|
||||
int length = val[0];
|
||||
|
||||
byte[] log = new byte[length];
|
||||
gl2.glGetProgramInfoLog(prog, length, val, 0, log, 0);
|
||||
return new String(log);
|
||||
if (0 < length) {
|
||||
byte[] log = new byte[length];
|
||||
gl2.glGetProgramInfoLog(prog, length, val, 0, log, 0);
|
||||
return new String(log);
|
||||
} else {
|
||||
return "Unknow error";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user