Skip to content

Commit ac4f736

Browse files
author
Andrey Kuzmin
committed
Fix for optimize mode
1 parent 044f971 commit ac4f736

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Elm/Kernel/WebGL.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ function _WebGL_doBindAttribute(gl, attribute, mesh, attributes) {
281281
* @return {Object} buffer.buffers - will be used to buffer attributes
282282
*/
283283
function _WebGL_doBindSetup(gl, mesh) {
284-
if (mesh.a.indexSize > 0) {
284+
if (mesh.a.__$indexSize > 0) {
285285
_WebGL_log('Created index buffer');
286286
var indexBuffer = gl.createBuffer();
287-
var indices = _WebGL_makeIndexedBuffer(mesh.c, mesh.a.indexSize);
287+
var indices = _WebGL_makeIndexedBuffer(mesh.c, mesh.a.__$indexSize);
288288
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);
289289
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);
290290
return {
@@ -294,7 +294,7 @@ function _WebGL_doBindSetup(gl, mesh) {
294294
};
295295
} else {
296296
return {
297-
numIndices: mesh.a.elemSize * _WebGL_listLength(mesh.b),
297+
numIndices: mesh.a.__$elemSize * _WebGL_listLength(mesh.b),
298298
indexBuffer: null,
299299
buffers: {}
300300
};
@@ -383,12 +383,12 @@ var _WebGL_drawGL = F2(function (model, domNode) {
383383

384384
program = {
385385
glProgram: glProgram,
386-
attributes: Object.assign({}, entity.b.attributes, entity.c.attributes),
386+
attributes: Object.assign({}, entity.__vert.attributes, entity.__frag.attributes),
387387
uniformSetters: _WebGL_createUniformSetters(
388388
gl,
389389
model,
390390
glProgram,
391-
Object.assign({}, entity.b.uniforms, entity.c.uniforms)
391+
Object.assign({}, entity.__vert.uniforms, entity.__frag.uniforms)
392392
)
393393
};
394394

@@ -440,9 +440,9 @@ var _WebGL_drawGL = F2(function (model, domNode) {
440440

441441
if (buffer.indexBuffer) {
442442
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buffer.indexBuffer);
443-
gl.drawElements(entity.d.a.mode, buffer.numIndices, gl.UNSIGNED_SHORT, 0);
443+
gl.drawElements(entity.__mesh.a.__$mode, buffer.numIndices, gl.UNSIGNED_SHORT, 0);
444444
} else {
445-
gl.drawArrays(entity.d.a.mode, 0, buffer.numIndices);
445+
gl.drawArrays(entity.__mesh.a.__$mode, 0, buffer.numIndices);
446446
}
447447

448448
_WebGL_listEach(__WI_disableSetting(model.__cache), entity.__settings);

0 commit comments

Comments
 (0)