send one frame from 3D sketch to matrix / matrix to texture looks darker


    Nov 22 2011 | 9:20 pm
    Hi all!
    I'm pretty new to Jitter so forgive my ignorance...
    I am working on drawing application. I am happy with the first version with the help of what I could find on the forum.
    But as the drawing takes place in 3D sketch (smooth lines big lines get really blocky in jit.LCD), after a lot of strokes the application becomes slow.
    So I want to make a snapshot of the drawing (sending it to a matrix and back to gl as a texture) then draw of that after each release of the mouse, clearing gl in the process. Also it enables me to device a undo system in the drawing app, by being able to go back x matrixes...
    But I have a bit of a hard time with bringing the matrix back in 3D as a texture: the drawing looks much darker! Before I begin to compensate for it I thought to ask if I'm doing something wrong?
    Also now I'm using asyncread to bring the 3D sketch into a matrix. But I think there must be a better way for an instance that only needs one frame on command.
    Can someone please help me shed some light on this?
    Thanks
    Maarten
    ps. the patch is not getting a high frame rate on my comp now but before it was. I cannot find the cause now, but that is not so important right now. thanks again

    • Nov 23 2011 | 1:50 pm
      A good point to start would be the jitter tutorials and (for the to-matrix thingy) have a look inside the jitter-examples folder. Especially the render-tomatrix patch.
      As for the color: You have to give your jit.gl.gridshape the correct color (white or black, depending on the blend_mode)
    • Nov 23 2011 | 8:06 pm
      oh my! Thanks!
      Setting the background to white did indeed solve it (even if it is with alpha 0.)
      Thanks a lot :)
    • Nov 23 2011 | 8:43 pm
      ha, it even works with blend_mode 0