Skip to content

Commit

Permalink
Merge pull request #12 from tomhog/master
Browse files Browse the repository at this point in the history
Compiled on Windows
  • Loading branch information
vsg-dev authored Nov 24, 2018
2 parents 2939b66 + 86d5e64 commit 33350c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/vsg/viewer/Win32_Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Win32_Window::Result Win32_Window::create(const Traits& traits, bool debugLayer,
if (traits.shareWindow)
{
// create surface
vsg::ref_ptr<vsg::Surface> surface(new vsg::Win32Surface(traits.shareWindow->instance(), hwnd, allocator));
vsg::ref_ptr<vsg::Surface> surface(new vsgWin32::Win32Surface(traits.shareWindow->instance(), hwnd, allocator));

window = new Win32_Window(hwnd, traits.shareWindow->instance(), traits.shareWindow->surface(), traits.shareWindow->physicalDevice(), traits.shareWindow->device(), traits.shareWindow->renderPass(), traits.shareWindow->debugLayersEnabled());

Expand Down Expand Up @@ -194,7 +194,7 @@ Win32_Window::Result Win32_Window::create(const Traits& traits, bool debugLayer,
if (!instance) return Result("Error: vsg::Win32_Window::create(...) failed to create Window, unable to create Vulkan instance.", VK_ERROR_INVALID_EXTERNAL_HANDLE);

// use GLFW to create surface
vsg::ref_ptr<vsg::Surface> surface(new vsg::Win32Surface(instance, hwnd, allocator));
vsg::ref_ptr<vsg::Surface> surface(new vsgWin32::Win32Surface(instance, hwnd, allocator));
if (!surface) return Result("Error: vsg::Win32_Window::create(...) failed to create Window, unable to create Win32Surface.", VK_ERROR_INVALID_EXTERNAL_HANDLE);

// set up device
Expand Down
2 changes: 1 addition & 1 deletion src/vsg/viewer/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ namespace vsg
Window::Result Window::create(const Window::Traits& traits, bool debugLayer, bool apiDumpLayer, vsg::AllocationCallbacks* allocator)
{
#ifdef _WIN32
ref_ptr<vsg::Window> window = vsg::Win32_Window::create(traits, debugLayer, apiDumpLayer, allocator);
ref_ptr<vsg::Window> window = vsgWin32::Win32_Window::create(traits, debugLayer, apiDumpLayer, allocator);
#else
ref_ptr<vsg::Window> window = glfw::GLFW_Window::create(traits.width, traits.height, debugLayer, apiDumpLayer, traits.shareWindow, allocator);
#endif
Expand Down
6 changes: 3 additions & 3 deletions src/vsg/vk/Extensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ bool vsg::isExtensionSupported(const char* extensionName)
bool vsg::isExtensionListSupported(const Names& extensionList)
{
ExtensionProperties extProps = getExtensionProperties();
for (auto prop : extProps)
for (auto ext : extensionList)
{
auto compare = [&](const char* rhs) { return strcmp(prop.extensionName, rhs)==0; };
if (std::find_if(extensionList.begin(), extensionList.end(), compare) == extensionList.end()) return false;
auto compare = [&](const VkExtensionProperties& rhs) { return strcmp(ext, rhs.extensionName)==0; };
if (std::find_if(extProps.begin(), extProps.end(), compare) == extProps.end()) return false;
}
return true;
}

0 comments on commit 33350c0

Please sign in to comment.