Do I need to delete textures in GLSurfaceView?

After creating textures in Android OpenGL ES, do I need to explicitly delete these textures later using glDeleteTextures ()? If so, how do I set up a callback for this?

Thanks in advance

+3
source share
2 answers

No, they are automatically deleted as soon as you are removed from your application. The big mistake is to ignore texture identifiers if your application becomes active again - remember this when your onSurfaceChangedis called again.

+2
source

, glDeleteTextures(), .

, EboMike, , ; , -, glDeleteTextures() finalize(), - int "contextId", GL (.. onSurfaceCreated); contextId , , , ( , ).

+4

Source: https://habr.com/ru/post/1776802/


All Articles