On Tue, 2007-02-27 at 03:02 +0800, Audrey Tang wrote: > 2007/2/27, Geoffrey Broadwell <[EMAIL PROTECTED]>: > > Are you looking for Perl code that creates such packed arrays and passes > > them to OpenGL? Or are you looking for links to manpages for the OpenGL > > calls themselves? Or both? > > The former.
OK, I'll pull some of the interesting routines out of my code and post them. > > I can write some tests that build packed arrays of some of the types I > > need and then go snooping around it checking the contents ... would that > > help? Somehow I'm thinking it's a bad thing if data types tests require > > OpenGL ... but it seems hard to tell whether the implementation is > > actually creating a packed array, or just faking the Perl-side behavior > > using an unpacked array, unless we make a call to some C API that can > > confirm the results. > > That is correct. However as you noted, our buf should be as good as a > C-level packed buffer, so you can assume that when writing the tests. > Alternately, we can assume some fairly simple C FFI calls such as > strlen() (or some such) that manages the structs we'd like it to > manage. I'm being an idiot -- if we can assume Perl 5 connectivity, I can just pass the buf as a string over to Perl 5, unpack there, return the unpacked values to Perl 6, and compare. Does Perl 6 on Parrot have Perl 5 connectivity? -'f