[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Standalone IDL has FloatArray where it probably means Float32Array



On Tue, Apr 3, 2012 at 12:55 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 4/3/12 3:37 PM, Kenneth Russell wrote:
>>
>> Yes, webgl.idl and the index.html are both completely hand edited
>> right now. It would be great if we could automatically generate one
>> from the other. Any contributions here would be welcome.
>
>
> One "simple" option is to load the spec in your browser of choice, then run
> this bookmarklet:
>
> javascript:var%20s%20=%20Array.prototype.slice.call(document.querySelectorAll("pre.idl")).map(function(n)%20{%20return%20n.textContent;%20}).join('\n\n');%20document.open("text/plain");%20document.write(s);%20document.close()
>
> and then copy/paste the resulting text into the IDL file.

Cool, thanks; that's remarkably simple.

> I can write you a command-line version of this in Python if you want, if you
> just want to have a script that runs on the spec .html and spits out the
> IDL.  It'd take a bit more work because of the crappy DOM support in Python,
> but not that much more.  If there's already a script generating stuff that
> you have to run anyway, this is probably the approach you want, right?

There's currently no generation script associated with the spec or
webgl.idl. If you'd be willing to write the Python to produce
webgl.idl from the spec, I'll write the Makefile to hook it up.

Thanks in advance!

-Ken

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------