/** * Delete any textures from the card that have been recently garbage collected in Java. If a deleter is passed in, * gc'd textures that are part of the currently active context (if one is active) will be deleted immediately. If a * deleter is not passed in, we do not have an active context, or we encounter gc'd textures that are not part of * the current context, then we will queue those textures to be deleted later using the GameTaskQueueManager. * * @param deleter * if not null, this renderer will be used to immediately delete any gc'd textures in the currently * active context. All other gc'd textures will be queued to delete in their own contexts. */ public static void cleanExpiredTextures(final Renderer deleter) { cleanExpiredTextures(deleter, null); }
/** * Delete any textures from the card that have been recently garbage collected in Java. If a deleter is passed in, * gc'd textures that are part of the currently active context (if one is active) will be deleted immediately. If a * deleter is not passed in, we do not have an active context, or we encounter gc'd textures that are not part of * the current context, then we will queue those textures to be deleted later using the GameTaskQueueManager. * * @param utils * if not null, this will be used to immediately delete any gc'd textures in the currently active * context. All other gc'd textures will be queued to delete in their own contexts. */ public static void cleanExpiredTextures(final ITextureUtils utils) { cleanExpiredTextures(utils, null); }
/** * Handle detecting and scheduling cleanup of OpenGL assets. This method will place delete calls on the task queue * of appropriate RenderContexts when an asset such as a Texture is determined to no longer be reachable by Java. * * @param immediateDelete * an optional Renderer to use for immediate cleanup when the asset is owned by the current context. In * general this is best used in single context applications, and null is a perfectly acceptable value. */ public static void doRuntimeCleanup(final Renderer immediateDelete) { TextureManager.cleanExpiredTextures(immediateDelete, null); AbstractBufferData.cleanExpiredVBOs(immediateDelete); DisplayListDelegate.cleanExpiredDisplayLists(immediateDelete); }
/** * Handle detecting and scheduling cleanup of OpenGL assets. This method will place delete calls on the task queue * of appropriate RenderContexts when an asset such as a Texture is determined to no longer be reachable by Java. * * @param renderer * an optional Renderer to use for immediate cleanup when the asset is owned by the current context. In * general this is best used in single context applications, and null is a perfectly acceptable value. */ public static void doRuntimeCleanup(final Renderer renderer) { TextureManager.cleanExpiredTextures(renderer.getTextureUtils(), null); AbstractBufferData.cleanExpiredVBOs(renderer.getShaderUtils()); }