-
Notifications
You must be signed in to change notification settings - Fork 26
Improvements #29
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
Improvements #29
Changes from all commits
9f91c6d
571b76f
bd23d77
2dd602d
0e89183
4976e23
25e106e
56047c3
a045b96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| using System; | ||
| using System; | ||
| using System.Runtime.InteropServices; | ||
|
|
||
| namespace VulkanCore | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,7 +35,7 @@ internal DebugReportCallbackExt(Instance parent, | |
| }); | ||
| callbackHandle = Interop.GetFunctionPointerForDelegate(_callback); | ||
| } | ||
| createInfo.ToNative(out DebugReportCallbackCreateInfoExt.Native nativeCreateInfo, callbackHandle); | ||
| createInfo.ToNative(out DebugReportCallbackCreateInfoExt.Native nativeCreateInfo, callbackHandle); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| long handle; | ||
| Result result = vkCreateDebugReportCallbackEXT(Parent)(Parent, &nativeCreateInfo, NativeAllocator, &handle); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -307,7 +307,7 @@ public unsafe struct ApplicationInfo | |
| /// The unsigned integer variable containing the developer-supplied version | ||
| /// number of the application. | ||
| /// </summary> | ||
| public int ApplicationVersion; | ||
| public Version ApplicationVersion; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I never realized these values were using the |
||
| /// <summary> | ||
| /// The unicode string containing the name of the engine (if any) used to create the application. | ||
| /// </summary> | ||
|
|
@@ -316,7 +316,7 @@ public unsafe struct ApplicationInfo | |
| /// The unsigned integer variable containing the developer-supplied version | ||
| /// number of the engine used to create the application. | ||
| /// </summary> | ||
| public int EngineVersion; | ||
| public Version EngineVersion; | ||
| /// <summary> | ||
| /// The version of the Vulkan API against which the application expects to run. If <see | ||
| /// cref="ApiVersion"/> is <see cref="Version.Zero"/> the implementation must ignore it, | ||
|
|
@@ -350,8 +350,8 @@ public unsafe struct ApplicationInfo | |
| /// the major and minor versions of the instance must match those requested in <see cref="ApiVersion"/>. | ||
| /// </param> | ||
| public ApplicationInfo( | ||
| string applicationName = null, int applicationVersion = 0, | ||
| string engineName = null, int engineVersion = 0, | ||
| string applicationName = null, Version applicationVersion = default(Version), | ||
| string engineName = null, Version engineVersion = default(Version), | ||
| Version apiVersion = default(Version)) | ||
| { | ||
| ApplicationName = applicationName; | ||
|
|
@@ -370,7 +370,7 @@ internal struct Native | |
| public int ApplicationVersion; | ||
| public IntPtr EngineName; | ||
| public int EngineVersion; | ||
| public Version ApiVersion; | ||
| public int ApiVersion; | ||
|
|
||
| public void Free() | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,5 +62,10 @@ public Version(int major, int minor, int patch) | |
| /// A shorthand for writing <c>new Version(0, 0, 0)</c>. | ||
| /// </summary> | ||
| public static Version Zero => new Version(0, 0, 0); | ||
|
|
||
| public static implicit operator int(Version version) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this implicit conversion useful?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't hurt and for debug purpose is good |
||
| { | ||
| return version._value; | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,10 @@ | |
|
|
||
| namespace VulkanCore | ||
| { | ||
| internal static class VulkanLibrary | ||
| /// <summary> | ||
| /// Static vulkan library loaded from host platform. | ||
| /// </summary> | ||
| public static class VulkanLibrary | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good idea to make it public if it's useful outside this library. |
||
| { | ||
| private static readonly IntPtr _handle; | ||
|
|
||
|
|
||
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.
Great addition 👍