public static async void ApplyRenderResource(WebGLContext gl, Dictionary <string, TextureResource> textureResourceMap)
        {
            if (RenderKernel.textureResourceMap != null)
            {
                foreach (var resource in RenderKernel.textureResourceMap.Values.Where(x => x.IsValid))
                {
                    await gl.DeleteTextureAsync(resource.Texture);
                }
            }

            RenderKernel.textureResourceMap = textureResourceMap;
        }