initPlatformState method

Future<void> initPlatformState()

Implementation

Future<void> initPlatformState() async {
  width = screenSize!.width;
  height = screenSize!.height;
  if(texture == null){
    await FlutterAngle.initOpenGL(true);

    texture = await FlutterAngle.createTexture(
      AngleOptions(
        width: width.toInt(),
        height: height.toInt(),
        dpr: dpr,
        alpha: settings.alpha,
        antialias: true,
        customRenderer: false,
      )
    );
  }

  console.info(texture?.toMap());
  gl = texture!.getContext();
  await initScene();
}