mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
Added higher threshold for warning emission on shader linking and validation
This commit is contained in:
parent
51670f5d26
commit
ff9534a14a
2 changed files with 7 additions and 12 deletions
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: '7d813d50-8217-11e7-b68c-d36461f65b44'
|
||||
build: 'ce0b7300-8279-11e7-a43d-997ba01bf63f'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -142,8 +142,8 @@ var ResourceManager = new Class({
|
|||
gl.shaderSource(vertShader, shaderSources.vert);
|
||||
gl.compileShader(vertShader);
|
||||
|
||||
error = gl.getShaderInfoLog(vertShader);
|
||||
status = gl.getShaderParameter(vertShader, gl.COMPILE_STATUS);
|
||||
error = gl.getShaderInfoLog(vertShader);
|
||||
|
||||
if (!status && error && error.length > 0)
|
||||
{
|
||||
|
@ -158,8 +158,8 @@ var ResourceManager = new Class({
|
|||
gl.shaderSource(fragShader, shaderSources.frag);
|
||||
gl.compileShader(fragShader);
|
||||
|
||||
error = gl.getShaderInfoLog(fragShader);
|
||||
status = gl.getShaderParameter(fragShader, gl.COMPILE_STATUS);
|
||||
error = gl.getShaderInfoLog(fragShader);
|
||||
|
||||
if (!status && error && error.length > 0)
|
||||
{
|
||||
|
@ -176,31 +176,26 @@ var ResourceManager = new Class({
|
|||
gl.linkProgram(program);
|
||||
gl.validateProgram(program);
|
||||
|
||||
error = gl.getProgramInfoLog(program);
|
||||
status = gl.getProgramParameter(program, gl.LINK_STATUS);
|
||||
error = gl.getProgramInfoLog(program);
|
||||
|
||||
if (!status && error && error.length > 0)
|
||||
{
|
||||
throw new Error('Program Linking Error. Shader name: ' + shaderName + '.\n' + error);
|
||||
}
|
||||
else if (error && error.length > 0)
|
||||
else if (error && error.length > 10)
|
||||
{
|
||||
console.warn('Program Linking Warning. Shader name: ' + shaderName + '.\n' + error);
|
||||
}
|
||||
|
||||
if (!error)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
error = gl.getProgramInfoLog(program);
|
||||
status = gl.getProgramParameter(program, gl.VALIDATE_STATUS);
|
||||
error = gl.getProgramInfoLog(program);
|
||||
|
||||
if (!status && error && error.length > 0)
|
||||
{
|
||||
throw new Error('Program Validation Error. Shader name: ' + shaderName + '.\n' + error);
|
||||
}
|
||||
else if (error && error.length > 0)
|
||||
else if (error && error.length > 10)
|
||||
{
|
||||
console.warn('Program Validation Warning. Shader name: ' + shaderName + '.\n' + error);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue