Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_WindowX11.cpp
| Show All 18 Lines | |||||
| #include "GHOST_utildefines.h" | #include "GHOST_utildefines.h" | ||||
| #ifdef WITH_XDND | #ifdef WITH_XDND | ||||
| # include "GHOST_DropTargetX11.h" | # include "GHOST_DropTargetX11.h" | ||||
| #endif | #endif | ||||
| #include "GHOST_ContextEGL.h" | #include "GHOST_ContextEGL.h" | ||||
| #include "GHOST_ContextGLX.h" | #include "GHOST_ContextGLX.h" | ||||
| #ifdef WITH_VULKAN_BACKEND | |||||
| # include "GHOST_ContextVK.h" | |||||
| #endif | |||||
| /* For #XIWarpPointer. */ | /* For #XIWarpPointer. */ | ||||
| #ifdef WITH_X11_XINPUT | #ifdef WITH_X11_XINPUT | ||||
| # include <X11/extensions/XInput2.h> | # include <X11/extensions/XInput2.h> | ||||
| #endif | #endif | ||||
| /* For DPI value. */ | /* For DPI value. */ | ||||
| #include <X11/Xresource.h> | #include <X11/Xresource.h> | ||||
| ▲ Show 20 Lines • Show All 1,188 Lines • ▼ Show 20 Lines | static GHOST_Context *create_glx_context(Window window, | ||||
| } | } | ||||
| delete context; | delete context; | ||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type) | GHOST_Context *GHOST_WindowX11::newDrawingContext(GHOST_TDrawingContextType type) | ||||
| { | { | ||||
| #if defined(WITH_VULKAN) | |||||
| if (type == GHOST_kDrawingContextTypeVulkan) { | |||||
| GHOST_Context *context = new GHOST_ContextVK(m_wantStereoVisual, | |||||
| GHOST_kVulkanPlatformX11, | |||||
| m_window, | |||||
| m_display, | |||||
| NULL, | |||||
| NULL, | |||||
| 1, | |||||
| 0, | |||||
| m_is_debug_context); | |||||
| if (!context->initializeDrawingContext()) { | |||||
| delete context; | |||||
| return nullptr; | |||||
| } | |||||
| return context; | |||||
| } | |||||
| #endif | |||||
| if (type == GHOST_kDrawingContextTypeOpenGL) { | if (type == GHOST_kDrawingContextTypeOpenGL) { | ||||
| /* 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: | ||||
| ▲ Show 20 Lines • Show All 406 Lines • Show Last 20 Lines | |||||