diff options
author | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2014-10-08 00:46:19 +0400 |
---|---|---|
committer | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2014-10-08 00:47:32 +0400 |
commit | 8d084e8c8f48dd2f07d4a3fbd4a941a7bcc0dcfb (patch) | |
tree | 5bf15f4f74f3e5a307cfa3f734b2cd086dca69bd /intern/ghost/intern/GHOST_WindowCocoa.h | |
parent | a8705e99ee8ec9de2f25c3bac1e9895c2f98c224 (diff) |
Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowCocoa.h')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.h | 46 |
1 files changed, 8 insertions, 38 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h index b30f6a340ad..1b6e8e63178 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.h +++ b/intern/ghost/intern/GHOST_WindowCocoa.h @@ -42,6 +42,8 @@ @class CocoaWindow; @class CocoaOpenGLView; +@class NSCursor; +@class NSScreen; class GHOST_SystemCocoa; @@ -53,6 +55,7 @@ class GHOST_SystemCocoa; * which is called the gutter. * When OpenGL contexts are active, GHOST will use AGL_BUFFER_RECT to prevent * OpenGL drawing outside the reduced client rectangle. + * XXX jwilkins: This comment seems out of date since we neither use Carbon nor AGL * \author Maarten Gribnau * \date May 23, 2001 */ @@ -220,28 +223,8 @@ public: */ virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order); - /** - * Swaps front and back buffers of a window. - * \return A boolean success indicator. - */ - virtual GHOST_TSuccess swapBuffers(); - - /** - * Updates the drawing context of this window. Needed - * whenever the window is changed. - * \return Indication of success. - */ - GHOST_TSuccess updateDrawingContext(); - - /** - * Activates the drawing context of this window. - * \return A boolean success indicator. - */ - virtual GHOST_TSuccess activateDrawingContext(); - virtual void loadCursor(bool visible, GHOST_TStandardCursor cursor) const; - const GHOST_TabletData *GetTabletData() { return &m_tablet; @@ -278,19 +261,13 @@ public: bool getImmediateDraw(void) const { return m_immediateDraw; } protected: - /** - * Tries to install a rendering context in this window. - * \param type The type of rendering context installed. - * \return Indication as to whether installation has succeeded. - */ - virtual GHOST_TSuccess installDrawingContext(GHOST_TDrawingContextType type); /** - * Removes the current drawing context. - * \return Indication as to whether removal has succeeded. + * \param type The type of rendering context create. + * \return Indication of success. */ - virtual GHOST_TSuccess removeDrawingContext(); - + virtual GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type); + /** * Invalidates the contents of this window. * \return Indication of success. @@ -330,15 +307,9 @@ protected: /** The openGL view */ CocoaOpenGLView *m_openGLView; - /** The opgnGL drawing context */ - NSOpenGLContext *m_openGLContext; - /** The mother SystemCocoa class to send events */ GHOST_SystemCocoa *m_systemCocoa; - - /** The first created OpenGL context (for sharing display lists) */ - static NSOpenGLContext *s_firstOpenGLcontext; - + NSCursor *m_customCursor; GHOST_TabletData m_tablet; @@ -349,4 +320,3 @@ protected: }; #endif // __GHOST_WINDOWCOCOA_H__ - |