I’m trying to do some gpGPU-related stuff, but I’m having a lot of problems with textures and glreadback types.
Uuuu, that’s sad! Post the patch, nesa!
(Choir, please be quiet, I’m trying to be serious here)
I’ve attached a patch where I finally managed to nail down two main issues I’ve stumbled upon:
1. If glreadback is set to fbo, values in float32 type textures are clipped to 0 – 1 range.
In attached patch, jit.gl.gridshape sends a geometry matrix of a sphere. This matrix then goes through one or two jit.gl.texture objects, then through jit.matrix goes to jit.gl.mesh and gets rendered, but only the positive octant is visible:
If glreadback is set to rtt, then the whole sphere is visible, but if the context is rebuild more then once( by toggling ‘floating’ for jit.window few times), the message ‘invalid operation’ is printed at each render bang, and the texture can’t be read back/rendered as geometry.
There is nothing I could do to make it work again(different glreadback, close-open patch…) except quiting max and starting again.
2. Copying from one to another jit.gl.texture seems to be broken in this scenario:
If you set the gate to 2 in attached patch, then geometry matrix goes through two jit.gl.texture objects, but nothing gets through to the final jit.matrix, this time regardless of glreadback: Geometry is not rendered, and the message in subject is printed.
I’ve tried the same patch in xp – results are the same, except the message which is this time ‘Enumeration error’.
MBP 2.5, GeForce 8600M GT, mac os 10.5.2 / XP SP2.