Release textures (GLKTextureInfo objects) allocated by GLKTextureLoader

后端 未结 3 979
北海茫月
北海茫月 2020-12-28 20:33

New to developing on iOS and in particular the new OpenGL related features on iOS 5, so I apologize if any of my questions are so basic.

The app I am working on is d

3条回答
  •  情歌与酒
    2020-12-28 20:50

    Super hacky solution I believe, but it seems to work:

    Add the following before the assignment:

    GLuint name = self.texture.name;
    glDeleteTextures(1, &name);
    

    If there's a more official way (or if this is the official way), I would appreciate if someone could let me know.

提交回复
热议问题