Skip to content
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

[PAL2.0] Pal2 improvements #1720

Open
wants to merge 62 commits into
base: opentk5.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5fca0ea
Add Program.UsingGLES to OpenTK.Backends.Tests. Add VsyncTest applica…
NogginBops Apr 2, 2024
3f332db
Add optional win32 OpenGLComponent.UseDwmFlushIfApplicable to enable …
NogginBops Apr 2, 2024
01aa655
Fixed bug where SetMaxClientSize would assign to the min client size …
NogginBops Apr 11, 2024
50c19a0
Implemented MacOSWindowComponent.GetFullscreenDisplay.
NogginBops Apr 13, 2024
8b80aaf
Fixed small typo in SEL
NogginBops Apr 13, 2024
b85c53a
Fixed Y flipping in MacOSMouseComponent
NogginBops Apr 14, 2024
5efae6b
Initial work on getting CursorCaptureMode.Locked to work on macOS.
NogginBops Apr 14, 2024
cbebca7
Switched to using UnmanagedCallersOnly and function pointers for macO…
NogginBops Apr 14, 2024
03aff9e
Small macOS backend cleanup.
NogginBops Apr 14, 2024
25bd0c9
Implemented CaptureMode.Locked in macOS backend.
NogginBops May 10, 2024
7b0bd92
Small fixes
NogginBops May 17, 2024
c898e0e
Merge branch 'pal2-work' of github.com:NogginBops/opentk into pal2-work
NogginBops May 17, 2024
ef26c5a
Added basic IDialogComponent and win32 implementation.
NogginBops May 17, 2024
2aeebd0
Implemented MacOSDialogComponent. Started making DialogFileFilter mor…
NogginBops May 19, 2024
010c2c7
Fixed OpenTK.Backends.Tests browse and save file filters for windows …
NogginBops May 19, 2024
9cec317
Fix style issues
NogginBops May 19, 2024
289e716
Started implementing MacOSClipboardComponent. Implemented GetClipboar…
NogginBops May 19, 2024
e2be69d
Added comment.
NogginBops May 19, 2024
46decb7
Fix style issue and compilation issues.
NogginBops May 20, 2024
a13b81e
Implemented MacOSClipboardComponent.GetClipboardFiles.
NogginBops Jun 2, 2024
0aa5a34
Removed IClipboardComponent.GetClipboardHTML(). Made MacOSClipboardCo…
NogginBops Jun 3, 2024
91ae96e
Implemented MacOSClipboardComponent.SetClipboardBitmap(). Added butto…
NogginBops Jun 3, 2024
01db468
Fixed ClipboardUpdateEventArgs event on windows.
NogginBops Jun 3, 2024
1bfac1c
Implemented ClipboardUpdate event on macOS.
NogginBops Jun 3, 2024
14883b0
Started implementing NSDraggingDestination for NSOpenTKView.
NogginBops Jun 3, 2024
476fa93
Implemented FileDrop event on macOS. Made the component an IVar of th…
NogginBops Jun 4, 2024
fc23ddc
Implemented WindowScaleChange event in macOS. Added IWindowComponent.…
NogginBops Jun 4, 2024
d1a130d
Implemented GetScaleFactor on win32.
NogginBops Jun 4, 2024
9e247e3
Changed OpenTK.Backends.Tests to use the Toolkit class. Removed Compo…
NogginBops Jun 4, 2024
ae66ac0
Update build project dependencies.
NogginBops Jun 4, 2024
57da47d
Moved DwmFlush comment.
NogginBops Jun 4, 2024
38d3936
Fixed compile issue in X11TestProject
NogginBops Jun 4, 2024
f2e1bbc
Added documentation to Toolkit.
NogginBops Jun 4, 2024
0310d6a
Removed PalComponents from Initialized and replaced it with ToolkitOp…
NogginBops Jun 4, 2024
c4cf6d3
Fixed issue where SetImmersiveDarkMode wouldn't trigger a redraw of t…
NogginBops Jun 5, 2024
8c39cd4
Added IWindowComponent.GetFramebufferSize. Added WindowFramebufferRes…
NogginBops Jun 6, 2024
9820ee4
Added WindowFramebufferResize when the scale factor on macOS changes.…
NogginBops Jun 6, 2024
9512b93
Implemented MacOSWindowComponent.SetClientPosition
NogginBops Jun 6, 2024
85c7e23
Implemeneted MacOSWindowComponent.SetClientBounds.
NogginBops Jun 6, 2024
46f1225
Implemented MacOSWindowComponent.ScreenToClient/ClientToScreen.
NogginBops Jun 6, 2024
feca316
Made OpenTK.Backends.Tests redraw while window is moving.
NogginBops Jun 6, 2024
d3d1ece
Add win32 backend specific function for controlling windows 11 rounde…
NogginBops Jun 6, 2024
522fb42
Bejeweled game + PAL2 changes for it.
NogginBops Jun 13, 2024
528f2f0
Use less aggressive multisampling for people that have less capable G…
utkumaden Jun 13, 2024
f1d1f53
Set context current before setting swap interval.
utkumaden Jun 13, 2024
0ce6c51
Add missing icons folder.
NogginBops Jun 14, 2024
f049d8b
Fixes for macos.
NogginBops Jun 14, 2024
563aae0
Fix font issues related to ImGui update.
NogginBops Jun 14, 2024
55aff34
Bejeweled: Added BC6H decoder for macOS support.
NogginBops Jun 15, 2024
7a04742
Merge branch 'pal2-work' of github.com:NogginBops/opentk into pal2-work
NogginBops Jun 15, 2024
a235044
Merge branch 'pal2-work' into pal2-work-bejeweled-patch
NogginBops Jun 15, 2024
f97d6d8
Merge pull request #7 from utkumaden/pal2-work-bejeweled-patch
NogginBops Jun 15, 2024
d0c4f65
Fix compile issues.
NogginBops Jun 15, 2024
571b1a5
Optimize framebuffers and added simple hardware detection to customiz…
NogginBops Jun 15, 2024
0679921
Fix win32 issue where ContextStencilBits.None and ContextDepthBits.No…
NogginBops Jun 15, 2024
6cafc00
Fixed issue where WindowBorderStyle.FixedBorder would still have the …
NogginBops Jun 15, 2024
3c2ff95
Fixed color byte order for X11CursorComponent.Create(color cursor). F…
NogginBops Jun 16, 2024
b0f1eaa
Set WM_CLASS on X11 to get proper name in win+tab app switcher.
NogginBops Jun 16, 2024
a7293e9
Fixed title prompt when there are not possible moves.
NogginBops Jun 17, 2024
ee1f4f7
Started changing OpenGL backbuffer values selection to be more user c…
NogginBops Jun 19, 2024
ae9f2d8
Added GetIconifiedTitle/SetIconifiedTitle to X11WindowComponent.
NogginBops Jun 19, 2024
deed7eb
Started working on context framebuffer value selection for glX.
NogginBops Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,9 @@
*.zip binary
*.pdf binary
*.ttf binary
*.glb binary
*.blend binary
*.blend1 binary
*.ani binary
*.gif binary
*.res binary
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,12 @@ fabric.properties
.LSOverride

# Icon must end with two \r
Icon
# Icon\r\r is a folder that macos creates, but keeping two \r\r characters in .gitignore
# seems to be hard, so we instead wildcard on Icon? and then use a negative pattern to bring
# back most other uses of Icon.
# - Noggin_bops 2024-06-14
Icon?
![iI]con[_a-zA-Z0-9]

# Thumbnails
._*
Expand Down
8 changes: 8 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
{
"version": "0.2.0",
"configurations": [

{
"name": "C#: OpenTK.Platform.Tests",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/tests/OpenTK.Platform.Tests/OpenTK.Platform.Tests.csproj",
"launchConfigurationId": "TargetFramework=;OpenTK.Platform.Tests"
},
{
"name": "C#: Bejeweled",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/tests/Bejeweled/Bejeweled.csproj",
"launchConfigurationId": "TargetFramework=;Bejeweled"
}
]
}
7 changes: 7 additions & 0 deletions OpenTK.sln
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ANGLETestProject", "tests\A
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "build", "build\build.fsproj", "{49DFA6FD-D4F9-4EAD-BC24-3D585B1E8B94}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bejeweled", "tests\Bejeweled\Bejeweled.csproj", "{C7D52AD4-4D53-4D37-87B5-0864CF94EA45}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -213,6 +215,10 @@ Global
{49DFA6FD-D4F9-4EAD-BC24-3D585B1E8B94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49DFA6FD-D4F9-4EAD-BC24-3D585B1E8B94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49DFA6FD-D4F9-4EAD-BC24-3D585B1E8B94}.Release|Any CPU.Build.0 = Release|Any CPU
{C7D52AD4-4D53-4D37-87B5-0864CF94EA45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C7D52AD4-4D53-4D37-87B5-0864CF94EA45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C7D52AD4-4D53-4D37-87B5-0864CF94EA45}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C7D52AD4-4D53-4D37-87B5-0864CF94EA45}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -238,6 +244,7 @@ Global
{0892F9BC-D689-47BC-80A3-2AF88DCD84BF} = {0B9B71A1-29F7-4CC5-9A9D-9DF122BE8B28}
{7888FB56-FCBC-4240-B78F-691481A56AA1} = {0B9B71A1-29F7-4CC5-9A9D-9DF122BE8B28}
{49DFA6FD-D4F9-4EAD-BC24-3D585B1E8B94} = {471E0D18-D620-4CBE-A471-F3DB470E6D49}
{C7D52AD4-4D53-4D37-87B5-0864CF94EA45} = {0B9B71A1-29F7-4CC5-9A9D-9DF122BE8B28}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {82DDE6D6-0D55-49B4-9C64-B31B4A6E729F}
Expand Down
4 changes: 2 additions & 2 deletions build/build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
<!-- so we must later copy the nuget.exe out from this package into our own. -->
<!-- This was not needed when we ran our build using an .fsx file using paket to download dependencies as -->
<!-- paket downloaded these dependencies into a project local folder. -->
<PackageReference Include="NuGet.CommandLine" Version="6.9.1" GeneratePathProperty="true">
<PackageReference Include="NuGet.CommandLine" Version="6.10.0" GeneratePathProperty="true">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<!-- See https://github.com/fsprojects/FAKE/issues/2748 -->
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.858" />
<PackageReference Include="MSBuild.StructuredLogger" Version="2.2.243" />
<!-- See https://github.com/fsprojects/FAKE/issues/2722 -->
<!-- 17.3.2 is the last .net6.0 version of the package -->
<PackageReference Include="Microsoft.Build" Version="17.3.2" />
Expand Down
2 changes: 1 addition & 1 deletion props/stylecop.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</AdditionalFiles>
</ItemGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="all" />
</ItemGroup>
<Import Project="common.props" Condition="!$(HasCommonProperties)"/>
</Project>
3 changes: 3 additions & 0 deletions src/OpenAL/OpenTK.Audio.OpenAL/Native/ALBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public static void RegisterOpenALResolver()
IntPtr ptr = AL.GetProcAddress(name);
if (ptr == IntPtr.Zero)
{
// FIXME: We want to have a strategy for AOT and trimming here.
// What do we do in contexts where we can't generate functions at runtime...?

// If we can't load the function for whatever reason we dynamically generate a delegate to
// give the user an error message that is actually understandable.
MethodInfo invoke = typeof(TDelegate).GetMethod("Invoke");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Extensions.Creative.EFX
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


// ReSharper disable ExplicitCallerInfoArgument
namespace OpenTK.OpenAL.Extensions.Creative.EFX
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


// ReSharper disable ExplicitCallerInfoArgument
namespace OpenTK.OpenAL.Extensions.Creative.EFX
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


// ReSharper disable ExplicitCallerInfoArgument
namespace OpenTK.OpenAL.Extensions.Creative.EFX
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Extensions.Creative.MultiChannelBuffers
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Extensions.EXT.ALAWFormat
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


// ReSharper disable ExplicitCallerInfoArgument
namespace OpenTK.OpenAL.Extensions.EXT.Capture.Enumeration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Extensions.EXT.Capture
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Extensions.EXT.Capture
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Native.Extensions.EXT.IMA4Format
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Extensions.EXT.MP3Format
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Extensions.EXT.MULAWFormat
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// of the MIT license. See the LICENSE file for details.
//


namespace OpenTK.OpenAL.Extensions.EXT.VorbisFormat
{
/// <summary>
Expand Down
10 changes: 5 additions & 5 deletions src/OpenTK.Compute/OpenCL/CLGL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ public enum ObjectType : uint
ObjectRenderBuffer = 0x2003,

/// <summary>
/// Introduced in OpenCL 1.2
/// Introduced in OpenCL 1.2.
/// </summary>
ObjectTexture2DArray = 0x200E,

/// <summary>
/// Introduced in OpenCL 1.2
/// Introduced in OpenCL 1.2.
/// </summary>
ObjectTexture1D = 0x200F,

/// <summary>
/// Introduced in OpenCL 1.2
/// Introduced in OpenCL 1.2.
/// </summary>
ObjectTexture1DArray = 0x2010,

/// <summary>
/// Introduced in OpenCL 1.2
/// Introduced in OpenCL 1.2.
/// </summary>
ObjectTextureBuffer = 0x2011,
}
Expand All @@ -42,7 +42,7 @@ public enum TextureInfo : uint
MipmapLevel = 0x2005,

/// <summary>
/// Introduced in OpenCL 1.2
/// Introduced in OpenCL 1.2.
/// </summary>
NumSamples = 0x2012,
}
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTK.Core/OpenTK.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<Description>Core shared functionality for the OpenTK library.</Description>
<OutputType>Library</OutputType>
<PackageIcon>icon.png</PackageIcon>
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,6 +19,5 @@

<ItemGroup>
<ProjectReference Include="..\OpenTK.Mathematics\OpenTK.Mathematics.csproj" />
<PackageReference Update="StyleCop.Analyzers" Version="1.1.118" />
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions src/OpenTK.Core/Platform/Bitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ namespace OpenTK.Core.Platform
/// </summary>
public class Bitmap
{
// FIXME: Add stuff like colorspace info?

/// <summary>
/// The width of the bitmap in pixels.
/// </summary>
Expand Down