Image context and perspective

I am attempting to make a voxel engine based on prerendered shaded cubes, but I cannot for the life of me get setcontext() and perspective to cooperate. I’m considering batch rendering the cubes on something else and then importing them but I don’t consider this an ideal solution. Any thoughts? :X

Is setContext causing rendering to happen out-of-order? At the moment, setContext does not allocate a depth buffer for an image, so your rendering won’t occlude correctly.

no, using perspective just makes any elements that would be drawn vanish completley. ortho causes them to render out of order, but that can be bypassed by manually calculating the draw order.