Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowCocoa.mm
| Show First 20 Lines • Show All 797 Lines • ▼ Show 20 Lines | GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order) | ||||
| [pool drain]; | [pool drain]; | ||||
| return GHOST_kSuccess; | return GHOST_kSuccess; | ||||
| } | } | ||||
| #pragma mark Drawing context | #pragma mark Drawing context | ||||
| GHOST_Context *GHOST_WindowCocoa::newDrawingContext(GHOST_TDrawingContextType type) | GHOST_Context *GHOST_WindowCocoa::newDrawingContext(GHOST_TDrawingContextType type) | ||||
| { | { | ||||
| if (type == GHOST_kDrawingContextTypeOpenGL) { | if (type == GHOST_kDrawingContextTypeOpenGL || type == GHOST_kDrawingContextTypeMetal) { | ||||
| GHOST_Context *context = new GHOST_ContextCGL( | GHOST_Context *context = new GHOST_ContextCGL( | ||||
| m_wantStereoVisual, m_metalView, m_metalLayer, m_openGLView); | m_wantStereoVisual, m_metalView, m_metalLayer, m_openGLView, 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 406 Lines • Show Last 20 Lines | |||||