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

SKGLView on .NET MAUI is missing a handler #2050

Closed
praeclarum opened this issue May 19, 2022 · 8 comments · Fixed by #2598
Closed

SKGLView on .NET MAUI is missing a handler #2050

praeclarum opened this issue May 19, 2022 · 8 comments · Fixed by #2598
Labels
area/SkiaSharp.Views.Maui Issues relating to the views for .NET MAUI mobile/desktop applications. backend/OpenGL partner/maui Issues and PRs that are/should being looked at or worked on by the Microsoft .NET MAUI partners.

Comments

@praeclarum
Copy link

I can’t use SKGLView because its handler is missing. SKCanvasView works fine.

new SKGLView();

Expected Behavior

A working OpenGL view.

Actual Behavior

Runtime error saying no handler found.

Basic Information

  • Version with issue: latest
  • Last known good version: none
  • IDE: VSMPreview
  • Platform Target Frameworks:
    • macCatalyst:
  • Target Devices:
    • Mac
@mattleibow
Copy link
Contributor

Yeah... Seems the iOS team deleted that. There is no GL view for mac cat. Not sure what to do. Might need to use metal, but this is slightly different.

@praeclarum
Copy link
Author

Tell them to put it back. Mac Cat supports OpenGL.

@praeclarum
Copy link
Author

praeclarum commented May 20, 2022

I opened an issue. This is mind-blowingly painful. What is going on over there? dotnet/macios#15083

@praeclarum
Copy link
Author

@mattleibow I would be willing to test the Metal version. Is that stable? How do I use it from MAUI? I don’t see a Maui.Controls.SKMetalView

I get that the names are weird. Maybe you could introduce an SKGpuView for those of us who need fast renderers.

@praeclarum
Copy link
Author

OK, looks like Apple has removed GL from Catalyst. FML :-)

So… How about that MAUI SKGpuView That uses Metal on Apple and GL everywhere else? :-)

@xtuzy
Copy link

xtuzy commented May 21, 2022

Hope Skiasharp can have more perfect support😊

platform ios android winui3 maccatalyst
cpu SKCanvasView SKCanvasView SKXamlCanvas SKCanvasView
gpu SKGLVIew,SKMetalView SKGLSurfaceView,SKSurfaceView,SKGLTextureView SKMetalView
platform ios android winui3 maccatalyst
maui cpu SKCanvasView
maui gpu SKGLVIew

@mattleibow mattleibow added the area/SkiaSharp.Views.Maui Issues relating to the views for .NET MAUI mobile/desktop applications. label May 22, 2022
@marcojak
Copy link

Does it mean that for MAUI we don't have gpu support on WinUI3 and MacCatalyst?
Is it something that is going to change?

@charlesroddie
Copy link

Agreed the SkGpuView is a good idea.

On the subject of ios/maccatalyst naming, ios seems to include maccatalyst which is a bit confusing. Perhaps SkiaSharp.Views.Uikit would be more accurate.

Currently this is regulated by:

public class SKMetalView : MTKView, IMTKViewDelegate, IComponent

#if __IOS__
namespace SkiaSharp.Views.iOS
#elif __MACOS__
namespace SkiaSharp.Views.Mac
#endif

And catalyst seems to be IOS. For example

<DefineConstants>$(DefineConstants);__IOS__</DefineConstants>

<PropertyGroup Condition="'$(TargetFramework)'=='net6.0-ios' or '$(TargetFramework)'=='net6.0-maccatalyst'">

@mattleibow mattleibow changed the title [BUG] SKGLView on MAUI Mac Catalyst is missing a handler [BUG] SKGLView on .NET MAUI is missing a handler Sep 6, 2023
@mattleibow mattleibow changed the title [BUG] SKGLView on .NET MAUI is missing a handler SKGLView on .NET MAUI is missing a handler Sep 6, 2023
@mattleibow mattleibow added backend/OpenGL partner/maui Issues and PRs that are/should being looked at or worked on by the Microsoft .NET MAUI partners. labels Sep 6, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/SkiaSharp.Views.Maui Issues relating to the views for .NET MAUI mobile/desktop applications. backend/OpenGL partner/maui Issues and PRs that are/should being looked at or worked on by the Microsoft .NET MAUI partners.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants