I don't understand what's going on. I'd expect the two squares to move the same way.

using GeometryTypes
using GLVisualize, GLAbstraction, Reactive, GLWindow, GLFW, Colors
using StaticArrays
# vertices need to be GeometryTypes.Vec{2,T}}
function polygon_mesh(vertices, z=0)
# mesh with fixed z
fs = polygon2faces(map(Point, vertices))
vs = map(x->Point{3}(x[1],x[2],z), vertices)
return GLNormalMesh(vertices=vs, faces=fs)
end
function plot(ro, model_matrix, color)
vis = visualize(ro, model=model_matrix, color=color)
_view(vis, window, camera = :orthographic_pixel)
return vis
end
window = glscreen()
window.color = RGBA(0.04f0, 0.02f0, 0.05f0, 1f0)
width = 100.0
timesignal = loop(linspace(0f0,1f0,360), 60)
rotation_angle = const_lift(*, timesignal, 2f0*pi)
tx__world__shape = Signal(eye(SMatrix{4,4,Float32}))
# copy signal
foreach(x->push!(tx__world__shape, rotationmatrix_z(x)), rotation_angle)
# change plotting order to see if it matters
ro = HyperRectangle{2,Float32}([-width/2,-width/2],[width,width])
viz1 = plot(ro, tx__world__shape, RGBA(0.0f0,0.5f0, 0.5f0, 0.7f0))
viz2 = plot(polygon_mesh([vertices(ro)[[1,2,4,3]]...]), tx__world__shape, RGBA(0.5f0,0.5f0, 0.0f0, 0.7f0))
@async renderloop(window)
I don't understand what's going on. I'd expect the two squares to move the same way.
