Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file modified build/cache/assimp.json.gz
Binary file not shown.
Binary file modified build/cache/cl.json.gz
Binary file not shown.
Binary file modified build/cache/d3d11.json.gz
Binary file not shown.
Binary file modified build/cache/d3d12.json.gz
Binary file not shown.
Binary file modified build/cache/d3d9.json.gz
Binary file not shown.
Binary file modified build/cache/dxgi.json.gz
Binary file not shown.
Binary file modified build/cache/gl.json.gz
Binary file not shown.
Binary file modified build/cache/glcore.json.gz
Binary file not shown.
Binary file modified build/cache/gles2.json.gz
Binary file not shown.
Binary file modified build/cache/openxr.json.gz
Binary file not shown.
Binary file modified build/cache/sdl.json.gz
Binary file not shown.
Binary file modified build/cache/vulkan.json.gz
Binary file not shown.
142 changes: 71 additions & 71 deletions build/csharp_typemap.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"GLsizei": "uint",
"GLsizeiptr": "UIntPtr",
"GLintptr": "IntPtr",
"GLsizeiptr": "nuint",
"GLintptr": "nint",
"GLboolean": "bool",
"GLbitfield": "uint",
"GLvoid": "void",
Expand All @@ -18,8 +18,8 @@
"GLclampd": "double",
"GLstring": "string",
"String": "string",
"GLsizeiptrARB": "UIntPtr",
"GLintptrARB": "IntPtr",
"GLsizeiptrARB": "nuint",
"GLintptrARB": "nint",
"GLhandleARB": "uint",
"GLhalfARB": "System.Half",
"GLhalfNV": "System.Half",
Expand All @@ -28,31 +28,31 @@
"GLuint64EXT": "ulong",
"GLint64": "long",
"GLuint64": "ulong",
"sync": "IntPtr",
"GLsync": "IntPtr",
"sync": "nint",
"GLsync": "nint",
"GLDEBUGPROC": "DebugProc",
"GLDEBUGPROCAMD": "DebugProcAmd",
"GLDEBUGPROCARB": "DebugProcArb",
"GLDEBUGPROCKHR": "DebugProcKhr",
"GLvdpauSurfaceNV": "IntPtr",
"PROC": "IntPtr",
"GLvdpauSurfaceNV": "nint",
"PROC": "nint",
"LPCSTR": "string",
"COLORREF": "int",
"BOOL": "bool",
"DWORD": "int",
"FLOAT": "float",
"HANDLE": "IntPtr",
"HDC": "IntPtr",
"HGLRC": "IntPtr",
"HPBUFFERARB": "IntPtr",
"HPBUFFEREXT": "IntPtr",
"HANDLE": "nint",
"HDC": "nint",
"HGLRC": "nint",
"HPBUFFERARB": "nint",
"HPBUFFEREXT": "nint",
"INT32": "int",
"INT64": "long",
"LPVOID": "IntPtr",
"LPVOID": "nint",
"UINT": "uint",
"USHORT": "ushort",
"VOID": "void",
"VoidPointer": "IntPtr",
"VoidPointer": "nint",
"Float64": "double",
"Float64Pointer": "double*",
"Float32": "float",
Expand All @@ -61,54 +61,54 @@
"Bool": "bool",
"int64_t": "long",
"int32_t": "int",
"Display": "IntPtr",
"Pixmap": "IntPtr",
"Colormap": "IntPtr",
"GLXWindow": "IntPtr",
"GLXContext": "IntPtr",
"GLXDrawable": "IntPtr",
"GLXPixmap": "IntPtr",
"__GLXextFuncPtr": "IntPtr",
"VLServer": "IntPtr",
"VLPath": "IntPtr",
"VLNode": "IntPtr",
"Display": "nint",
"Pixmap": "nint",
"Colormap": "nint",
"GLXWindow": "nint",
"GLXContext": "nint",
"GLXDrawable": "nint",
"GLXPixmap": "nint",
"__GLXextFuncPtr": "nint",
"VLServer": "nint",
"VLPath": "nint",
"VLNode": "nint",
"GLclampx": "int",
"GLfixed": "int",
"GLeglImageOES": "IntPtr",
"GLeglClientBufferEXT": "IntPtr",
"GLVULKANPROCNV": "IntPtr",
"GLeglImageOES": "nint",
"GLeglClientBufferEXT": "nint",
"GLVULKANPROCNV": "nint",
"uint8_t": "byte",
"uint16_t": "ushort",
"uint32_t": "uint",
"uint64_t": "ulong",
"size_t": "UIntPtr",
"ANativeWindow": "IntPtr",
"MirConnection": "IntPtr",
"MirSurface": "IntPtr",
"wl_display": "IntPtr",
"wl_surface": "IntPtr",
"VisualID": "IntPtr",
"RROutput": "IntPtr",
"HINSTANCE": "IntPtr",
"HWND": "IntPtr",
"HWND__*": "IntPtr",
"HDC__*": "IntPtr",
"HINSTANCE__*": "IntPtr",
"SECURITY_ATTRIBUTES": "IntPtr",
"LPCWSTR": "IntPtr",
"xcb_connection_t": "IntPtr",
"xcb_window_t": "IntPtr",
"xcb_visualid_t": "IntPtr",
"_cl_context": "IntPtr",
"_cl_event": "IntPtr",
"HMONITOR": "IntPtr",
"CAMetalLayer": "IntPtr",
"AHardwareBuffer": "IntPtr",
"zx_handle_t": "IntPtr",
"GgpFrameToken": "IntPtr",
"GgpStreamDescriptor": "IntPtr",
"size_t": "nuint",
"ANativeWindow": "nint",
"MirConnection": "nint",
"MirSurface": "nint",
"wl_display": "nint",
"wl_surface": "nint",
"VisualID": "nint",
"RROutput": "nint",
"HINSTANCE": "nint",
"HWND": "nint",
"HWND__*": "nint",
"HDC__*": "nint",
"HINSTANCE__*": "nint",
"SECURITY_ATTRIBUTES": "nint",
"LPCWSTR": "nint",
"xcb_connection_t": "nint",
"xcb_window_t": "nint",
"xcb_visualid_t": "nint",
"_cl_context": "nint",
"_cl_event": "nint",
"HMONITOR": "nint",
"CAMetalLayer": "nint",
"AHardwareBuffer": "nint",
"zx_handle_t": "nint",
"GgpFrameToken": "nint",
"GgpStreamDescriptor": "nint",
"VkFlags": "uint",
"intptr_t": "IntPtr",
"intptr_t": "nint",
"cl_double": "double",
"cl_float": "float",
"cl_short": "short",
Expand All @@ -121,27 +121,27 @@
"cl_ulong": "ulong",
"cl_version_khr": "uint",
"unsignedchar": "byte",
"IDirectFB*": "IntPtr",
"IDirectFBSurface*": "IntPtr",
"VASurfaceID*": "IntPtr",
"IDirectFB*": "nint",
"IDirectFBSurface*": "nint",
"VASurfaceID*": "nint",
"EGLint": "int",
"khronos_utime_nanoseconds_t": "ulong",
"khronos_stime_nanoseconds_t": "long",
"khronos_uint64_t": "ulong",
"wl_resource": "IntPtr",
"wl_buffer": "IntPtr",
"jobject": "IntPtr",
"timespec": "ValueTuple<IntPtr,IntPtr>",
"wl_resource": "nint",
"wl_buffer": "nint",
"jobject": "nint",
"timespec": "ValueTuple<nint,nint>",
"LARGE_INTEGER": "long",
"xcb_glx_fbconfig_t": "IntPtr",
"xcb_glx_drawable_t": "IntPtr",
"xcb_glx_context_t": "IntPtr",
"xcb_glx_fbconfig_t": "nint",
"xcb_glx_drawable_t": "nint",
"xcb_glx_context_t": "nint",
"_GUID": "Guid",
"HINSTANCE__**": "IntPtr*",
"HWND__**": "IntPtr*",
"HMONITOR__*": "IntPtr",
"HDC__**": "IntPtr*",
"HMONITOR__**": "IntPtr*",
"HINSTANCE__**": "nint*",
"HWND__**": "nint*",
"HMONITOR__*": "nint",
"HDC__**": "nint*",
"HMONITOR__**": "nint*",
"_LUID": "ValueTuple<ulong, long>",
"_LARGE_INTEGER": "long",
"IUnknown": "Silk.NET.Core.Native.IUnknown",
Expand Down
4 changes: 2 additions & 2 deletions examples/CSharp/Tutorial 1.2 - Hello quad/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ private static unsafe void OnLoad()
Gl.BindBuffer(BufferTargetARB.ArrayBuffer, Vbo); //Binding the buffer.
fixed (void* v = &Vertices[0])
{
Gl.BufferData(BufferTargetARB.ArrayBuffer, (UIntPtr) (Vertices.Length * sizeof(uint)), v, BufferUsageARB.StaticDraw); //Setting buffer data.
Gl.BufferData(BufferTargetARB.ArrayBuffer, (nuint) (Vertices.Length * sizeof(uint)), v, BufferUsageARB.StaticDraw); //Setting buffer data.
}

