diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-02-26 21:10:15 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-02-26 21:10:15 +0300 |
commit | 0940e89e604d85d717f792b73e30e5e96a42e7c6 (patch) | |
tree | 4160e3fe1477cb9644fe2fc9163c4dffc31a5a86 /intern/ghost/GHOST_ISystem.h | |
parent | d6df23d9d96bfefb6a0a0f3979d3440d0fef05cc (diff) |
GHOST: Add new interface to manage offscreen contexts.
Offscreen contexts are not attached to a window and can only be used for rendering to frambuffer objects.
CGL implementation : Brecht Van Lommel (brecht)
GLX implementation : Clément Foucault (fclem)
WGL implementation : Germano Cavalcante (mano-wii)
Other implementation are just place holder for now.
Diffstat (limited to 'intern/ghost/GHOST_ISystem.h')
-rw-r--r-- | intern/ghost/GHOST_ISystem.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h index 03193d6e1da..5c5590ef069 100644 --- a/intern/ghost/GHOST_ISystem.h +++ b/intern/ghost/GHOST_ISystem.h @@ -36,6 +36,7 @@ #define __GHOST_ISYSTEM_H__ #include "GHOST_Types.h" +#include "GHOST_IContext.h" #include "GHOST_ITimerTask.h" #include "GHOST_IWindow.h" @@ -262,6 +263,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. * \return Indication of validity. |