Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions Silk.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Silk.NET.Windowing.Common", "src\Windowing\Silk.NET.Windowing.Common\Silk.NET.Windowing.Common.csproj", "{956F722C-DFD3-435E-9D2E-A0549C4D8BC0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{E1F91563-7277-4E9B-A3B7-8D5FD9802A4A}"
ProjectSection(SolutionItems) = preProject
examples\Directory.Build.props = examples\Directory.Build.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenAL", "OpenAL", "{081E7761-B200-4DBF-8950-941464DECACE}"
EndProject
Expand Down
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
1 change: 1 addition & 0 deletions examples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project>
<PropertyGroup>
<AssemblyName>Tutorial</AssemblyName>
<LangVersion>9</LangVersion>
</PropertyGroup>
</Project>
39 changes: 32 additions & 7 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 @@ -491,7 +507,16 @@
"mode": "Default",
"path": "src/OpenXR",
"licenseFile": "build/LICENSE_HEADER.txt",
"props": "build/props/bindings.props"
"props": "build/props/bindings.props",
"inject": [
{
"functions": [
"xrCreateInstance"
],
"stage": "end",
"code": "if (%$RESULT$% == Result.Success) { CurrentInstance = *%$PARAM(instance)$%; }"
}
]
},
"namespace": "Silk.NET.OpenXR",
"extensionsNamespace": "Silk.NET.OpenXR.Extensions",
Expand Down Expand Up @@ -532,10 +557,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
Loading