Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_SystemX11.cpp
| Show First 20 Lines • Show All 375 Lines • ▼ Show 20 Lines | GHOST_IWindow *GHOST_SystemX11::createWindow(const STR_String &title, | ||||
| return window; | return window; | ||||
| } | } | ||||
| /** | /** | ||||
| * Create a new offscreen context. | * Create a new offscreen 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_SystemX11::createOffscreenContext() | GHOST_IContext *GHOST_SystemX11::createOffscreenContext( | ||||
| GHOST_PlatformSupportCallbackPtr platform_support_callback) | |||||
| { | { | ||||
| // During development: | // During development: | ||||
| // try 4.x compatibility profile | // try 4.x compatibility profile | ||||
| // try 3.3 compatibility profile | // try 3.3 compatibility profile | ||||
| // fall back to 3.0 if needed | // fall back to 3.0 if needed | ||||
| // | // | ||||
| // Final Blender 2.8: | // Final Blender 2.8: | ||||
| // try 4.x core profile | // try 4.x core profile | ||||
| Show All 14 Lines | |||||
| #if defined(WITH_GL_PROFILE_CORE) | #if defined(WITH_GL_PROFILE_CORE) | ||||
| GLX_CONTEXT_CORE_PROFILE_BIT_ARB; | GLX_CONTEXT_CORE_PROFILE_BIT_ARB; | ||||
| #elif defined(WITH_GL_PROFILE_COMPAT) | #elif defined(WITH_GL_PROFILE_COMPAT) | ||||
| GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; | GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; | ||||
| #else | #else | ||||
| # error // must specify either core or compat at build time | # error // must specify either core or compat at build time | ||||
| #endif | #endif | ||||
| if (platform_support_callback) { | |||||
| char message[1024]; | |||||
| char link[1024]; | |||||
| GHOST_PlatformSupportDialogOptions dialog_options = platform_support_callback(message, link); | |||||
| if (dialog_options & GHOST_DialogExit) { | |||||
| return NULL; | |||||
| } | |||||
| } | |||||
| GHOST_Context *context; | GHOST_Context *context; | ||||
| for (int minor = 5; minor >= 0; --minor) { | for (int minor = 5; minor >= 0; --minor) { | ||||
| context = new GHOST_ContextGLX(false, | context = new GHOST_ContextGLX(false, | ||||
| (Window)NULL, | (Window)NULL, | ||||
| m_display, | m_display, | ||||
| (GLXFBConfig)NULL, | (GLXFBConfig)NULL, | ||||
| profile_mask, | profile_mask, | ||||
| ▲ Show 20 Lines • Show All 1,897 Lines • ▼ Show 20 Lines | GHOST_X11_ERROR_HANDLERS_OVERRIDE(handler_store); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| ici = (XAnyClassPtr)(((char *)ici) + ici->length); | ici = (XAnyClassPtr)(((char *)ici) + ici->length); | ||||
| } | } | ||||
| m_xtablets.push_back(xtablet); | m_xtablets.push_back(xtablet); | ||||
brecht: Warning to be silenced:
```
intern/ghost/intern/GHOST_SystemX11.cpp:2330:15: warning: ignoring… | |||||
| } | } | ||||
| } | } | ||||
| XFreeDeviceList(device_info); | XFreeDeviceList(device_info); | ||||
| } | } | ||||
| GHOST_X11_ERROR_HANDLERS_RESTORE(handler_store); | GHOST_X11_ERROR_HANDLERS_RESTORE(handler_store); | ||||
| } | } | ||||
| Show All 13 Lines | |||||
Warning to be silenced:
intern/ghost/intern/GHOST_SystemX11.cpp:2330:15: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] system(cmd.c_str()); ~~~~~~^~~~~~~~~~~~~