What are the capabilities of canvas vs openGL?

[亡魂溺海] 提交于 2020-01-04 07:53:09

问题


I know that openGL works wonders if you send textures to it that are static and rarely change for example like tiles. But not when you have constantly changing sprites?

Is it possible to create games like abduction purely from canvas and what would be its performance?


回答1:


It is possible to create games like abduction using canvas, however eventually you are going to hit a stumbling block in terms of performance.

OpenGL whether moving or static will handle images exponentially faster, by accessing buffers and pixel processors on the gc capable of manipulating large arrays of pixels at once.

However OpenGL isn't easy it will take time to learn, and you will need to learn it's language. This said you will find tons of information on using openGL, I highly recommend the Lightweight Java Game Library (LWJGL) http://lwjgl.org/ and NeHe tutorials http://nehe.gamedev.net/.

Anyway take a look see what you think, it'll be hard but as with all hard work it'll pay off eventually.

Hope this helps.



来源:https://stackoverflow.com/questions/9365538/what-are-the-capabilities-of-canvas-vs-opengl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!