aboutsummaryrefslogtreecommitdiffstatsci
path: root/vulkan/StructTypeAttribute.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-12-07 03:51:58 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-12-07 03:51:58 +0100
commit2af048902ea6952eaac368b8880788214f2e95af (patch)
tree00e0e958232227f9a8b750c2cbaa19c1f5a3a279 /vulkan/StructTypeAttribute.cs
parent6571d8e5bfc0593afb466e2fced7a2db43bc13e2 (diff)
tell rewriter to set the stype property to ensure it's always the good one
Diffstat (limited to 'vulkan/StructTypeAttribute.cs')
-rw-r--r--vulkan/StructTypeAttribute.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/vulkan/StructTypeAttribute.cs b/vulkan/StructTypeAttribute.cs
new file mode 100644
index 0000000..55f8177
--- /dev/null
+++ b/vulkan/StructTypeAttribute.cs
@@ -0,0 +1,20 @@
+// Copyright (c) 2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+using System;
+
+namespace Vulkan
+{
+ /// <summary>
+ /// tel the rewriter to automatically set the structure type
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
+ public class StructureTypeAttribute : Attribute
+ {
+ int structureType;
+ public StructureTypeAttribute (int value) : base() {
+ structureType = value;
+ }
+ public int StructureType => structureType;
+ }
+}