سؤال

I have a huge list of 2D Textures that I load each time a map loads (Depending on the map and it's contents). I'm looking for a way to anyhow unbind a bound texture to reduce usage of memory. The bind texture function works perfect just don't see any function to unbind some ids or all of them.

هل كانت مفيدة؟

المحلول

try

glDeleteTextures(1, &texID)

This should remove texture from memory. Before that call be sure to unbind currect texture by simply calling:

glBindTexture(target, 0) // << default texture object

glDeleteTextures spec

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top