News for hackers. Stuff that matters.
Re:Show HN: A conformant WebGL implementation for Node.js by z3t4 on Thursday May 26, 2016 @04:29PM (#11781277)
It would be cool if you could talk to the graphics driver and other IO devices directly from NodeJS. I guess it would require a layer for cross platform standardization. But would be awesome if you could make a Graphics engine in NodeJS that just worked everywhere.

I've tried some of the graphics packages for nodeJS but failed at installing their dependencies. I want something that just works or installable via NPM.

Re:Show HN: A conformant WebGL implementation for Node.js by bhouston on Thursday May 26, 2016 @09:56AM (#11777944)
It is a little buggy for production use at the moment. A bunch of basic things are broken, but we are working on fixing those issues in the near term:

https://github.com/stackgl/headless-gl/issues/62

BTW pretty sure OP is mikolalysenko, the author of stackgl. :) Heh, great work!

Re:Show HN: A conformant WebGL implementation for Node.js by 33a on Thursday May 26, 2016 @12:43PM (#11779379)
Ok, solved this. The validation for this part of the constant blending was a bit too strict https://www.khronos.org/registry/webgl/specs/1.0/#CONSTANT_C... .

Somehow the conformance suite didn't catch this problem (go figure).

Re:Show HN: A conformant WebGL implementation for Node.js by antihero on Thursday May 26, 2016 @08:06AM (#11777266)
Does this mean we can basically render any WebGL code server side and effectively stream the output?
Re:Show HN: A conformant WebGL implementation for Node.js by 33a on Thursday May 26, 2016 @12:02PM (#11779021)
You could, but it would be slow, or at least pretty heavy per client. That said if you have a beefy enough server I suppose it might work.
Re:Show HN: A conformant WebGL implementation for Node.js by nomel on Thursday May 26, 2016 @04:19PM (#11781180)
I don't really understand what's going on here.

Is there a practical use for this? When would rendering, server side, ever be beneficial (assuming that's what's going on here)?

Re:Show HN: A conformant WebGL implementation for Node.js by 33a on Thursday May 26, 2016 @04:27PM (#11781263)
Lots of places. For example:

* You want to generate preview images of WebGL content, such as in a gallery

* You are using WebGL to accelerate some computation in nodejs with a library like https://github.com/waylonflinn/weblas

* You want to test your WebGL code using continuous integration

etc.

Re:Show HN: A conformant WebGL implementation for Node.js by jpambrun on Thursday May 26, 2016 @05:49PM (#11781966)
I know that some medical image viewers use server side rendering for segmented volumes. Such tasks are computationally intensive and usually involves very large datasets. With server side rendering, you can easily and efficiently stream videos or even JPEGs to thin clients such as mobile devices.
Re:Show HN: A conformant WebGL implementation for Node.js by jpambrun on Thursday May 26, 2016 @08:28AM (#11777366)
And, if so, is it hardware accelerated or a software implementation?

Edit: And, how many concurrent context could it support?

Re:Show HN: A conformant WebGL implementation for Node.js by roblabla on Thursday May 26, 2016 @08:42AM (#11777443)
It looks like it uses whatever native implementation of EGL there is behindt he scenes. So it should be hardware accelerated if there is a GPU on your server.

As for whether you can stream the output, looks like you can with `gl.readPixels`, but you'll probably want to compress it somehow. Sending a raw video stream is heavy.

Re:Show HN: A conformant WebGL implementation for Node.js by vvanders on Thursday May 26, 2016 @01:56PM (#11780083)
That's a really bad idea, glReadPixels is usually a full pipeline flush + read back and stall which kills perf for all sorts of reasons.
Re:Show HN: A conformant WebGL implementation for Node.js by 0x0 on Thursday May 26, 2016 @01:48PM (#11780002)
Funny they mention a project called "node-webgl" being an opengl wrapper. Seems like they should have traded project names, since "headless-gl" sounds like an OpenGL thing and "node-webgl" sounds like a WebGL thing, while they're both the opposite! :)
Re:Show HN: A conformant WebGL implementation for Node.js by 33a on Thursday May 26, 2016 @01:53PM (#11780056)
Guess which one got there first and took the webgl name on npm? :)
Re:Show HN: A conformant WebGL implementation for Node.js by AshleysBrain on Thursday May 26, 2016 @09:39AM (#11777801)
This looks cool. Are there any demos we could try in our browser?
Re:Show HN: A conformant WebGL implementation for Node.js by yarp on Wednesday June 01, 2016 @02:03PM (#11816705)
Is there chance to run threejs on it?