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

Michael Van Canneyt michael at freepascal.org
Tue May 1 08:48:39 CEST 2018



On Tue, 1 May 2018, Michalis Kamburelis wrote:

>>>
>>> I had a look at this some time ago, and got depressed. Quickly closed the browser and didn't look back. Same for webaudio :(
>
> The API of WebGL is actually mostly a subset of OpenGLES which is a
> subset of OpenGL. WebGL is quite small, if you compare it to other
> graphic APIs :) OpenGL(ES), Direct3D, Vulkan, Metal are way more
> complicated and larger.

Somehow this doesn't really lift my spirits. :)

>> 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 suspect that we will have a unit like WebGL in pas2js that exposes
> the necessary JS functions for Pascal applications.

Correct.

> Engine like Castle
> Game Engine will used this unit when compiled with pas2js (instead of
> GL when compiled with FPC for desktop, or GLES20 when compiled with
> FPC for mobile). And then CGE can expose an API that looks the same
> (both in pas2js and FPC).
>
> (Yes, I want to port Castle Game Engine one day to pas2js :) )

Good to hear it :)

Michael.


More information about the fpc-pascal mailing list