Efficiency comparison between invididual textures and a texture sheet in OpenGL ES

两盒软妹~` 提交于 2020-01-06 08:36:32

问题


It's generally regarded that using a big texture 'image' full of many smaller textures (think font sheets) is faster than having each texture separate. How big is the improvement in performance? Would it be noticeably faster or will it be a minor improvement?


回答1:


Would it be noticeably faster or will it be a minor improvement?

It depends on how many textures you are using. If you have few textures, you can be fine with separate textures. If you are making a big world containing of lots of textures (really many), then atlas texture is a suitable solution.

It is all because OpenGL is a state machine, and every change on the state machine costs. Doing many glBindTexture() calls are costly, so just compare it with how many textures you have.



来源:https://stackoverflow.com/questions/6636494/efficiency-comparison-between-invididual-textures-and-a-texture-sheet-in-opengl

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