[fpc-pascal] Next language feature for pas2js...

Ingemar Ragnemalm ingemar at ragnemalm.se
Tue May 1 11:37:48 CEST 2018


Den 2018-05-01 kl. 09:50, Ryan Joseph <ryan at thealchemistguild.com> wrote:
>> On Apr 25, 2018, at 9:43 PM, Michael Van Canneyt<michael at freepascal.org>  wrote:
>>
>> Ah, webgl...
>>
>> I had a look at this some time ago, and got depressed. Quickly closed the browser and didn't look back. Same for webaudio:(
> I’m actually a little curious about this myself because I’ve been using OpenGL often recently. I’ve seen the Ingemar’s demos but I only slightly grasp how it’s working.
>
> The wiki says you’re actually parsing the Pascal (not compiling it) and outputting JavaScript. If that’s the case then how does porting libraries work in practice? For examples lets say I want to translate a single OpenGL function, how does that look?

I found it surprisingly easy to import undefined JavaScript functions 
working from examples in the interfaces. I believe web.pas was 
particularly useful. I also made some changes in web.pas. Well, why not 
say what: I made localStorage public instead of private. And I think 
"strokeStyle" was spelled "strokeStye". Also added

     procedure ellipse(x, y, radiusX, radiusY: TCanvasCoordType; 
rotation, startAngle, endAngle: Real; anticlockwise: Boolean);

into TJSCanvasRenderingContext2D.

Not that much though.

WebGL is interesting for me, and being an OpenGL expert (teaching it for 
many years, written two course books on the subject and tons of code), I 
am happy to contribute any way I can. If nothing else, I can promise 
some decent demos, and testing of course.

/Ingemar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180501/67ae9bed/attachment.html>


More information about the fpc-pascal mailing list