![](/img/trans.png)
[英]How to create a cube map array texture from individual cube map textures in OpenGL 4.5?
[英]How I can create a texture atlas in OpenGL with other existing textures?
我想從 memory 中已經加載的一些紋理生成紋理圖集。
我想包含在圖集中的紋理是在運行時按程序生成的,所以我不能只創建一個已經包含它們的 png tilemap。
這可能與 OpenGL 有關嗎?
使用glTexImage2D
創建一個足夠大的紋理,並使用glTexSubImage2D
將 100 個小正方形紋理放入其中。 glTexSubImage2D
允許指定目標紋理中的 x 和 y 偏移量以及圖塊的大小(寬度和高度)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.