About this project
gpucontext is a shared infrastructure library for the gogpu ecosystem designed to facilitate the sharing of GPU resources across multiple packages while avoiding circular dependencies. It provides a set of typed interfaces and utilities that allow different components to interact with GPU devices, windowing systems, and platform-specific features.
Key capabilities include:
- GPU Resource Management: The DeviceProvider interface enables dependency injection of GPU devices, queues, and adapters, supporting typed sharing without the use of 'any'.
- Window and Platform Integration: WindowProvider and PlatformProvider interfaces handle window geometry, DPI scaling, clipboard access, cursor shapes, and system theme detection (dark mode).
- Event Handling: EventSource and PointerEventSource provide interfaces for keyboard, mouse, and touch input, including specialized support for CJK languages via IME (Input Method Editor) interfaces.
- Texture Utilities: A minimal Texture interface along with TextureUpdater and TextureRegionUpdater for efficient full or partial GPU texture uploads.
- Window Customization: WindowChrome support for frameless windows, custom hit testing for title bars, and runtime fullscreen toggling.
- Backend Registry: A generic, thread-safe Registry[T] for priority-based backend selection.
The library acts as a bridge between low-level WebGPU types (via gputypes) and higher-level frameworks like gogpu, gg, and ui.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.