mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
Fix WebGLVAOWrapper failing when it can't find an expected attribute.
This can happen on systems with different GLSL compilers, which optimize entire unused attributes.
This commit is contained in:
parent
6979e7b96b
commit
af90c85460
1 changed files with 2 additions and 1 deletions
|
@ -143,7 +143,8 @@ var WebGLVAOWrapper = new Class({
|
|||
var attributeIndex = glAttributeNames.get(layout.name);
|
||||
if (attributeIndex === undefined)
|
||||
{
|
||||
throw new Error('Attribute not found: ' + layout.name);
|
||||
// This attribute is not used in the shader, so skip it.
|
||||
continue;
|
||||
}
|
||||
var attributeInfo = glAttributes[attributeIndex];
|
||||
layout.location = attributeInfo.location;
|
||||
|
|
Loading…
Reference in a new issue