better replace the last part with:
This way the global isn't interfering with "real" code globals
You then just need to replace fd_texlist.remove () above with fdtexdata.fd_texlist.remove ()
'Shared texture info Type fdtexdata 'List of loaded textures Global fd_texlist Field ID% Field refcount%=1 Field filename$ Method New() if fd_texlist = null fd_texlist = new TList 'Add to texture list fd_texlist.AddLast(Self) End Method 'Clean up method Method Delete() 'Delete texture gldeletetextures 1,Varptr ID End Method End Type
This way the global isn't interfering with "real" code globals
You then just need to replace fd_texlist.remove () above with fdtexdata.fd_texlist.remove ()