Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_ContextCGL.mm
| Show First 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | |||||
| #ifdef GHOST_WAIT_FOR_VSYNC | #ifdef GHOST_WAIT_FOR_VSYNC | ||||
| { | { | ||||
| GLint swapInt = 1; | GLint swapInt = 1; | ||||
| /* Wait for vertical-sync, to avoid tearing artifacts. */ | /* Wait for vertical-sync, to avoid tearing artifacts. */ | ||||
| [m_openGLContext setValues:&swapInt forParameter:NSOpenGLCPSwapInterval]; | [m_openGLContext setValues:&swapInt forParameter:NSOpenGLCPSwapInterval]; | ||||
| } | } | ||||
| #endif | #endif | ||||
| initContextGLEW(); | |||||
| if (m_metalView) { | if (m_metalView) { | ||||
| if (m_defaultFramebuffer == 0) { | if (m_defaultFramebuffer == 0) { | ||||
| /* Create a virtual frame-buffer. */ | /* Create a virtual frame-buffer. */ | ||||
| [m_openGLContext makeCurrentContext]; | [m_openGLContext makeCurrentContext]; | ||||
| metalInitFramebuffer(); | metalInitFramebuffer(); | ||||
| initClearGL(); | initClearGL(); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines | |||||