Implement asynchronous loading.

This commit is contained in:
2018-04-12 16:58:57 +02:00
parent 265bc61b98
commit 73cdb7f36f

View File

@@ -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: