Looking for some help with this. It's easy code to understand.
My makeshift push/pop matrix code seems to have no effect at all, the model doesn't translate to it's position.
var savedMat = mat4.create();
mat4.translate(mvMatrix, [model.x, model.y, model.z]);
gl.drawArrays(gl.TRIANGLES, 0, model.VertexPositionBuffer.numItems);
I want the models to be drawn at their position/ and later on rotation, and not affect the mvMatrix (modelview matrix).
create temp matrix
set temp matrix to modelview matrix
translate modelview matrix to model position
set modelview matrix to temp matrix