![]() |
Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
A Blazor WebGL render surface that draws Gondwana scenes through an GpuBackbuffer without transferring frame pixels through JavaScript. More...
Public Member Functions | |
| override void | Dispose () |
| Public Member Functions inherited from Gondwana.Blazor.Rendering.BlazorRenderSurfaceComponentBase | |
| void | Dispose () |
| Releases resources owned by the concrete render surface component. | |
Protected Member Functions | |
| override void | OnInitialized () |
| override void | OnParametersSet () |
| override async Task | OnAfterRenderAsync (bool firstRender) |
| Protected Member Functions inherited from Gondwana.Blazor.Rendering.BlazorRenderSurfaceComponentBase | |
| override void | OnParametersSet () |
| void | HandleKeyDown (KeyboardEventArgs e) |
| Forwards a browser key-down event to registered input adapters. | |
| void | HandleKeyUp (KeyboardEventArgs e) |
| Forwards a browser key-up event to registered input adapters. | |
| void | HandleMouseMove (MouseEventArgs e) |
| Forwards a browser mouse-move event to registered input adapters. | |
| void | HandleMouseDown (MouseEventArgs e) |
| Forwards a browser mouse-down event to registered input adapters. | |
| void | HandleMouseUp (MouseEventArgs e) |
| Forwards a browser mouse-up event to registered input adapters. | |
| void | HandleWheel (WheelEventArgs e) |
| Forwards a browser wheel event to registered input adapters. | |
| Task | HandleTouchStart (TouchEventArgs e) |
| Forwards a browser touch-start event to registered input adapters. | |
| Task | HandleTouchMove (TouchEventArgs e) |
| Forwards a browser touch-move event to registered input adapters. | |
| Task | HandleTouchEnd (TouchEventArgs e) |
| Forwards a browser touch-end event to registered input adapters. | |
| void | HandleTouchCancel (TouchEventArgs e) |
| Forwards a browser touch-cancel event to registered input adapters. | |
Properties | |
| BlazorGpuRenderSurfaceAdapter | Adapter = null! [get] |
| Gets the adapter that coordinates engine frame requests with this component. | |
| RenderSurfaceHost< GpuBackbuffer > | Host = null! [get] |
| Gets the GPU render-surface host bound to this component. | |
| Properties inherited from Gondwana.Blazor.Rendering.BlazorRenderSurfaceComponentBase | |
| Dictionary< string, object >? | AdditionalAttributes [get, set] |
| Gets or sets additional attributes applied to the underlying HTML canvas element. | |
| IReadOnlyDictionary< string, object >? | CanvasAttributes [get] |
| Gets the canvas attributes with the component-owned style attribute removed. | |
| string | CanvasStyle = DefaultCanvasStyle [get] |
| Gets the effective canvas style, including Gondwana's required defaults. | |
A Blazor WebGL render surface that draws Gondwana scenes through an GpuBackbuffer without transferring frame pixels through JavaScript.
The component uses SKGLView's built-in animation loop as the single browser requestAnimationFrame source for the WebGL path. Each paint callback advances the timer-driven engine and, when the engine's foreground cadence requests a new scene frame, renders that frame immediately while the WebGL context is current.
Browser animation frames that do not require a new Gondwana scene render simply re-blit the current GPU backbuffer. This preserves Gondwana.Configuration.EngineConfiguration.TargetFPS semantics without introducing a second animation-frame scheduler or a CPU pixel transfer.
The GPU context is obtained from SKPaintGLSurfaceEventArgs.Surface while the WebGL context is current. Scene rendering and the final GPU-to-GPU surface draw both occur synchronously inside that callback. Linear scaling uses a scoped GPU texture snapshot; unscaled and nearest-neighbor presentation draw the surface directly. No frame pixels are read back.
Definition at line 34 of file BlazorGpuRenderSurfaceComponent.razor.cs.
| override void Gondwana.Blazor.Rendering.BlazorGpuRenderSurfaceComponent.Dispose | ( | ) |
Definition at line 167 of file BlazorGpuRenderSurfaceComponent.razor.cs.
|
protected |
Definition at line 92 of file BlazorGpuRenderSurfaceComponent.razor.cs.
|
protected |
Definition at line 61 of file BlazorGpuRenderSurfaceComponent.razor.cs.
|
protected |
Definition at line 69 of file BlazorGpuRenderSurfaceComponent.razor.cs.
|
get |
Gets the adapter that coordinates engine frame requests with this component.
Definition at line 46 of file BlazorGpuRenderSurfaceComponent.razor.cs.
|
get |
Gets the GPU render-surface host bound to this component.
Definition at line 49 of file BlazorGpuRenderSurfaceComponent.razor.cs.