OpenGL ES hardware accelerated rendering on Flutter Windows Texture
Widget using ANGLE.
ANGLE (Almost Native Graphics Layer Engine) is used in this example, which translates these OpenGL ES calls to DirectX 11 (which Flutter Windows now supports) calls internally. The example uses the new Direct3D texture interop capability for Flutter Windows added by @jnschulze.
I compiled ANGLE for Windows on my machine & .DLLs / .LIBs are present in this repository, which are used by the application. The code in this repository is very straightforward & procedurally written without any boilerplate. I hope this serves as a great example.
As of 07/07/2022, you need to be on master
channel of Flutter.
Flutter 3.1.0-0.0.pre.1533 • channel master • https://github.com/flutter/flutter.git
Framework • revision 78e3b93664 (5 hours ago) • 2022-07-07 08:34:06 -0400
Engine • revision 56faff459e
Tools • Dart 2.18.0 (build 2.18.0-261.0.dev) • DevTools 2.15.0
git clone https://github.com/alexmercerind/flutter-windows-ANGLE-OpenGL-ES.git
cd flutter-windows-ANGLE-OpenGL-ES
cd example
flutter run --verbose
- @jnschulze for working on Windows: Add Direct3D texture interoperability support in flutter/engine.
- @clarkezone for awesome ANGLE + Windows article at A common OpenGL renderer for UWP and Win32 using ANGLE and Win.UI.Composition.