-
-
Notifications
You must be signed in to change notification settings - Fork 456
[3.0] Update SDL and ClangSharp #2570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop/3.0
Are you sure you want to change the base?
Changes from 29 commits
d7b0a5e
7a897bc
eb3c578
4a925ba
4688456
dc21675
7756e45
cec6067
a2d1440
94b28ed
32edf45
1078201
453d8a0
9d29d82
5dbbfb2
1f87a94
59c8d51
79669d7
03adbed
bf3883f
ada9687
3053e41
d5c877d
1c16a52
5acd54c
7b212c3
d2d864a
c2a9772
8e3cfd7
6d54862
77ebc55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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}") | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: 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) | ||
|
|
||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefixed the OpenAL example project name and folder name since it was confusing in the "run project" dropdown of Rider (and maybe other IDEs). |
| 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(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll probably convert this .sln file to an .slnx file as my next PR and ensure that Nuke works with the new format (should work after updating Nuke).