Skip to content

Xamarin Forms SKGLView not rendering on iOS #646

@freever

Description

@freever

Hi

I have a Xamarin.Forms project that renders a 2D map inside a container. The map itself uses an SKCanvasView control to do its drawing, and this works well on iOS, Android and UWP.

I want to switch to an SKGLView to improve performance. The two APIs are almost identical so it's easy to swap in one for the other, and this works on Android and UWP to good effect. The performance boost on Android is particularly significant.

However when I run the same code on iOS I get a black screen and the following error:

Failed to bind EAGLDrawable: <CAEAGLLayer: 0x1c2a3b840> to GL_RENDERBUFFER 1
Failed to make complete multisample framebuffer object 8cd6
Failed to make complete framebuffer object 8cd6

As far as I can tell, this has something to do with rendering on a view that isn't visible, so I've hooked in to Xamarin.Forms OnAppearing and OnDisappearing events to attempt the render only when the view is visible, however it doesn't help.

I don't know if my understanding of the problem is correct, or if it is, are there better ways to solve it. Could you perhaps suggest something?

Thanks

VS bug #770232

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions