From 109a14a11223a01edbe606e6c1799c04676ca3a4 Mon Sep 17 00:00:00 2001 From: Nils Bruenggel Date: Thu, 15 Jul 2021 23:05:03 +0200 Subject: sokol_fetch docs fix The TL;DR instructions should also mention that you need to call sfetch_dowork(). --- sokol_fetch.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sokol_fetch.h') diff --git a/sokol_fetch.h b/sokol_fetch.h index a8c76315..9ff62d3d 100644 --- a/sokol_fetch.h +++ b/sokol_fetch.h @@ -118,9 +118,15 @@ } } - (4) finally, call sfetch_shutdown() at the end of the application: + (4) pump the sokol-fetch message queues, and invoke response callbacks + by calling: - sfetch_shutdown() + sfetch_dowork(); + + In an event-driven app this should be called in the event loop. If you + use sokol-app this would be in your frame_cb function. + + (5) finally, call sfetch_shutdown() at the end of the application: There's many other loading-scenarios, for instance one doesn't have to provide a buffer upfront, this can also happen in the response callback. -- cgit v1.2.3