Changeset View
Standalone View
intern/ghost/intern/GHOST_SystemWin32.cpp
| Show All 31 Lines | |||||
| #include "GHOST_EventKey.h" | #include "GHOST_EventKey.h" | ||||
| #include "GHOST_EventWheel.h" | #include "GHOST_EventWheel.h" | ||||
| #include "GHOST_TimerManager.h" | #include "GHOST_TimerManager.h" | ||||
| #include "GHOST_TimerTask.h" | #include "GHOST_TimerTask.h" | ||||
| #include "GHOST_WindowManager.h" | #include "GHOST_WindowManager.h" | ||||
| #include "GHOST_WindowWin32.h" | #include "GHOST_WindowWin32.h" | ||||
| #include "GHOST_ContextWGL.h" | #include "GHOST_ContextWGL.h" | ||||
| #ifdef WITH_VULKAN_BACKEND | |||||
| # include "GHOST_ContextVK.h" | |||||
| #endif | |||||
| #ifdef WITH_INPUT_NDOF | #ifdef WITH_INPUT_NDOF | ||||
| # include "GHOST_NDOFManagerWin32.h" | # include "GHOST_NDOFManagerWin32.h" | ||||
| #endif | #endif | ||||
| /* Key code values not found in `winuser.h`. */ | /* Key code values not found in `winuser.h`. */ | ||||
| #ifndef VK_MINUS | #ifndef VK_MINUS | ||||
| # define VK_MINUS 0xBD | # define VK_MINUS 0xBD | ||||
| ▲ Show 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | |||||
| * Create a new off-screen context. | * Create a new off-screen context. | ||||
| * Never explicitly delete the window, use #disposeContext() instead. | * Never explicitly delete the window, use #disposeContext() instead. | ||||
| * \return The new context (or 0 if creation failed). | * \return The new context (or 0 if creation failed). | ||||
| */ | */ | ||||
| GHOST_IContext *GHOST_SystemWin32::createOffscreenContext(GHOST_GLSettings glSettings) | GHOST_IContext *GHOST_SystemWin32::createOffscreenContext(GHOST_GLSettings glSettings) | ||||
| { | { | ||||
| const bool debug_context = (glSettings.flags & GHOST_glDebugContext) != 0; | const bool debug_context = (glSettings.flags & GHOST_glDebugContext) != 0; | ||||
| GHOST_Context *context; | GHOST_Context *context = nullptr; | ||||
| #ifdef WITH_VULKAN_BACKEND | |||||
| /* Vulkan does not need a window. */ | |||||
| if (glSettings.context_type == GHOST_kDrawingContextTypeVulkan) { | |||||
| context = new GHOST_ContextVK(false, (HWND)0, 1, 0, debug_context); | |||||
| if (!context->initializeDrawingContext()) { | |||||
| delete context; | |||||
| return nullptr; | |||||
| } | |||||
| return context; | |||||
| } | |||||
| #endif | |||||
| HWND wnd = CreateWindowA("STATIC", | HWND wnd = CreateWindowA("STATIC", | ||||
| "BlenderGLEW", | "BlenderGLEW", | ||||
| WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, | WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, | ||||
| 0, | 0, | ||||
| 0, | 0, | ||||
| 64, | 64, | ||||
| 64, | 64, | ||||
| ▲ Show 20 Lines • Show All 1,995 Lines • ▼ Show 20 Lines | config.pszMainIcon = (dialog_options & GHOST_DialogError ? TD_ERROR_ICON : | ||||
| dialog_options & GHOST_DialogWarning ? TD_WARNING_ICON : | dialog_options & GHOST_DialogWarning ? TD_WARNING_ICON : | ||||
| TD_INFORMATION_ICON); | TD_INFORMATION_ICON); | ||||
| config.pszWindowTitle = L"Blender"; | config.pszWindowTitle = L"Blender"; | ||||
| config.pszMainInstruction = title_16; | config.pszMainInstruction = title_16; | ||||
| config.pszContent = message_16; | config.pszContent = message_16; | ||||
| config.pButtons = (link) ? buttons : buttons + 1; | config.pButtons = (link) ? buttons : buttons + 1; | ||||
| config.cButtons = (link) ? 2 : 1; | config.cButtons = (link) ? 2 : 1; | ||||
| TaskDialogIndirect(&config, &nButtonPressed, NULL, NULL); | TaskDialogIndirect(&config, &nButtonPressed, NULL, NULL); | ||||
AgAmemnno: This function depends on comctrl32.dll version 6 or higher. Otherwise segmentation fault with… | |||||
Done Inline ActionsThanks for the remark. It isn't introduced by this patch so we should fix this upstream. Might want to discuss with developers what should happen with this code. on devtalk/blender chat. jbakker: Thanks for the remark.
It isn't introduced by this patch so we should fix this upstream. Might… | |||||
Done Inline ActionsWe select the right version through blenders manifest, we haven't seen a comctrl32 related error since this code landed, was this ordinal error actually observed or is this comment just general warning of "watch out here!" ? LazyDodo: We select the right version through blenders manifest, we haven't seen a comctrl32 related… | |||||
Done Inline ActionsI don't have version 6 of comctrl32.dll installed on my local computer, and AgAmemnno: I don't have version 6 of comctrl32.dll installed on my local computer, and
An ordinal error… | |||||
Done Inline Actionsi don't quite understand what you mean, however with a stock build of this diff with vulkan enabled i cannot reproduce the issue you are seeing in either blender LazyDodo: i don't quite understand what you mean, however with a stock build of this diff with vulkan… | |||||
Done Inline ActionsWhat I mean is simple, it's just that ordinal errors are confusing. What is our policy when it comes to loading Vulkan extensions? For example, I wrote a test for the difference between extensions in the validation layer for debugging. line:81 AgAmemnno: What I mean is simple, it's just that ordinal errors are confusing. What is our policy when it… | |||||
Done Inline ActionsThe policy for extension loading is still in discussion. The impact for this is also unclear jbakker: The policy for extension loading is still in discussion. The impact for this is also unclear
I… | |||||
| switch (nButtonPressed) { | switch (nButtonPressed) { | ||||
| case IDOK: | case IDOK: | ||||
| ShellExecute(NULL, "open", link, NULL, NULL, SW_SHOWNORMAL); | ShellExecute(NULL, "open", link, NULL, NULL, SW_SHOWNORMAL); | ||||
| break; | break; | ||||
| case IDCONTINUE: | case IDCONTINUE: | ||||
| break; | break; | ||||
| default: | default: | ||||
| break; /* Should never happen. */ | break; /* Should never happen. */ | ||||
| ▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines | |||||
This function depends on comctrl32.dll version 6 or higher. Otherwise segmentation fault with ordinal error.