//Initializing a element buffer that holds the index data.
Ebo = Gl.GenBuffer(); //Creating the buffer.
Gl.BindBuffer(BufferTargetARB.ElementArrayBuffer, Ebo); //Binding the buffer.
fixed (void* i = &Indices[0])
{
Gl.BufferData(BufferTargetARB.ElementArrayBuffer, (UIntPtr) (Indices.Length * sizeof(uint)), i, BufferUsageARB.StaticDraw); //Setting buffer data.
Gl.BufferData(BufferTargetARB.ElementArrayBuffer, (nuint) (Indices.Length * sizeof(uint)), i, BufferUsageARB.StaticDraw); //Setting buffer data.
}

//Creating a vertex shader.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/CSharp/Tutorial 1.4 - Textures/BufferObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/CSharp/Tutorial 2.2 - Camera/BufferObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/CSharp/Tutorial 3.4 - Materials/BufferObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public unsafe BufferObject(GL gl, Span<TDataType> data, BufferTargetARB bufferTy
Bind();
fixed (void* d = data)
{
_gl.BufferData(bufferType, (UIntPtr) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
_gl.BufferData(bufferType, (nuint) (data.Length * sizeof(TDataType)), d, BufferUsageARB.StaticDraw);
}
}

Expand Down
28 changes: 22 additions & 6 deletions generator.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,23 @@
"mode": "Default",
"path": "src/Vulkan",
"licenseFile": "build/LICENSE_HEADER.txt",
"props": "build/props/bindings.props"
"props": "build/props/bindings.props",
"inject": [
{
"functions": [
"vkCreateInstance"
],
"stage": "end",
"code": "if (%$RESULT$% == Result.Success) { CurrentInstance = *%$PARAM(pInstance)$%; }"
},
{
"functions": [
"vkCreateDevice"
],
"stage": "end",
"code": "if (%$RESULT$% == Result.Success) { CurrentDevice = *%$PARAM(pDevice)$%; }"
}
]
},
"namespace": "Silk.NET.Vulkan",
"extensionsNamespace": "Silk.NET.Vulkan.Extensions",
Expand All @@ -340,7 +356,7 @@
"PFN_vkDebugReportCallbackEXT": "PfnDebugReportCallbackEXT",
"PFN_vkDebugUtilsMessengerCallbackEXT": "PfnDebugUtilsMessengerCallbackEXT",
"char": "byte",
"Window": "IntPtr",
"Window": "nint",
"VkAabbPositionsKHR": "Silk.NET.Maths.Box3D<float>",
"VkAabbPositionsNV": "Silk.NET.Maths.Box3D<float>"
},
Expand Down Expand Up @@ -532,10 +548,10 @@
"ID3D12Resource*": "void*",
"ID3D12CommandQueue*": "void*",
"IUnknown*": "Silk.NET.Core.Native.IUnknown*",
"EGLDisplay": "IntPtr",
"EGLConfig": "IntPtr",
"EGLContext": "IntPtr",
"GLXFBConfig": "IntPtr",
"EGLDisplay": "nint",
"EGLConfig": "nint",
"EGLContext": "nint",
"GLXFBConfig": "nint",
"VkFormat": "uint"
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/Assimp/Silk.NET.Assimp/Enums/Return.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public enum Return : int
[NativeName("Name", "aiReturn_SUCCESS")]
ReturnSuccess = 0x0,
[NativeName("Name", "aiReturn_FAILURE")]
ReturnFailure = unchecked((int)0xFFFFFFFFFFFFFFFF),
ReturnFailure = unchecked((int) 0xFFFFFFFFFFFFFFFF),
[NativeName("Name", "aiReturn_OUTOFMEMORY")]
ReturnOutofmemory = unchecked((int)0xFFFFFFFFFFFFFFFD),
ReturnOutofmemory = unchecked((int) 0xFFFFFFFFFFFFFFFD),
}
}
6 changes: 3 additions & 3 deletions src/Assimp/Silk.NET.Assimp/Structs/PfnFileCloseProc.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ FileCloseProc proc
) => _handle = (void*) SilkMarshal.DelegateToPtr(proc);

