Den 2018-05-01 kl. 09:50, Ryan Joseph <r...@thealchemistguild.com> wrote:
On Apr 25, 2018, at 9:43 PM, Michael Van Canneyt<mich...@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
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal