Help needed with and layers

    Jul 27 2011 | 9:15 pm
    Im new to Jitter. Read sa much from the forum as possible, but I could use a little advise on this one.
    I am making a drawing patch for an installation. Im using stroke in, modified from the forum.
    But the new lines that are drawn are below the old lines. I tried to solve this with layers, but that doesn't seem to work within one object (sending multiple stroke command with different layer numbers does nothing).
    Turns out the layer only work if I use seperate sketch objects. But since I want to use the layers as an undo system (deleting the layer), it's not so handy to have X number of sketch objects for each layer. Generating objects of the fly is also something I dont know how to do so...
    What would be the best approach for this?
    here is my patch I simplified a bit for this example, sorry if it is a bit messy. Still a beginner :)
    thanks in advance

    • Jul 27 2011 | 10:12 pm
      hi.. for the overlaping issue you just need to turn off the depth_enable of the gl.sketch.
      good luck with the project!
    • Jul 28 2011 | 5:29 pm
      hey thanks! that did the trick indeed!
      too bad the layers don't work in
      Im thinking now to make my undo system with the mouse positions that are recorder each time there is a mouse down and then redraw everything minus one when 'undo' is pressed. I hope that performs fast enough...
      Or is there a way to erase a specific stroke? Im also wondering that in relation to building something like a eraser but that's maybe not possible with vector based drawing like this.
      Thanks, Maarten