public static PfnFileCloseProc From(FileCloseProc proc) => new PfnFileCloseProc(proc);
public void Dispose() => SilkMarshal.Free((IntPtr) _handle);
public void Dispose() => SilkMarshal.Free((nint) _handle);

public static implicit operator IntPtr(PfnFileCloseProc pfn) => (IntPtr) pfn.Handle;
public static explicit operator PfnFileCloseProc(IntPtr pfn)
public static implicit operator nint(PfnFileCloseProc pfn) => (nint) pfn.Handle;
public static explicit operator PfnFileCloseProc(nint pfn)
=> new PfnFileCloseProc((delegate* unmanaged[Cdecl]<FileIO*, File*, void>) pfn);

public static implicit operator PfnFileCloseProc(FileCloseProc proc)
Expand Down
6 changes: 3 additions & 3 deletions src/Assimp/Silk.NET.Assimp/Structs/PfnFileFlushProc.gen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ FileFlushProc proc
) => _handle = (void*) SilkMarshal.DelegateToPtr(proc);

public static PfnFileFlushProc From(FileFlushProc proc) => new PfnFileFlushProc(proc);
public void Dispose() => SilkMarshal.Free((IntPtr) _handle);
public void Dispose() => SilkMarshal.Free((nint) _handle);

public static implicit operator IntPtr(PfnFileFlushProc pfn) => (IntPtr) pfn.Handle;
public static explicit operator PfnFileFlushProc(IntPtr pfn)
public static implicit operator nint(PfnFileFlushProc pfn) => (nint) pfn.Handle;
public static explicit operator PfnFileFlushProc(nint pfn)
=> new PfnFileFlushProc((delegate* unmanaged[Cdecl]<File*, void>) pfn);

public static implicit operator PfnFileFlushProc(FileFlushProc proc)
Expand Down
Loading