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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
/**
|
||||
@@ -188,6 +189,23 @@ extern GHOST_WindowHandle GHOST_CreateWindow(
|
||||
GHOST_TDrawingContextType type,
|
||||
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
|
||||
@@ -710,6 +728,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
|
||||
|
||||
Reference in New Issue
Block a user