Do not recreate block info texture when selected index hasn't changed.

This commit is contained in:
UnknownShadow200 2015-06-24 17:54:02 +10:00
parent 1278d34c24
commit acf2c849dd

View file

@ -120,7 +120,11 @@ namespace ClassicalSharp {
}
}
int lastCreatedIndex = -1000;
void RecreateBlockInfoTexture() {
if( selectedIndex == lastCreatedIndex ) return;
lastCreatedIndex = selectedIndex;
GraphicsApi.DeleteTexture( ref blockInfoTexture );
if( selectedIndex == -1 ) return;