After some changes I'm at `Error: closure call is not allowed`. How do I pass a 
proc to a proc without it becoming a closure?
    
    
    proc renderXYFunc2(
      image: Image,
      function: proc(x: float, y: float, funcVA: varargs[float]): float 
{.gcsafe.},
      funcVA: varargs[float],
      viewPort: (Vec2, Vec2),
      scale: float
    ): void=
      
      var
        m = createMaster()
        s2 = initSeq2[float](image.width, image.height)
      
      m.awaitAll:
        for j in 0..<image.height:
          let y = lerp(j.float, 0.0, image.height.float, viewPort[0].y, 
viewPort[1].y) * scale
          for i in 0..<image.width:
            let x = lerp(i.float, 0.0, image.width.float, viewPort[0].x, 
viewPort[1].x) * scale
            
            m.spawn function(x, y, funcVA) -> s2[i, j] # Error: closure call is 
not allowed
      
      for x, y, value in s2.items:
        image[x, y] = color(value, value,value)
    
    
    Run

Reply via email to