Skip to content

Commit ff35bea

Browse files
authored
This is the April 2024 Update (v2.21.0) (#2115)
* Fix #2026 * Fix #2000, closes #2005 * Fix #2010 * Fix added AL bug (good thing we had tests!) * Fix #1500 * Undo any unintentional changes * Add nint overloads for things like VertexAttribPointer * Fix build errors * Add more standard cursor shapes * Upversion natives where necessary * Patch notes for 2.21 * Reorder literally a single line * Incorporate #2143/#2066/#2090 in patch notes * Implement IsExtensionPresent for WGL * nit * OpenXR updates? * Fix flawed constant parsing for Vk/XR * Add openxr to patch notes * Update patch notes for 2.21
1 parent 0e8e039 commit ff35bea

File tree

174 files changed

+6339
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+6339
-134
lines changed

Silk.NET.sln

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorld", "examples\CSha
610610
EndProject
611611
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.NV", "src\OpenXR\Extensions\Silk.NET.OpenXR.Extensions.NV\Silk.NET.OpenXR.Extensions.NV.csproj", "{34D35A41-E974-40C9-8888-3510A0F074AA}"
612612
EndProject
613+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.LEIA", "src\OpenXR\Extensions\Silk.NET.OpenXR.Extensions.LEIA\Silk.NET.OpenXR.Extensions.LEIA.csproj", "{B70533BB-FB84-4BC3-888C-88E5F40FD22D}"
614+
EndProject
615+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.ANDROIDX", "src\OpenXR\Extensions\Silk.NET.OpenXR.Extensions.ANDROIDX\Silk.NET.OpenXR.Extensions.ANDROIDX.csproj", "{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}"
616+
EndProject
617+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Silk.NET.OpenXR.Extensions.ANDROIDSYS", "src\OpenXR\Extensions\Silk.NET.OpenXR.Extensions.ANDROIDSYS\Silk.NET.OpenXR.Extensions.ANDROIDSYS.csproj", "{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}"
618+
EndProject
613619
Global
614620
GlobalSection(SolutionConfigurationPlatforms) = preSolution
615621
Debug|Any CPU = Debug|Any CPU
@@ -3715,6 +3721,42 @@ Global
37153721
{34D35A41-E974-40C9-8888-3510A0F074AA}.Release|x64.Build.0 = Release|Any CPU
37163722
{34D35A41-E974-40C9-8888-3510A0F074AA}.Release|x86.ActiveCfg = Release|Any CPU
37173723
{34D35A41-E974-40C9-8888-3510A0F074AA}.Release|x86.Build.0 = Release|Any CPU
3724+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3725+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Debug|Any CPU.Build.0 = Debug|Any CPU
3726+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Debug|x64.ActiveCfg = Debug|Any CPU
3727+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Debug|x64.Build.0 = Debug|Any CPU
3728+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Debug|x86.ActiveCfg = Debug|Any CPU
3729+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Debug|x86.Build.0 = Debug|Any CPU
3730+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Release|Any CPU.ActiveCfg = Release|Any CPU
3731+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Release|Any CPU.Build.0 = Release|Any CPU
3732+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Release|x64.ActiveCfg = Release|Any CPU
3733+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Release|x64.Build.0 = Release|Any CPU
3734+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Release|x86.ActiveCfg = Release|Any CPU
3735+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D}.Release|x86.Build.0 = Release|Any CPU
3736+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3737+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
3738+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Debug|x64.ActiveCfg = Debug|Any CPU
3739+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Debug|x64.Build.0 = Debug|Any CPU
3740+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Debug|x86.ActiveCfg = Debug|Any CPU
3741+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Debug|x86.Build.0 = Debug|Any CPU
3742+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
3743+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Release|Any CPU.Build.0 = Release|Any CPU
3744+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Release|x64.ActiveCfg = Release|Any CPU
3745+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Release|x64.Build.0 = Release|Any CPU
3746+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Release|x86.ActiveCfg = Release|Any CPU
3747+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C}.Release|x86.Build.0 = Release|Any CPU
3748+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3749+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
3750+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Debug|x64.ActiveCfg = Debug|Any CPU
3751+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Debug|x64.Build.0 = Debug|Any CPU
3752+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Debug|x86.ActiveCfg = Debug|Any CPU
3753+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Debug|x86.Build.0 = Debug|Any CPU
3754+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
3755+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|Any CPU.Build.0 = Release|Any CPU
3756+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x64.ActiveCfg = Release|Any CPU
3757+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x64.Build.0 = Release|Any CPU
3758+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x86.ActiveCfg = Release|Any CPU
3759+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5}.Release|x86.Build.0 = Release|Any CPU
37183760
EndGlobalSection
37193761
GlobalSection(SolutionProperties) = preSolution
37203762
HideSolutionNode = FALSE
@@ -4012,6 +4054,9 @@ Global
40124054
{FD0C9C4B-3777-4755-A87B-60FE65D92750} = {6842A2C6-5C7B-42DD-9825-0EDE91BFEBF7}
40134055
{9CB90BB8-946F-4962-9365-A97BF5C6550A} = {FD0C9C4B-3777-4755-A87B-60FE65D92750}
40144056
{34D35A41-E974-40C9-8888-3510A0F074AA} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
4057+
{B70533BB-FB84-4BC3-888C-88E5F40FD22D} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
4058+
{25ABCA5E-4FF6-43ED-9A5E-443E1373EC5C} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
4059+
{01B6FFA0-5B37-44EA-ABDF-7BABD05874C5} = {90471225-AC23-424E-B62E-F6EC4C6ECAC0}
40154060
EndGlobalSection
40164061
GlobalSection(ExtensibilityGlobals) = postSolution
40174062
SolutionGuid = {F5273D7F-3334-48DF-94E3-41AE6816CD4D}

