2 ms·
So then my question is what is the future of WebGL? I could see canvas extended to have 3D operations. Like say draw point takes 3 coordinates now. I can see a
by rdtsc 13y ago
So then my question is what is the future of WebGL?
I could see canvas extended to have 3D operations. Like say draw point takes 3 coordinates now. I can see a third party library that does 3D but projects it down to 2D and uses regular 2D commands on the canvas, or I see supporting WebGL interface and writing OpenGL style code.
- etherealG 13y agoI think the suggestions of using a lib to get higher level stuff are good ones. For simple enough stuff, d3, or more complex whole game engines are available.
- _greim_ 13y ago> I could see canvas extended to have 3D operations. Like say draw point takes 3 coordinates now. I think that's the role WebGL essentially fulfills. It was just done in a way that uses OpenGL instead of reinventing the wheel, since a 3D rendering engine is a non-trivial thing to build. In other words, you can do either: var ctx = myCanvas.getContext('2d'); // ctx has the 2d api var ctx = myCanvas.getContext('webgl'); // ctx has the webgl 3d api > I can see a third party library that does 3D but projects it down to 2D and uses regular 2D commands on the canvas. I think it would be a lot slower. Either way there's a 3D rendering engine. Embedding the engine natively and having GPU speedups is a dominating factor. > or I see supporting WebGL interface and writing OpenGL style code. See first point above.
- gmac 13y agohttp://threejs.org/ http://threejs.org/ may be relevant.