-
Notifications
You must be signed in to change notification settings - Fork 27
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
MacOS samples #18
MacOS samples #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a ton, @BastianBlokland! MacOS samples are super helpful 🎉
I left a couple notes regarding formatting (tabs vs spaces) but other than that, looking good to me.
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixed tabs and spaces; should be spaces only
new ClearScreenApp())) | ||
{ | ||
window.Initialize(); | ||
window.Run(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixed tabs and spaces
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixed tabs and spaces
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixed tabs and spaces
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixed tabs and spaces
Samples/Shared/MacOSWindow.cs
Outdated
private readonly VulkanApp _app; | ||
|
||
private NativeMacOS.NativeApp _nativeApp; | ||
private NativeMacOS.NativeWindow _nativeWindow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixed tabs and spaces
Src/VulkanLibrary.cs
Outdated
{ | ||
handle = LibDLGetProcAddress(_handle, procName); | ||
} | ||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mixed tabs and spaces
…om the 'libdl' dll import, this way it can load the .dylib on macos, this should still work on linux but havn't tested
…rm' format because 'R5G5B5A1UNormPack16' is not supported on MoltenVK
3a7b155
to
535b4c4
Compare
Thanks. Sorry for the tabs, we use tabs at the office and forgot that my editor was set to tabs 😅 Should be fixed now. |
Added basic port of the samples to MacOS running on the MoltenVK library. For window-management its using a thin objective-c layer. (source of native obj-c: https://github.com/BastianBlokland/macwindow-dotnet). Nothing close to production ready but it maybe its a start for someone who wants to make a c# vulkan renderer that runs on MacOS.