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

Feb 9, 2010 at 9:13am

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

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:

– Pasted Max Patch, click to expand. –
#48359
Feb 10, 2010 at 5:15pm

Bump.

Anyone have ideas here? I’m sure I’m missing something simple. Joshua, Andrew, Wesley?

best,
Zachary

#173870
Feb 10, 2010 at 6:59pm

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

#173871
Feb 11, 2010 at 7:24am

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

– Pasted Max Patch, click to expand. –
#173872
Feb 12, 2010 at 3:30am

Going off your original patch, does something like this work for you?

– Pasted Max Patch, click to expand. –
#173873
Feb 12, 2010 at 5:40am

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

– Pasted Max Patch, click to expand. –
#173874

You must be logged in to reply to this topic.