Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_SystemCocoa.mm
| Show First 20 Lines • Show All 683 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| GHOST_IWindow *GHOST_SystemCocoa::createWindow(const char *title, | GHOST_IWindow *GHOST_SystemCocoa::createWindow(const char *title, | ||||
| int32_t left, | int32_t left, | ||||
| int32_t top, | int32_t top, | ||||
| uint32_t width, | uint32_t width, | ||||
| uint32_t height, | uint32_t height, | ||||
| GHOST_TWindowState state, | GHOST_TWindowState state, | ||||
| GHOST_TDrawingContextType type, | |||||
| GHOST_GLSettings glSettings, | GHOST_GLSettings glSettings, | ||||
| const bool exclusive, | const bool exclusive, | ||||
| const bool is_dialog, | const bool is_dialog, | ||||
| const GHOST_IWindow *parentWindow) | const GHOST_IWindow *parentWindow) | ||||
| { | { | ||||
| GHOST_IWindow *window = NULL; | GHOST_IWindow *window = NULL; | ||||
| @autoreleasepool { | @autoreleasepool { | ||||
| Show All 13 Lines | @autoreleasepool { | ||||
| window = new GHOST_WindowCocoa(this, | window = new GHOST_WindowCocoa(this, | ||||
| title, | title, | ||||
| left, | left, | ||||
| bottom, | bottom, | ||||
| width, | width, | ||||
| height, | height, | ||||
| state, | state, | ||||
| type, | glSettings.context_type, | ||||
| glSettings.flags & GHOST_glStereoVisual, | glSettings.flags & GHOST_glStereoVisual, | ||||
| glSettings.flags & GHOST_glDebugContext, | glSettings.flags & GHOST_glDebugContext, | ||||
| is_dialog, | is_dialog, | ||||
| (GHOST_WindowCocoa *)parentWindow); | (GHOST_WindowCocoa *)parentWindow); | ||||
| if (window->getValid()) { | if (window->getValid()) { | ||||
| // Store the pointer to the window | // Store the pointer to the window | ||||
| GHOST_ASSERT(m_windowManager, "m_windowManager not initialized"); | GHOST_ASSERT(m_windowManager, "m_windowManager not initialized"); | ||||
| Show All 15 Lines | |||||
| /** | /** | ||||
| * Create a new off-screen context. | * Create a new off-screen context. | ||||
| * Never explicitly delete the context, use #disposeContext() instead. | * Never explicitly delete the context, use #disposeContext() instead. | ||||
| * \return The new context (or 0 if creation failed). | * \return The new context (or 0 if creation failed). | ||||
| */ | */ | ||||
| GHOST_IContext *GHOST_SystemCocoa::createOffscreenContext(GHOST_GLSettings glSettings) | GHOST_IContext *GHOST_SystemCocoa::createOffscreenContext(GHOST_GLSettings glSettings) | ||||
| { | { | ||||
| GHOST_Context *context = new GHOST_ContextCGL(false, NULL, NULL, NULL); | GHOST_Context *context = new GHOST_ContextCGL(false, NULL, NULL, NULL, glSettings.context_type); | ||||
| if (context->initializeDrawingContext()) | if (context->initializeDrawingContext()) | ||||
| return context; | return context; | ||||
| else | else | ||||
| delete context; | delete context; | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,208 Lines • Show Last 20 Lines | |||||