Skip to content
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

The Triangle example for UWP? #15

Open
JimSEOW opened this issue Sep 7, 2016 · 10 comments
Open

The Triangle example for UWP? #15

JimSEOW opened this issue Sep 7, 2016 · 10 comments
Assignees

Comments

@JimSEOW
Copy link

JimSEOW commented Sep 7, 2016

I tried other Vulkan c# at github, SharpVK is the only one that make the sample run in windows 10

Request for an UWP app sample :-)

@FacticiusVir
Copy link
Owner

I've got a work item to move the examples to a more portable windowing library, though I was looking at something like GLFW for Windows/Linux compatibility. I'd need to investigate whether it's possible to support Vulkan in a UWP application; do you need that platform specifically?

@FacticiusVir FacticiusVir self-assigned this Sep 7, 2016
@FacticiusVir FacticiusVir added this to the 0.2.4 milestone Sep 7, 2016
@FacticiusVir
Copy link
Owner

A very crude port of SharpVk (and its dependency, GlmSharp) is now available in the UWP branch, along with a reworking of the HelloTriangle sample (SharpVk.HelloTriangle.Uwp) - https://github.com/FacticiusVir/SharpVk/tree/UWP

However, while the code runs and returns success codes the image is not rendered to the UWP window. I can't find any significant mention on the Internet of people getting Vulkan to run under UWP, so I'd strongly suggest looking at alternate application types (the samples use WinForms, but GLFW or WPF/Xaml apps should work just as well) if you want to use that API specifically; in the meantime I will do more research and see if I can make any further progress, but the code is uploaded to the branch if you want to check it out and see if you can spot something I've missed.

@JimSEOW
Copy link
Author

JimSEOW commented Sep 9, 2016

I download the UWP branch and compiled and deployed but it does not run.
You are right, there is very little info right now on Vulkan for UWP (PC) and even mobile (ARM) and how the graphics drivers will and will not support. Thanks for the effort.

The other 3D engine I am currently experimenting is UrhoSharp, which is now being ported to UWP Hololens

Thanks for responding to the request.

@FacticiusVir FacticiusVir modified the milestones: 0.3.1, 0.2.4 Sep 12, 2016
@FacticiusVir
Copy link
Owner

@krOoze has opened an issue at KhronosGroup/Vulkan-Docs#366 discussing a specific WSI extension for UWP SwapChains.

@JimSEOW
Copy link
Author

JimSEOW commented Jul 5, 2017

@FacticiusVir SkiaSharp now working on Vulkan

@FacticiusVir
Copy link
Owner

Okay; I've had a look at their samples, and their UWP sample doesn't support the Vulkan backend. Currently there is no WSI integration for rendering from Vulkan to UWP - you might be able to use the newer External Memory extensions to render from Vulkan to DirectX, then present from DirectX to UWP, but that's a outside the scope of a sample and support for those extensions is (to my knowledge) limited.

@realvictorprm
Copy link

I would wonder if Microsoft supports Vulkan because of DX, also if you go with UWP there's no reason to use Vulkan (because I guess the code will be already very windows specific) and so I rather suggest to use DX12

@JimSEOW
Copy link
Author

JimSEOW commented Jul 5, 2017

@FacticiusVir Now there are SwapChainPanel example how to do XAML interop with (DirectX12) and (OpenGLES using Microsoft Angle) in both C++ and c#.

What could the problem? getting HWND from UWP?

@FacticiusVir
Copy link
Owner

The HWND isn't enough; that's the approach used in my original trial branch. You can output to a DirectX12 texture using VK_KHX_external_memory_win32 and then use DX12 to render to the SwapChainPanel, but there's no other case I've seen where someone renders direct to UWP through the Vulkan API.

@JimSEOW
Copy link
Author

JimSEOW commented Jul 9, 2017

@FacticiusVir here is a C# port of DirectX11 VS2015 template using SwapchainPanel XAML interop
I think port this sample to Direct12 should not be a problem.
Do you think this is a good start or do you think you need more for VK_KHX_external_memory_win32?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants