问题
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