Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-02-26 21:10:15 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-02-26 21:10:15 +0300
commit0940e89e604d85d717f792b73e30e5e96a42e7c6 (patch)
tree4160e3fe1477cb9644fe2fc9163c4dffc31a5a86 /intern/ghost/GHOST_C-api.h
parentd6df23d9d96bfefb6a0a0f3979d3440d0fef05cc (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_C-api.h')
-rw-r--r--intern/ghost/GHOST_C-api.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index 967d3f58143..d5d8be7db8e 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