简体   繁体   中英

OpenGL ES 2.0 - Copy Texture Data

I have an array of 2D textures initialized in OpenGL ES 2.0:

textures[10];

After I delete one of the textures at a given array index:

glDeleteTextures(1, &textures[5]);

How do I remove the empty gap left in my array, with relative ease, in order to keep things neat and tidy? Is there a more direct method other than rendering each texture and then using glGetTexImage as a way to change the order of the textures in the array?

The textures array is actually an array of 'names' represented by non-zero integers set by glGenTextures that represent texture locations on the GPU. As long as you keep track of the valid textures names and what your using them for you can sort the array any way you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM