flutter3d_impeller library

flutter_gpu as an implementation of flutter3d_hardware.

An application constructs GpuRenderBackend and hands it to Renderer.create. Nothing else in the stack names flutter_gpu, which is the property this package exists to hold: the engine is written against the HAL, and swapping this out for another backend is a change to one line of application wiring.

Classes

GpuFrameImage
A RawImage over the flutter_gpu texture inside frame.
GpuRenderBackend
flutter_gpu as a GraphicsDevice.
ImpellerSectionCompiler
Impeller's material compiler: it names the section a material's bundle carries for this backend, and says that nothing is compiled for it while a game runs.

Constants

impellerBackendName → const String
The name this backend refuses in, as UnsupportedCapabilityException.backend.

Functions

registerGpuBackend(DeviceRegistry<Object> registry, {MaterialCompilerRegistry? compilers}) → Registration
Adds Impeller to registry — preferred over anything added before it — with the presenter that shows its frames. The registration takes both out again. Since 1.0 it is added to the engine's own registry rather than to a global one (it was ensureGpuBackendRegistered).
stampedEngineBundle(List<int> impellerc, {required String manifest, required String dart, required String engine, List<String> needs = const <String>[], bool full = true}) → ByteData
impellerc's output for the stages manifest (the bundle manifest's JSON) lists, in the engine's container: the stage list, the compiled section, and the EngineBundleStamp with dart and engine, needs and full.

Exceptions / Errors

ShaderBundleBuildException
Thrown on any failure compiling the bundle — hook/build.dart wraps it as a BuildError, bin/build_shader_bundle.dart prints it and exits non-zero. Plain rather than a package:hooks type, because this file has no reason to depend on hooks at all.