2007/2/27, Geoffrey Broadwell <[EMAIL PROTECTED]>:
> >  7. Packed arrays with access to raw data pointer to give to API
>
> Is it possible to point us to some use cases of such packed arrays,
> especially the raw data pointer API part?

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.

> Also, if you would translate a few such use cases to the syntax in S09
> (http://perlcabal.org/syn/S09.html) and committing them under
> t/data_types/, then it'd be much easier to measure which parts of
> packed arrays needs to be specced/implemented first.

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.

Thanks,
Audrey

Reply via email to