build/cache/gl.json.gz

0 Bytes
Binary file not shown.

build/cache/glcore.json.gz

0 Bytes
Binary file not shown.

build/cache/gles2.json.gz

0 Bytes
Binary file not shown.

build/props/common.props

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,49 @@
1212
<LangVersion>10</LangVersion>
1313
<Authors>.NET Foundation and Contributors</Authors>
1414
<PackageReleaseNotes>
15-
Silk.NET December 2023 Update
15+
Silk.NET April 2024 Update
1616

17-
- Added support for UTF-8 file paths in GLFW and SDL windows (thanks @WinstonMao)
18-
- Updated to OpenXR 1.0.32.1
19-
- Updated to Vulkan 1.3.273
20-
- Updated to latest OpenGL specifications
21-
- Updated to latest OpenCL specifications
22-
- Fixed Matrix2X2.GetDeterminant returning incorrect values
23-
- Fixed ALC_SOFT_reopen_device being a non-context extension (thanks @okaniku, @doobah)
17+
- Added nint overloads for the cases where OpenGL represents a native-sized integer as a void pointer.
18+
- Added support for executing Windowing loops during repaint and drag events on GLFW in some cases. (thanks @otac0n)
19+
- Added a distinction between "unset" (-1) and "default" (null) for Windowing depth/stencil buffer bits, defaulting to 24/8 on all platforms unless overridden.
20+
- Added support for 64-bit Arm Linux for Assimp, GLFW (+ Windowing &amp; Input), OpenAL Soft, SDL, Vkd3d, Vulkan Loader, SwiftShader, and WGPU. (thanks @alexrp)
21+
- Added support for Apple Silicon Macs for OpenAL Soft, Vulkan Loader, and SwiftShader. (thanks @alexrp)
22+
- Added support for 32-bit Arm Linux for Assimp, GLFW, OpenAL Soft, SDL, Shaderc, SPIR-V Cross, SPIR-V Reflect, Vkd3d, SwiftShader, and WGPU. (thanks @alexrp)
23+
- Added support for 64-bit Windows on Arm for Assimp, OpenAL Soft, VulkanLoader, and SwiftShader. (thanks @alexrp)
24+
- Added limited native library support (SPIR-V Tools and Shaderc) for glibc versions as old as 2.17 on Linux platforms.
25+
- Added support for new standard cursor shapes in Input and GLFW.
26+
- Updated to use `ref readonly` instead of `in`.
27+
- Updated to OpenXR 1.1.36.
28+
- Updated to DirectStorage 1.2.2.
29+
- Updated to Vulkan 1.3.281.
30+
- Updated to SDL 2.30.1.
31+
- Updated to latest OpenCL specifications.
32+
- Updated to latest SPIR-V Reflect.
33+
- Updated to latest WebGPU/Dawn/WGPU headers.
34+
- Updated Vkd3d native binaries.
35+
- Fixed string marshalling occasionally resulting in memory access violations on newer .NET 8 versions.
36+
- Fixed Windowing crashing on .NET Framework builds with prefer 32-bit set using GLFW.
37+
- Fixed extension loading generic type usage issues with full IL trimming enabled.
38+
- Fixed erroneous BreakneckLock acquisition logic slowing input events on mobile/SDL. (thanks @ZingBallyhoo)
39+
- Fixed windowing losing events when using multiple windows on desktop with the mobile/SDL implementation. (thanks @ZingBallyhoo)
40+
- Fixed some packages not referencing their native counterparts where appropriate. (thanks @alexrp)
41+
- Fixed Input events for standalone joysticks not being tracked on GLFW.
42+
- Fixed Input events no longer being tracked after 3-10 reopens of the same window on GLFW.
43+
- Fixed V-Sync configuration not persisting over window state changes in Windowing.
44+
- Fixed Circle.Contains erroneously comparing the squared vector distance from its center against its non-squared radius. (thanks @djoyahoy)
45+
46+
After this update:
47+
- Apple Silicon support is complete except for missing ANGLE binaries.
48+
- Arm Linux support is complete except for missing DXVK, ANGLE, and Vulkan Loader (missing on 32-bit only) binaries.
49+
- 64-bit Windows on Arm support is complete except for missing DXVK and ANGLE binaries.
50+
- 32-bit Windows on Arm remains unsupported except for DirectStorage.
2451
</PackageReleaseNotes>
2552
<PackageTags Condition="'$(PackageTags)' == ''">OpenCL;OpenGL;OpenAL;OpenGLES;GLES;Vulkan;Assimp;DirectX;GLFW;SDL;Windowing;Input;Gamepad;Joystick;Keyboard;Mouse;SilkTouch;Source;Generator;C#;F#;.NET;DotNet;Mono;Vector;Math;Maths;Numerics;Game;Graphics;Compute;Audio;Sound;Engine;Silk;Silk.NET;Slim.NET;ElgarTK;GPU;Sharp;Science;Scientific;Visualization;Visual;Audiovisual;Windows;macOS;Linux;Android;Bindings;OSX;Wrapper;Native</PackageTags>
2653
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2754
<PackageOutputPath>$(MSBuildThisFileDirectory)/../output_packages</PackageOutputPath>
2855
<RepositoryUrl>https://github.com/dotnet/Silk.NET</RepositoryUrl>
2956
<RepositoryType>Git</RepositoryType>
30-
<VersionPrefix>2.20.0</VersionPrefix>
57+
<VersionPrefix>2.21.0</VersionPrefix>
3158
<VersionSuffix Condition="'$(VersionSuffix)' == ''"></VersionSuffix>
3259
<Description Condition="'$(Description)' == ''">
3360
Silk.NET is a high-speed, advanced library, providing bindings to popular low-level APIs such as OpenGL, OpenCL, OpenAL, OpenXR, GLFW, SDL, Vulkan, Assimp, and DirectX.

