You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this intentional? Does Skia only support OpenGL on iOS? Is there any plan to implement Metal for iOS?
Also, I'm testing on the iOS simulator, so it's possible the simulator isn’t utilizing the GPU (which may be my error), but even if I’m doing something wrong, it seems that SKGLView on iOS is using a deprecated dependency.
Here’s the method creating the deprecated context:
// https://github.com/mono/SkiaSharp/blob/main/source/SkiaSharp.Views/SkiaSharp.Views/Platform/iOS/SKGLView.csprivatevoidInitialize(){designMode=((IComponent)this).Site?.DesignMode==true||!EnvironmentExtensions.IsValidEnvironment;if(designMode)return;// create the GL contextContext=newEAGLContext(EAGLRenderingAPI.OpenGLES2);DrawableColorFormat=GLKViewDrawableColorFormat.RGBA8888;DrawableDepthFormat=GLKViewDrawableDepthFormat.Format24;DrawableStencilFormat=GLKViewDrawableStencilFormat.Format8;DrawableMultisample=GLKViewDrawableMultisample.Sample4x;// hook up the drawing Delegate=this;}
There are two version of the shader in the code, the one I used is a simple random pattern but the one I wanna used is the 'beornottobemain' that contains a cloud simulation. The cloud simulation works great in Mac but it does even move in the iossimulator.
Desktop:
Screen.Recording.2024-11-24.at.21.44.03.mov
iOS Sim
Screen.Recording.2024-11-24.at.21.45.52.mov
Any insights or guidance on this would be greatly appreciated. Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I’m new here and have been experimenting with Skia shaders. I created a simple app to render shaders from [ShaderToy](https://www.shadertoy.com/), and while the app works great on macOS, it’s unusable on iOS. After investigating, I found that
SKGLViewHandler
usesSKGLView
, which in the iOS implementation creates the deprecatedEAGLContext
([Apple Documentation](https://developer.apple.com/documentation/opengles/eaglcontext)).Is this intentional? Does Skia only support OpenGL on iOS? Is there any plan to implement Metal for iOS?
Also, I'm testing on the iOS simulator, so it's possible the simulator isn’t utilizing the GPU (which may be my error), but even if I’m doing something wrong, it seems that
SKGLView
on iOS is using a deprecated dependency.Here’s the method creating the deprecated context:
My code https://github.com/dluciano/skiaaot. And some screenshots
The important code is: https://github.com/dluciano/skiaaot/blob/main/SkiaAot/MainPage.cs
There are two version of the shader in the code, the one I used is a simple random pattern but the one I wanna used is the 'beornottobemain' that contains a cloud simulation. The cloud simulation works great in Mac but it does even move in the iossimulator.
Desktop:
Screen.Recording.2024-11-24.at.21.44.03.mov
iOS Sim
Screen.Recording.2024-11-24.at.21.45.52.mov
Any insights or guidance on this would be greatly appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions