Forum Xamarin.Forms

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.