GPURenderer class abstract
GPU rendering abstraction layer.
Provides an interface for future GPU-accelerated rendering via flutter_gpu / Impeller when it becomes stable. Currently serves as documentation of the target API.
When flutter_gpu matures, implement GPURenderer with:
- gpu.RenderTarget for off-screen rendering
- gpu.CommandBuffer for batched draw calls
- gpu.Shader for custom GLSL/Metal shaders
- gpu.HostBuffer for vertex/index data upload
This allows vrlizate to seamlessly upgrade from Canvas to GPU rendering without changing the scene graph API.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAvailable → bool
-
Whether GPU rendering is available on this platform.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
beginFrame(
double width, double height) → void - Begins a new render frame.
-
bindShader(
String vertexShader, String fragmentShader) → void - Binds a shader program.
-
bindVertexBuffer(
List< double> vertices, List<int> indices) → void - Binds a vertex buffer for rendering.
-
dispose(
) → void - Releases GPU resources.
-
draw(
) → void - Draws the currently bound geometry.
-
endFrame(
) → Future - Ends the frame and returns the rendered image.
-
initialize(
) → Future< void> - Initializes the GPU context.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setUniform(
String name, dynamic value) → void - Sets a uniform value.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited