jit.gl.text2d issue


    Jun 29 2013 | 8:12 pm
    i'm sending text messages to a jit.gl.text2d from javascript and it updates the text but draws over the text that is currently, rather than redrawing itself. and i am updating the gl renderer. javascript:
    tagArr = ['happy', 'lucky', 'warm'];
    gltext = patcher.newdefault(100, 100, 'jit.gl.text2d');
    gltext.message('drawto', 'mywindow');
    gltext.message('size', 15);
    gltext.message('color', 0, 0, 0, 1);
    gltext.message('text', tagArr);
    function editTagRenderer( word, on ) {
    if (on) {
    tagArr.push( word );
    gltext.message('text', tagArr);
    } else {
    for (var i = 0; i < tagArr.length; i++) {
    if (tagArr[i] === word)
    tagArr.splice(i, 1);
    }
    }
    gltext.message('text', tagArr);
    }