mirror of
https://github.com/photonstorm/phaser
synced 2024-12-04 18:40:59 +00:00
Make FLOAT the default type
This commit is contained in:
parent
cb7a998ea0
commit
c5656fbd08
1 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,8 @@
|
|||
*/
|
||||
|
||||
var Class = require('../../utils/Class');
|
||||
var GetFastValue = require('../../utils/object/GetFastValue');
|
||||
var WEBGL_CONST = require('./const');
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
|
@ -167,8 +169,10 @@ var WebGLShader = new Class({
|
|||
|
||||
var name = element.name;
|
||||
var size = element.size; // i.e. 1 for a float, 2 for a vec2, 4 for a vec4, etc
|
||||
var type = element.type.enum; // The GLenum
|
||||
var typeSize = element.type.size; // The size in bytes of the type
|
||||
var glType = GetFastValue(element, 'type', WEBGL_CONST.FLOAT);
|
||||
var type = glType.enum; // The GLenum
|
||||
var typeSize = glType.size; // The size in bytes of the type
|
||||
|
||||
var normalized = (element.normalized) ? true : false;
|
||||
|
||||
result.push({
|
||||
|
|
Loading…
Reference in a new issue