admin管理员组文章数量:1387440
I've always been curious about this and have not seen too many examples of what pushes the boundaries.
In terms of graphics, about how far can canvas go? Is there a decent measure of how many polygons it can handle before it starts acting shakey? Perhaps a game that it can be pared to?
I've always been curious about this and have not seen too many examples of what pushes the boundaries.
In terms of graphics, about how far can canvas go? Is there a decent measure of how many polygons it can handle before it starts acting shakey? Perhaps a game that it can be pared to?
Share Improve this question asked Jun 8, 2014 at 7:03 corvidcorvid 11.2k12 gold badges71 silver badges134 bronze badges1 Answer
Reset to default 5Canvas vs. WebGL
First, the term "canvas" is not synonymous with "WebGL".
The following initializer returns a CanvasRenderingContext2D
canvas.getContext("2d");
While this initializer returns a WebGLRenderingContext
canvas.getContext("webgl");
The HTML5 <canvas>
element serves as the container, and WebGL is one possible rendering context within that container.
More information about WebGL initialization
WebGL Limitations
As for limitations, theoretically WebGL makes use of the same video drivers that are used by any desktop OpenGL application running on your machine. With that said, it is important to note that WebGL is essentially OpenGL ES 2.0 which imparts a few limitations pared to standard OpenGL.
For more information regarding OpenGL ES, you can refer to Wikipedia
Another limitation is your capability to reach a wide audience. WebGL is only partially supported in IE 11, and not at all supported pre-11. It is also disabled by default in the current version of Opera and older versions of Safari (pre version 8.0). Source: WebGL Support.
In addition, there is the fact that WebGL applications are running a JavaScript engine, as opposed to a natively piled desktop application. While Chrome's V8 engine has made incredible progress in improving JavaScript's performance, it is still going to be slower than a native app.
For a more in-depth analysis of these challenges and others, see: WebGL Challenges
In Summary
WebGL is based on OpenGL ES 2.0, which is a slightly feature-reduced version of OpenGL. It also runs on top of a JavaScript engine, which is slower than native code. WebGL isn't equally supported or standardized between different web browsers.
Aside from the limitations imparted by the above, WebGL is capable of rendering nearly anything your GPU can render in a desktop application with the possibility of reduced performance.
Limitations aside, Epic Games announced a partnership with Mozilla a few months ago on a project that involves porting Unreal Engine 4 to WebGL, so we certainly shouldn't rush to any conclusions about the real capabilities of WebGL just yet.
本文标签: javascriptwhat are the graphical limits WebGL and Threejs can handle gracefullyStack Overflow
版权声明:本文标题:javascript - what are the graphical limits WebGL and Three.js can handle gracefully? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744569469a2613252.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论