Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d7b0a5e
Update SDL submodule
Exanite Apr 18, 2026
7a897bc
Update ClangSharp.PInvokeGenerator
Exanite Apr 14, 2026
eb3c578
Add comment on where the SDL Linux dependency list comes from
Exanite Apr 17, 2026
4a925ba
Update dependency list
Exanite Apr 17, 2026
4688456
Disable building SDL tests
Exanite Apr 17, 2026
dc21675
Don't build for ios armv7s
Exanite Apr 17, 2026
7756e45
Set CMAKE_LIBRARY_ARCHITECTURE and remove pkg-config settings
Exanite Apr 18, 2026
cec6067
Install the architecture specific version of each compile dependency
Exanite Apr 18, 2026
a2d1440
Fix apt-get commands
Exanite Apr 18, 2026
94b28ed
Fix incorrect architecture code (should be armhf instead of arm)
Exanite Apr 18, 2026
32edf45
Enable ports repository
Exanite Apr 18, 2026
1078201
Forgot a sudo
Exanite Apr 18, 2026
453d8a0
Use tee instead of cat due to sudo only applying to cat and not the s…
Exanite Apr 18, 2026
9d29d82
Don't hardcode the release codename
Exanite Apr 18, 2026
5dbbfb2
Oops
Exanite Apr 18, 2026
1f87a94
Update existing ubuntu.sources file to specify the architecture to fi…
Exanite Apr 18, 2026
59c8d51
Change the ubuntu.source update command to be idempotent
Exanite Apr 18, 2026
79669d7
Add the pkg config lines back
Exanite Apr 18, 2026
03adbed
Fix missing sudo again
Exanite Apr 18, 2026
bf3883f
Use amd64_arm64 when calling vcvarsall instead of arm64
Exanite Apr 18, 2026
ada9687
Update native binaries for bf3883f79d37d307b64e64e839537547124e36ca
dotnet-bot Apr 18, 2026
3053e41
Empty commit to trigger experimental packages
Exanite Apr 19, 2026
d5c877d
Update native binaries for 3053e417d91ba7618874ddc165de347fb277e54c
dotnet-bot Apr 19, 2026
1c16a52
Update native binaries for d5c877d510b6af0467ec510e0c545c80bc0be6dd
dotnet-bot Apr 19, 2026
5acd54c
Update native binaries for 1c16a528fb1c2dcb9e364e103e2a4515a0989cef
dotnet-bot Apr 19, 2026
7b212c3
Update native binaries for 5acd54ceb1d8e777582e0c4fe7726a3bf0fe9064
dotnet-bot Apr 19, 2026
d2d864a
Add license header to OpenAL example
Exanite Apr 19, 2026
c2a9772
Add basic SDL example
Exanite Apr 19, 2026
8e3cfd7
Prefix the project names with the library name
Exanite Apr 19, 2026
6d54862
Decide to not prefix the folders since the rest of the codebase doesn't
Exanite Apr 19, 2026
77ebc55
Update SDL bindings
Exanite Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .silktouch/sdl-clangsharp.stout
Binary file not shown.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!-- Analyzers -->
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.12.0-beta1.25218.8" />
<!-- SilkTouch -->
<PackageVersion Include="ClangSharp.PInvokeGenerator" Version="20.1.2.4" />
<PackageVersion Include="ClangSharp.PInvokeGenerator" Version="21.1.8.3" />
<PackageVersion Include="CSharpier.Core" Version="0.30.2" />
<PackageVersion Include="Humanizer.Core" Version="2.14.1" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.11.1" />
Expand Down
14 changes: 12 additions & 2 deletions Silk.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CSharp", "CSharp", "{12B4D1
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenAL", "OpenAL", "{662A1AEC-91F2-48FA-AA29-6F27038D30F2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tutorial001.HelloSound", "examples\CSharp\OpenAL\Tutorial001.HelloSound\Tutorial001.HelloSound.csproj", "{946C912C-5BBB-446A-A566-0D1696D19F59}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAL.Tutorial001.HelloSound", "examples\CSharp\OpenAL\Tutorial001.HelloSound\OpenAL.Tutorial001.HelloSound.csproj", "{946C912C-5BBB-446A-A566-0D1696D19F59}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDL.Tutorial001.HelloWindow", "examples\CSharp\SDL\Tutorial001.HelloWindow\SDL.Tutorial001.HelloWindow.csproj", "{3444151F-2DE3-41BC-B5E0-EFBF0091C087}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SDL", "SDL", "{96567E92-4A89-4AC8-9F20-C2A3FE644D10}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -196,7 +200,11 @@ Global
{946C912C-5BBB-446A-A566-0D1696D19F59}.Debug|Any CPU.Build.0 = Debug|Any CPU
{946C912C-5BBB-446A-A566-0D1696D19F59}.Release|Any CPU.ActiveCfg = Release|Any CPU
{946C912C-5BBB-446A-A566-0D1696D19F59}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
{3444151F-2DE3-41BC-B5E0-EFBF0091C087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3444151F-2DE3-41BC-B5E0-EFBF0091C087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3444151F-2DE3-41BC-B5E0-EFBF0091C087}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3444151F-2DE3-41BC-B5E0-EFBF0091C087}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
Expand Down Expand Up @@ -235,6 +243,8 @@ Global
{946C912C-5BBB-446A-A566-0D1696D19F59} = {662A1AEC-91F2-48FA-AA29-6F27038D30F2}
{5E20252F-E2A0-46C9-BBEF-4CE5C96D0E07} = {DD29EA8F-B1A6-45AA-8D2E-B38DA56D9EF6}
{E5E8FFBF-1319-4D33-B084-E732656E8A04} = {5E20252F-E2A0-46C9-BBEF-4CE5C96D0E07}
{96567E92-4A89-4AC8-9F20-C2A3FE644D10} = {12B4D1CB-8938-4EC4-8895-79C4E6ABD1E8}
{3444151F-2DE3-41BC-B5E0-EFBF0091C087} = {96567E92-4A89-4AC8-9F20-C2A3FE644D10}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {78D2CF6A-60A1-43E3-837B-00B73C9DA384}
Expand Down
2 changes: 1 addition & 1 deletion eng/native/cmake/zig-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if(ZIG_OS STREQUAL "linux")
set(PKG_CONFIG_EXECUTABLE "/usr/bin/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}-pkg-config")
set(ENV{PKG_CONFIG_LIBDIR} "/usr/lib/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}/pkgconfig")
set(ENV{PKG_CONFIG_PATH} "/usr/lib/pkgconfig:/usr/share/pkgconfig")
set(CMAKE_FIND_ROOT_PATH "/usr/${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This folder doesn't exist on Ubuntu and the include, lib, and bin folders instead have the following format:

/usr/bin/{target-triple}
/usr/include/{target-triple}
/usr/lib/{target-triple}

Setting CMAKE_LIBRARY_ARCHITECTURE lets CMake find these automatically.

set(CMAKE_LIBRARY_ARCHITECTURE "${ZIG_ARCH}-${ZIG_OS}-${LINUX_ABI}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
Expand Down
2 changes: 1 addition & 1 deletion eng/submodules/sdl
Submodule sdl updated 1645 files
5 changes: 4 additions & 1 deletion examples/CSharp/OpenAL/Tutorial001.HelloSound/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
using NAudio.Wave;
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using NAudio.Wave;
using Silk.NET.OpenAL;

// NOTE: If you prefer, you can use the static ALContext and AL functions instead of creating an API object!
Expand Down
42 changes: 42 additions & 0 deletions examples/CSharp/SDL/Tutorial001.HelloWindow/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Silk.NET.SDL;

if (!Sdl.Init(Sdl.InitVideo))
{
throw new Exception($"SDL failed to initialize: {Sdl.GetError().ReadToString()}");
}

var window = Sdl.CreateWindow("Silk.NET.SDL - Hello Window", 800, 600, Sdl.WindowResizable);
if (window == nullptr)
{
throw new Exception("Failed to create window");
}

try
{
var renderer = Sdl.CreateRenderer(window, nullptr);
{
var shouldRun = true;
while (shouldRun)
{
var e = default(Event);
Sdl.PollEvent(e.AsRef());

if (e.Type == (uint)EventType.Quit)
{
shouldRun = false;
}

Sdl.SetRenderDrawColor(renderer, 0, 255, 0, 255);
Sdl.RenderClear(renderer);
Sdl.RenderPresent(renderer);
}
}
Sdl.DestroyWindow(window);
}
finally
{
Sdl.Quit();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\sources\SDL\SDL\Silk.NET.SDL.csproj" />
</ItemGroup>

</Project>
Loading
Loading