     @drawLine(p0, midPoint)
     @drawLine(midPoint, p1)
 
+  # http://en.wikipedia.org/wiki/Bresenham's_line_algorithm
   drawBLine: (p0, p1) ->
     x0 = p0[0] >> 0
     y0 = p0[1] >> 0

    index = ((x >> 0) + (y >> 0) * @canvas.width) * 4

    # RGBA color space is used by the HTML5 canvas
    @backbufferdata[index + 0] = color.r * 255
    @backbufferdata[index + 1] = color.g * 255
    @backbufferdata[index + 2] = color.b * 255
    @backbufferdata[index + 3] = color.a * 255

  # Project takes some 3D coordinates and transforms them in 2D
  # coordinates using the transformation matrix

        err += dx
        y0 += sy

  drawScanLine: (x1, x2, y, color) ->
    [x1, x2] = [x2, x1] if x1 > x2
    for x in [(x1 | 0)..(x2 | 0)] by 1
      @drawPoint(Vec2.fromValues(x, y), color)

  # The main method of the engine that recomputes each vertex
  # projection on every frame
  render: (camera, meshes) ->
