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

[Samples App] Open GL control arent visible. #18368

Closed
Darsh0307 opened this issue Oct 2, 2024 · 6 comments · Fixed by #18850
Closed

[Samples App] Open GL control arent visible. #18368

Darsh0307 opened this issue Oct 2, 2024 · 6 comments · Fixed by #18850
Assignees
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification

Comments

@Darsh0307
Copy link
Contributor

Darsh0307 commented Oct 2, 2024

Current behavior

Whenever running Uno Samples app from 5.5 dev , i am not able to see the Open GL components (GLCanvasElement_Cube and GLCanvasElement_Simple ). This problem is coming with Skia Desktop on Windows. The Artifact was downloaded from the given below link.

https://dev.azure.com/uno-platform/Uno%20Platform/_build/results?buildId=138842&view=artifacts&pathAsName=false&type=publishedArtifacts

I have also shared given below the logs message coming when running Skia desktop on Windows.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\DarshPatel\Downloads\skia-generic-samples-app-WinUI\skia-generic-samples-app-WinUI> dotnet SamplesApp.Skia.Generic.dll
dbug: Uno.UI.Runtime.Skia.SkiaHostBuilder[0]
      Host builder Uno.UI.Runtime.Skia.X11HostBuilder is not supported
dbug: Uno.UI.Runtime.Skia.SkiaHostBuilder[0]
      Host builder Uno.UI.Runtime.Skia.FramebufferHostBuilder is not supported
dbug: Uno.UI.Runtime.Skia.SkiaHostBuilder[0]
      Using host builder Uno.UI.Runtime.Skia.WpfHostBuilder
info: Uno.UI.Runtime.Skia.Wpf.UI.Controls.UnoWpfWindow[0]
      Loading icon file [C:\Users\DarshPatel\Downloads\skia-generic-samples-app-WinUI\skia-generic-samples-app-WinUI\Assets\StoreLogo.png] from Package.appxmanifest file
warn: Microsoft.UI.Xaml.FrameworkTemplatePool[0]
      Template pooling is disabled in this build of Uno Platform. See https://github.com/unoplatform/uno/issues/13969
info: SampleControl.Presentation.SampleChooserViewModel[0]
      Found 1277 sample(s) in 117 categories.
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [ControlName] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [ControlName] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [CategoriesString] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [CategoriesString] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [Description] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [Description] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [ControlType] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [ControlType] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [QueryString] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
fail: Uno.UI.DataBinding.BindingPropertyHelper[0]
      The [QueryString] property getter does not exist on type [SampleControl.Presentation.SampleChooserViewModel]
dbug: Uno.UI.Runtime.Skia.Wpf.Rendering.WpfRendererProvider[0]
      Validating  rendering
warn: Uno.UI.Runtime.Skia.Wpf.Rendering.WpfRendererProvider[0]
      OpenGL failed to initialize, using software rendering
HandleLaunchArguments:
Screenshots path:
Total groups: 1
Current group index: 0
Automated runtime tests output file:
Section changed: SamplesContent
Done loading 00:00:00.3718932

Screenshot 2024-09-30 at 4 09 24 PM

Expected behavior

We should be able to see GLCanvasElement_Cube and GLCanvasElement_Simple both component s in the samples app.

How to reproduce it (as minimally and precisely as possible)

  1. Dowload the skia-generic-samples-app-WinUI zip file from the Azure Devops artifacts
  2. After downloading Extract the zip file.
  3. Open terminal and go the directory where the skia-generic-samples-app-WinUI file is present.
  4. In terminal type the given comamnd dotnet SamplesApp.Skia.Generic.dll
  5. This will open the samples app
  6. Open GLCanvasElement_Cube and GLCanvasElement_Simple both the controls.

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

@Darsh0307 Darsh0307 added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Oct 2, 2024
@jeromelaban
Copy link
Member

@ramezgerges I think we should be reporting those errors either through events, or with an error message that shows in place in the control itself.

@ramezgerges
Copy link
Contributor

Fixed by #18385. You should see an image with the text "OpenGL error".

@Darsh0307
Copy link
Contributor Author

Hey @ramezgerges

Still its not showing the text as OpenGL error , I did tried to create the Uno app using 5.5.29 as the Uno UI CLI
https://dev.azure.com/uno-platform/Uno%20Platform/_build/results?buildId=144747&view=results

Screenshot 2024-10-24 at 9 00 18 AM
Screenshot 2024-10-24 at 9 00 25 AM

@Darsh0307 Darsh0307 assigned ramezgerges and unassigned Darsh0307 Oct 24, 2024
@agneszitte
Copy link
Contributor

agneszitte commented Oct 24, 2024

@jeromelaban, @ramezgerges should we re-open this issue then based on what @Darsh0307 shared above ?

@agneszitte agneszitte reopened this Nov 5, 2024
@agneszitte
Copy link
Contributor

agneszitte commented Nov 5, 2024

After talking with @ramezgerges, we will keep the issue open until we understand why @Darsh0307 is still able to reproduce the issue on his side

@jeromelaban
Copy link
Member

@ramezgerges Looking at my environment, the following exception happens:

fail: Microsoft.UI.Xaml.UIElement[0]
      OnElementLoaded failed in FrameworkElement
      System.InvalidOperationException: No function was found with the name glGenBuffers.
         at Uno.UI.Runtime.Skia.Wpf.Extensions.WpfNativeOpenGLWrapper.GetProcAddress(String proc) in C:\a\1\s\src\Uno.UI.Runtime.Skia.Wpf\Extensions\WpfNativeOpenGLWrapper.cs:line 138
         at Uno.WinUI.Graphics3DGL.GLCanvasElement.Silk.NET.Core.Contexts.INativeContext.GetProcAddress(String proc, Nullable`1 slot) in C:\a\1\s\src\AddIns\Uno.WinUI.Graphics3DGL\GLCanvasElement.cs:line 327
         at Silk.NET.OpenGL.GL._B.get__AFB()
         at Silk.NET.OpenGL.GL.GenBuffers(UInt32 n, UInt32* buffers)
         at Silk.NET.OpenGL.GL.GenBuffer()
         at Uno.WinUI.Graphics3DGL.GLCanvasElement.FrameBufferDetails..ctor(GL gl, Size renderSize) in C:\a\1\s\src\AddIns\Uno.WinUI.Graphics3DGL\GLCanvasElement.FrameBufferDetails.cs:line 21
         at Uno.WinUI.Graphics3DGL.GLCanvasElement.UpdateFramebuffer() in C:\a\1\s\src\AddIns\Uno.WinUI.Graphics3DGL\GLCanvasElement.cs:line 274
         at Uno.WinUI.Graphics3DGL.GLCanvasElement.OnLoaded(Object sender, RoutedEventArgs routedEventArgs) in C:\a\1\s\src\AddIns\Uno.WinUI.Graphics3DGL\GLCanvasElement.cs:line 185
         at Microsoft.UI.Xaml.FrameworkElement.<OnFwEltLoaded>g__InvokeLoadedWithTry|333_1() in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 111

We should be able to handle this properly, and probably provide a way to customize the content that shows up when OpenGL is not supported properly. We could provide an ErrorTemplate property or similar that the control would show in case of an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants