namespace Sandbox.Rendering; /// /// Gives global access to the texture streaming system. /// public static class TextureStreaming { static bool disabledStreaming; /// /// Run a block of code with texture streaming disabled /// public static void ExecuteWithDisabled( Action action ) { var prev = disabledStreaming; disabledStreaming = true; g_pRenderDevice.SetForcePreloadStreamingData( true ); try { action(); } finally { disabledStreaming = prev; g_pRenderDevice.SetForcePreloadStreamingData( prev ); } } }