Open devel-chm opened 7 years ago
My summary of that discussion: some sort of polymorphism where a "class" of using code knows how to unwrap its data for OpenGL use, with an interface role providing the cue that that using code can do so.
My feeling is that there may be some value to this, but an alternative is for this distro to provide facilities for other Perl code to make their own bindings into OpenGL, by making available:
This is effectively the approach taken by the PDL bindings, which knows much better how to scale up OpenGL stuff (using broadcasting) than a thing done once per small-scale "thing" (single Perl array/vector). The way forward would be to let a hundred flowers bloom, and then identify what they have in common. Having worked with the PDL POGL bindings, and created a PDL OpenCV binding, my suspicion is that what will be in common will most usefully be the above.
With that in mind, this issue is too vague to really be actionable, but the link to the discussion is useful, so it should stay open for now.
See the recent post to the POGL developers list for the initial discussion. The idea is that rather than 1-off implementations of OpenGL bindings for each type of possible array/pointer-ish object (OpenGL::Array, PDL, ...) we would implement a role to implement and require the needed functionality.
The implementation for an argument would then be something like this: