mono / opentk

OpenTK is a set of bindings to OpenGL, OpenCL and OpenAL. This is not the main repository, just a temporary import to allow Mono developers to make changes to this module. Please do not contribute changes here, contribute them to the upstream maintainers at http://www.opentk.com
http://www.opentk.com
115 stars 66 forks source link

Missing iOS support for Xamarin.Legacy.OpenTK #36

Open prollin opened 2 years ago

prollin commented 2 years ago

xamarin.ios10 and net6-ios seem to be missing from Xamarin.Legacy.OpenTK package. Looking at OpenTK.Android.csproj, there seem to have been an attempt.

This would help transitioning older xamarin.ios projects relying on OpenTK to net6.

kaalus commented 1 year ago

Second that. There is currently no OpenTK available for net7-ios.

Perksey commented 1 year ago

This has been intentionally removed.

See #19 https://github.com/xamarin/xamarin-macios/issues/13160 https://github.com/xamarin/xamarin-macios/issues/5107

jurganson commented 1 year ago

What are our options here in terms of getting a ported-to-MAUI Xamarin.iOS application which heavily uses the Xamarin.Legacy.OpenTK package to run again? Even though switching away from OpenGL is an option, this will take time and until then I have a hard time seeing a good migration alternative for iOS.

I have experimented with simply binding the OpenTK 4.X from .nuget to the relevant GLES frameworks but I keep getting wierd fatal errors and I am afraid that from the time of the original fork from OpenTK of mono/opentk to now, the mono/opentk api has changed so much that trying to simply bind through OpenTK 4.X might also be a lot of work.

Does anyone have experience with getting their MAUI ported Xamarin.iOS OpenGLES mono/OpenTK up and running again without having to change too much of the "GL.xxx" code?

tanis2000 commented 12 months ago

What are the options for whoever still needs to stick to Xamarin and have OpenTK run on iOS?

Perksey commented 12 months ago

You can attempt to use OpenTK 3.X on modern .NET, but it's not really supported and you'll get compiler warnings. OpenTK 4.X has no mobile support. Alternatives like Silk.NET are available too for OOTB mobile support for full-screen applications.

MAUI (Xamarin.Forms) support (OpenGLView) for OpenGL has been removed. Xamarin.iOS and Xamarin.Android still have the same API set so you can in theory reimplement your integration almost as-is and hook into any of the above.

tanis2000 commented 11 months ago

@Perksey thanks for the feedback. My case is a Forms app where the OpenGLView is embedded together with other controls. It looks like my only choice so far is to have my GL code be part of a shared code project and just rely on the OpenTK 1.0 that comes together with Xamarin.iOS and Xamarin.Android.

magerate commented 10 months ago

Any update on this? Is it still possible to use OpenTK on dotnet-iOS xx?