GL Tools Patches With Structure Inputs

toneburst's picture

Would it be possible to modify the GL Tools patches that accept structure inputs (Point Structure, Line Structure etc.) so that they can work with 4-component inputs for each point, as well as the current 3-component XYZ arrays?

It's a slightly obscure request, I know, but there's a reason: The OpenCL patch can't deal with or output float3s, ie structures of 3-component arrays, so you can't, for example, plug an OpenCL kernel outputting a structure into a Point Structure patch. I guess the 4th value could just be ignored.

a|x

smokris's picture
Re: GL Tools Patches With Structure Inputs

The problem isn't GLTools not accepting 4-component inputs (*), but that, as of Snow Leopard, structures can be represented internally in a new format (same issue as http://kineme.net/Discussion/DevelopingCompositions/MeshComponentKinemeG...).

The next release of GLTools will include support for float4 structures output from the OpenCL patch.

(*) It currently just ignores elements > 3, except for GL Point Structure and GL Cube Structure, which interpret elements 4,5,6,7 as RGBA.

toneburst's picture
Re: GL Tools Patches With Structure Inputs

Thanks for getting back to me smokris. I hadn't realised it was to do with the structure format. So does that mean that the next GL Tools release will be able to make use of the new faster C-backed arrays cwright was talking about? That would be cool...

a|x

smokris's picture
Re: GL Tools Patches With Structure Inputs

Make use of them, yes.

"Faster", not sure yet. :^]

toneburst's picture
Re: GL Tools Patches With Structure Inputs

I see. It would be a shame if you didn't get any find of speed-bump out of it.

a|x