redraw per layer?

Store Forums Processing Layers General Discussion redraw per layer?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #550

    Hi there,

    I am new to Processing and have bitten off more than I can chew.

    I have two layers.

    The first is set to noLoop(), and is redrawn only when it receives a midi signal.

    The second layer I would like to be redrawn constantly, but it also seems to only redraw when the signal is received, despite having no reference to the midi in the layer.

    Is there a way to make noLoop() affect only the layer it is called on?

    Thanks very much,



    I’m afraid that noLoop() only applies to the entire sketch and does not control individual layers. You can accomplish what you want by using a flag on the midi layer to indicate whether it should be drawn or not. When a midi signal is received, set the flag to true. In your draw() method, just check the flag. If false return. If true, it will draw and at the end of the draw() method, set it back to false. Make sense?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.