diff options
Diffstat (limited to 'intern/ghost/GHOST_C-api.h')
-rw-r--r-- | intern/ghost/GHOST_C-api.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 55a56b1b09f..071474e57dc 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -52,6 +52,7 @@ GHOST_DECLARE_HANDLE(GHOST_WindowHandle); GHOST_DECLARE_HANDLE(GHOST_EventHandle); GHOST_DECLARE_HANDLE(GHOST_RectangleHandle); GHOST_DECLARE_HANDLE(GHOST_EventConsumerHandle); +GHOST_DECLARE_HANDLE(GHOST_ContextHandle); /** @@ -189,6 +190,23 @@ extern GHOST_WindowHandle GHOST_CreateWindow( GHOST_GLSettings glSettings); /** + * Create a new offscreen context. + * Never explicitly delete the context, use disposeContext() instead. + * \param systemhandle The handle to the system + * \return A handle to the new context ( == NULL if creation failed). + */ +extern GHOST_ContextHandle GHOST_CreateOpenGLContext(GHOST_SystemHandle systemhandle); + +/** + * Dispose of a context. + * \param systemhandle The handle to the system + * \param contexthandle Handle to the context to be disposed. + * \return Indication of success. + */ +extern GHOST_TSuccess GHOST_DisposeOpenGLContext(GHOST_SystemHandle systemhandle, + GHOST_ContextHandle contexthandle); + +/** * Returns the window user data. * \param windowhandle The handle to the window * \return The window user data. @@ -711,6 +729,20 @@ extern GHOST_TSuccess GHOST_ActivateWindowDrawingContext(GHOST_WindowHandle wind extern GHOST_TSuccess GHOST_InvalidateWindow(GHOST_WindowHandle windowhandle); /** + * Activates the drawing context of this context. + * \param contexthandle The handle to the context + * \return A success indicator. + */ +extern GHOST_TSuccess GHOST_ActivateOpenGLContext(GHOST_ContextHandle contexthandle); + +/** + * Release the drawing context bound to this thread. + * \param contexthandle The handle to the context + * \return A success indicator. + */ +extern GHOST_TSuccess GHOST_ReleaseOpenGLContext(GHOST_ContextHandle contexthandle); + +/** * Returns the status of the tablet * \param windowhandle The handle to the window * \return Status of tablet |