generator.json

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,44 @@
7777
"glPointSizePointerOES"
7878
]
7979
},
80+
"glIntAsPtr": {
81+
"EdgeFlagPointer": ["pointer"],
82+
"EdgeFlagPointerEXT": ["pointer"],
83+
"EdgeFlagPointerListIBM": ["pointer"],
84+
"VertexPointer": ["pointer"],
85+
"VertexPointerEXT": ["pointer"],
86+
"VertexPointerListIBM": ["pointer"],
87+
"VertexPointervINTEL": ["pointer"],
88+
"ColorPointer": ["pointer"],
89+
"ColorPointerEXT": ["pointer"],
90+
"ColorPointerListIBM": ["pointer"],
91+
"ColorPointervINTEL": ["pointer"],
92+
"IndexPointer": ["pointer"],
93+
"IndexPointerEXT": ["pointer"],
94+
"IndexPointerListIBM": ["pointer"],
95+
"NormalPointer": ["pointer"],
96+
"NormalPointerEXT": ["pointer"],
97+
"NormalPointerListIBM": ["pointer"],
98+
"NormalPointervINTEL": ["pointer"],
99+
"TexCoordPointer": ["pointer"],
100+
"TexCoordPointerEXT": ["pointer"],
101+
"TexCoordPointerListIBM": ["pointer"],
102+
"TexCoordPointervINTEL": ["pointer"],
103+
"MultiTexCoordPointerEXT": ["pointer"],
104+
"FogCoordPointer": ["pointer"],
105+
"FogCoordPointerEXT": ["pointer"],
106+
"FogCoordPointerListIBM": ["pointer"],
107+
"SecondaryColorPointer": ["pointer"],
108+
"SecondaryColorPointerEXT": ["pointer"],
109+
"SecondaryColorPointerListIBM": ["pointer"],
110+
"VertexAttribPointer": ["pointer"],
111+
"VertexAttribPointerARB": ["pointer"],
112+
"VertexAttribPointerNV": ["pointer"],
113+
"VertexAttribIPointer": ["pointer"],
114+
"VertexAttribIPointerEXT": ["pointer"],
115+
"TangentPointerEXT": ["pointer"],
116+
"BinormalPointerEXT": ["pointer"]
117+
},
80118
"extensionsNamespace": "Silk.NET.OpenGL.Extensions",
81119
"typeMaps": [
82120
{
@@ -124,6 +162,44 @@
124162
"Boolean"
125163
],
126164
"namespace": "Silk.NET.OpenGL.Legacy",
165+
"glIntAsPtr": {
166+
"EdgeFlagPointer": ["pointer"],
167+
"EdgeFlagPointerEXT": ["pointer"],
168+
"EdgeFlagPointerListIBM": ["pointer"],
169+
"VertexPointer": ["pointer"],
170+
"VertexPointerEXT": ["pointer"],
171+
"VertexPointerListIBM": ["pointer"],
172+
"VertexPointervINTEL": ["pointer"],
173+
"ColorPointer": ["pointer"],
174+
"ColorPointerEXT": ["pointer"],
175+
"ColorPointerListIBM": ["pointer"],
176+
"ColorPointervINTEL": ["pointer"],
177+
"IndexPointer": ["pointer"],
178+
"IndexPointerEXT": ["pointer"],
179+
"IndexPointerListIBM": ["pointer"],
180+
"NormalPointer": ["pointer"],
181+
"NormalPointerEXT": ["pointer"],
182+
"NormalPointerListIBM": ["pointer"],
183+
"NormalPointervINTEL": ["pointer"],
184+
"TexCoordPointer": ["pointer"],
185+
"TexCoordPointerEXT": ["pointer"],
186+
"TexCoordPointerListIBM": ["pointer"],
187+
"TexCoordPointervINTEL": ["pointer"],
188+
"MultiTexCoordPointerEXT": ["pointer"],
189+
"FogCoordPointer": ["pointer"],
190+
"FogCoordPointerEXT": ["pointer"],
191+
"FogCoordPointerListIBM": ["pointer"],
192+
"SecondaryColorPointer": ["pointer"],
193+
"SecondaryColorPointerEXT": ["pointer"],
194+
"SecondaryColorPointerListIBM": ["pointer"],
195+
"VertexAttribPointer": ["pointer"],
196+
"VertexAttribPointerARB": ["pointer"],
197+
"VertexAttribPointerNV": ["pointer"],
198+
"VertexAttribIPointer": ["pointer"],
199+
"VertexAttribIPointerEXT": ["pointer"],
200+
"TangentPointerEXT": ["pointer"],
201+
"BinormalPointerEXT": ["pointer"]
202+
},
127203
"extensionsNamespace": "Silk.NET.OpenGL.Legacy.Extensions",
128204
"overloadExclusions": {
129205
"RefOverloader": [
@@ -212,6 +288,44 @@
212288
"Boolean"
213289
],
214290
"namespace": "Silk.NET.OpenGLES",
291+
"glIntAsPtr": {
292+
"EdgeFlagPointer": ["pointer"],
293+
"EdgeFlagPointerEXT": ["pointer"],
294+
"EdgeFlagPointerListIBM": ["pointer"],
295+
"VertexPointer": ["pointer"],
296+
"VertexPointerEXT": ["pointer"],
297+
"VertexPointerListIBM": ["pointer"],
298+
"VertexPointervINTEL": ["pointer"],
299+
"ColorPointer": ["pointer"],
300+
"ColorPointerEXT": ["pointer"],
301+
"ColorPointerListIBM": ["pointer"],
302+
"ColorPointervINTEL": ["pointer"],
303+
"IndexPointer": ["pointer"],
304+
"IndexPointerEXT": ["pointer"],
305+
"IndexPointerListIBM": ["pointer"],
306+
"NormalPointer": ["pointer"],
307+
"NormalPointerEXT": ["pointer"],
308+
"NormalPointerListIBM": ["pointer"],
309+
"NormalPointervINTEL": ["pointer"],
310+
"TexCoordPointer": ["pointer"],
311+
"TexCoordPointerEXT": ["pointer"],
312+
"TexCoordPointerListIBM": ["pointer"],
313+
"TexCoordPointervINTEL": ["pointer"],
314+
"MultiTexCoordPointerEXT": ["pointer"],
315+
"FogCoordPointer": ["pointer"],
316+
"FogCoordPointerEXT": ["pointer"],
317+
"FogCoordPointerListIBM": ["pointer"],
318+
"SecondaryColorPointer": ["pointer"],
319+
"SecondaryColorPointerEXT": ["pointer"],
320+
"SecondaryColorPointerListIBM": ["pointer"],
321+
"VertexAttribPointer": ["pointer"],
322+
"VertexAttribPointerARB": ["pointer"],
323+
"VertexAttribPointerNV": ["pointer"],
324+
"VertexAttribIPointer": ["pointer"],
325+
"VertexAttribIPointerEXT": ["pointer"],
326+
"TangentPointerEXT": ["pointer"],
327+
"BinormalPointerEXT": ["pointer"]
328+
},
215329
"extensionsNamespace": "Silk.NET.OpenGLES.Extensions",
216330
"overloadExclusions": {
217331
"RefOverloader": [
@@ -763,6 +877,9 @@
763877
"typeMaps": [
764878
{
765879
"$typemapPrecedesInjections": "true",
880+
"XrFutureEXT": "FutureEXT",
881+
"PFN_xrGetInstanceProcAddr": "PfnGetInstanceProcAddr",
882+
"PFN_xrCreateApiLayerInstance": "PfnCreateApiLayerInstance",
766883
"char": "byte",
767884
"XR_DEFINE_ATOM": "uint64_t",
768885
"LUID": "ulong",

src/Core/Silk.NET.BuildTools/Bind/ClassWriter.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,7 @@ static string GetSignature(Function func)
276276
sw.WriteLine(" public bool TryGetExtension<T>(out T ext)");
277277
sw.WriteLine($" where T:NativeExtension<{@class.ClassName}>");
278278
sw.WriteLine(" {");
279-
sw.WriteLine(" ext = IsExtensionPresent(GetExtensionAttribute(typeof(T)).Name)");
280-
sw.WriteLine(" ? (T) Activator.CreateInstance(typeof(T), Context)");
281-
sw.WriteLine(" : null;");
282-
sw.WriteLine(" return ext is not null;");
279+
sw.WriteLine(" throw new NotImplementedException();");
283280
sw.WriteLine(" }");
284281
sw.WriteLine();
285282
sw.WriteLine(" public override bool IsExtensionPresent(string extension)");

src/Core/Silk.NET.BuildTools/Common/Builders/TypeSignatureBuilder.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public sealed class TypeSignatureBuilder
3737
private Function _newFunctionPointerSignature;
3838

3939
private List<Type> _newGenericParams;
40+
41+
private bool _newIsIntAsPtr;
4042

4143
/// <summary>
4244
/// Initializes a new instance of the <see cref="TypeSignatureBuilder" /> class.
@@ -56,6 +58,7 @@ public TypeSignatureBuilder(Type typeSignature)
5658
_newIsGenericType = typeSignature.IsGenericTypeParameterReference;
5759
_newFunctionPointerSignature = typeSignature.FunctionPointerSignature;
5860
_newGenericParams = typeSignature.GenericTypes;
61+
_newIsIntAsPtr = typeSignature.IsIntAsPtr;
5962
}
6063

6164
/// <summary>
@@ -142,7 +145,8 @@ public Type Build()
142145
OriginalGroup = _newOriginalGroup,
143146
OriginalClass = _newOriginalClass,
144147
IsGenericTypeParameterReference = _newIsGenericType,
145-
GenericTypes = _newGenericParams
148+
GenericTypes = _newGenericParams,
149+
IsIntAsPtr = _newIsIntAsPtr
146150
};
147151
}
148152

@@ -191,6 +195,12 @@ public TypeSignatureBuilder WithGenericTypes(params Type[] parameters)
191195
_newGenericParams = parameters.ToList();
192196
return this;
193197
}
198+
199+
public TypeSignatureBuilder WithIsIntAsPtr(bool isIntAsPtr)
200+
{
201+
_newIsIntAsPtr = isIntAsPtr;
202+
return this;
203+
}
194204
// ReSharper restore UnusedParameter.Global
195205
}
196206
}

src/Core/Silk.NET.BuildTools/Common/Functions/Type.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ public int IndirectionLevels
102102
/// </summary>
103103
public bool IsThis { get; set; }
104104

105+
/// <summary>
106+
/// Gets or sets a value indicating whether this is a pointer that is actually an integer and not a pointer to a
107+
/// memory location.
108+
/// </summary>
109+
public bool IsIntAsPtr { get; set; }
110+
105111
/// <summary>
106112
/// Gets or sets the function pointer signature if this type is a function pointer. May be null.
107113
/// </summary>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy