Skip to content
pubscout

texture_rgba_renderer

0.0.16, released 4 years ago by kingtous.cn

A texture helper providing high and low level APIs to handle BGRA data for Flutter.

$ flutter pub add texture_rgba_renderer
Source repository

What it does

Brings high and low-level APIs to handle BGRA data for Flutter textures on desktop platforms. Uses OpenGL implementations to achieve hardware acceleration and minimize frame copying.

AI-written summary of version 0.0.16, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need high-performance BGRA/RGBA rendering on desktop platforms like Linux, Windows, or macOS.
  • You are streaming or processing video/image frames that require native performance via FFI.

Skip it when

  • You are building for mobile or web platforms (only Windows, macOS, and Linux are supported).
  • You do not need low-level raw texture rendering.

Strengths

  • Provides both Dart method channel and native FFI APIs for extreme performance optimization.
  • Hardware-accelerated rendering using OpenGL for desktop platforms.
  • Only one time frame copy required.

Weaknesses

  • Limited to desktop platforms (Linux, Windows, macOS).
  • Requires manual lifecycle management of native buffers when using the native FFI API.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
1

Requires ensuring BGRA format is used for all platforms and managing buffer lifecycles if using the native API.

_textureRgbaRendererPlugin.createTexture(key).then((textureId) {
      if (textureId != -1) {
        debugPrint("Texture register success, textureId=$textureId");
        setState(() {
          this.textureId = textureId;
        });
      } else {
        return;
      }
    });

Works with

Packages commonly used together with texture_rgba_renderer: ones it builds on, ones built on it, and its own family.