Merge branch 'master' into blender2.8
[blender.git] / intern / ghost / GHOST_ISystem.h
index a6f92d4..1a6c0f9 100644 (file)
@@ -36,6 +36,7 @@
 #define __GHOST_ISYSTEM_H__
 
 #include "GHOST_Types.h"
+#include "GHOST_IContext.h"
 #include "GHOST_ITimerTask.h"
 #include "GHOST_IWindow.h"
 
@@ -261,6 +262,20 @@ public:
         */
        virtual GHOST_TSuccess disposeWindow(GHOST_IWindow *window) = 0;
 
+       /**
+        * Create a new offscreen context.
+        * Never explicitly delete the context, use disposeContext() instead.
+        * \return  The new context (or 0 if creation failed).
+        */
+       virtual GHOST_IContext *createOffscreenContext() = 0;
+
+       /**
+        * Dispose of a context.
+        * \param   context Pointer to the context to be disposed.
+        * \return  Indication of success.
+        */
+       virtual GHOST_TSuccess disposeContext(GHOST_IContext *context) = 0;
+
        /**
         * Returns whether a window is valid.
         * \param   window Pointer to the window to be checked.