From 73cdb7f36f654032106eff031035970955376724 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Thu, 12 Apr 2018 16:58:57 +0200 Subject: [PATCH] Implement asynchronous loading. --- src/fmri/Drawable.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/fmri/Drawable.hpp b/src/fmri/Drawable.hpp index 60f2b31..186d36d 100644 --- a/src/fmri/Drawable.hpp +++ b/src/fmri/Drawable.hpp @@ -5,6 +5,9 @@ namespace fmri { + /** + * Base class for anything to be drawn to the screen. + */ class Drawable { public: @@ -12,6 +15,14 @@ namespace fmri virtual void draw(float time) = 0; virtual void patchTransparancy(); + /** + * Do any GL related initialization. + * + * GL initialization cannot be done in a separate thread, which + * is where the constructor might be called. + * + * The default implementation does nothing. + */ virtual void glLoad(); protected: