initPlatformState method

Future<void> initPlatformState()

Implementation

Future<void> initPlatformState() async {
  if(texture == null){
    await angle?.init();

    texture = await angle?.createTexture(
      AngleOptions(
        width: width.toInt(),
        height: height.toInt(),
        dpr: _resolution!,
        alpha: settings.alpha,
        antialias: settings.antialias,
        customRenderer: !settings.useSourceTexture,
        useSurfaceProducer: true
      )
    );
  }

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