/** * 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()); }