Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

GRContext.Create(GRBackend.OpenGL), for hardware accelerating SkiaSharp, returns null.

MattJackMattJack FRMember ✭✭
edited August 2019 in Xamarin.Forms

I have a running SkiaSharp project that I want to hardware accelerate.
I am under Android for now, using a simulator (Genymotion)
[EDIT] Also tested with device (same result)
Problem, the GRContext I try to create is null.

Code 1:
var glInterface = GRGlInterface.CreateNativeGlInterface();
var grContext = GRContext.Create(GRBackend.OpenGL, glInterface);
=> grContext is null

Code 2 :
var info = new SKImageInfo(500,500);
var context = GRContext.Create(GRBackend.OpenGL);
=> grContext is null

How to get a valid GRContext under Android?
Is there a kind of opengl initialization to execute before.

Sign In or Register to comment.