-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check and report errors for Win32 functions that may fail #1255
Conversation
Skips a couple in the Win32_Window destructor. One will throw because of a bug that's on the tracker, so this should be temporary. The other's because there's a relatively benign failure as the API won't let you unregister a window class while there are still windows using it, which is what we want.
Thanks for the changes. I feel there is some more evolution of the code that is needed before merging with VSG master so I've merged as a branch: https://github.com/vsg-dev/VulkanSceneGraph/tree/AnyOldName3-check-win32-errors One of the changes I'm thinking about is changing the Win32_Window::resize() method so it only updates the _extend2D and calls buildSwapchain() when GetClientRect(..) return true. Another is moving the GetClientRect(..) usage in to within the Win32_Window::handleWin32Messages(..) into the blocks that actually need it rather than for all event messages. Your comment about vsg::Exception not supporting wide strings. One thing I've been wondering about is looking at changing vsg::Exception so it subclasses from one of the std exception classes and just adding to them. I don't know if that would aid with the whole widestring situation under Windows as I haven't looked into this topic in detail. |
Deriving from It's particularly annoying as you can't even blame Microsoft for the mess. They followed the Unicode Consortium's advice before UTF-8 had been invented and before they'd noticed there were more than 65536 unique letters in all human languages, so were all-in on 16-bit wide strings before Unix systems supported Unicode at all. |
The vsg::Path related functionality has functions for converting wstring to UTF8, could they be used in this context? |
Temporarily ignoring the fact that that conversion is broken (see #1133), the conversion itself isn't the tricky part, it's ensuring it happens in the right places and gets communicated to the people who need to know. It does look like lots of other bits of the VSG are working under the assumption that |
I'm closing this PR as I believe all the key functionality is merged in the https://github.com/vsg-dev/VulkanSceneGraph/tree/Win32_Window_Refinements branch. |
Skips a couple in the
Win32_Window
destructor. One will throw because of #1254, so this should be temporary. The other's because there's a relatively benign failure as the API won't let you unregister a window class while there are still windows using it, which is what we want.