jit.gl.asyncread to jit.gl.slab: GL Errors


    Feb 09 2010 | 9:13 am
    Hi guys,
    I get the following errors when grabbing one GL context via jit.gl.asyncread and sending it directly to a jit.gl.slab in another context:
    ob3d_draw_begin pushmatrix: GL Error: Stack overflow
    ob3d_draw_end popmatrix: GL Error: Stack underflow
    Connecting jit.gl.asyncread --> jit.gl.texture --> jit.gl.shader doesn't produce any errors. Any ideas what's going on here with slab, or what I'm doing wrong?
    Using:
    Max 5.1.2
    Mac OSX 10.5.8
    NVIDEA GeForce 9600M GT
    MacBook Pro 3.06 GHz Intel Core 2 Duo
    4 GB RAM
    best
    Z
    Here's a simple patch showing the behavior:

    • Feb 10 2010 | 5:15 pm
      Bump.
      Anyone have ideas here? I'm sure I'm missing something simple. Joshua, Andrew, Wesley?
      best,
      Zachary
    • Feb 10 2010 | 6:59 pm
      You currently cannot safely pass down the chain with jit.gl.slab in the asynchronous readback, because of the other contextual state. It should work if you set the @thru attribute to zero, and then bang the slab in the rendering process (r other) in your patch.
      Also, it would be recommended for sharing textures across contexts that you have the @shared_context attribute set for one of your jit.gl.render objects
    • Feb 11 2010 | 7:24 am
      Thanks for the help Joshua. Still a problem though. I need to reinstantiate the texture from the elevator context once after load, then it works. See the instructions on the patch. Any thoughts?
      best,
      Zachary
    • Feb 12 2010 | 3:30 am
      Going off your original patch, does something like this work for you?
    • Feb 12 2010 | 5:40 am
      Thanks Wesley,
      That does work, but the asyncread output is delayed by two frames (turn of qmetro and bang manually). The following way delays only by one frame. Is there any way to get rid of the delay, or is that just the nature of the async readback (automatic 0 doesn't make a difference for this, it seems).
      best,
      Zachary