An open API service indexing awesome lists of open source software.

https://github.com/wang-bin/ugs

universal graphics surface
https://github.com/wang-bin/ugs

Last synced: 9 months ago
JSON representation

universal graphics surface

Awesome Lists containing this project

README

          

# UGS: Universal Graphic Surface

### PlatformSurface

The layer between platform depended window/view/surface handle and GFX context. For example OpenGL context can be created via `nativeHandleForGL()` depending on `type()` and `nativeResource()` when necessary.

- A wrapper for platform dependent handle: macOS NSView, iOS UIView, android jni Surface object, win32 HWND
- Internally created handle: win32, x11, gbm, wayland, rpi dispmanx

### RenderLoop

It's an abstract class implements threaded rendering loop with any number of `PlatformSurface`.

A derived class only need to implement how to manage GFX context for a given surface, for example, create/destroy/active/swap OpenGL context.

Do your rendering jobs in `RenderLoop` callbacks.

### TODO
- platform surface wrapper around more native handle types: wayland, xlib, xcb, gbm
- internal created handles: macOS

> License: [MPL version 2.0](http://mozilla.org/MPL/2.0/). You can freely use it in your commercial or opensource software.

> Wang Bin, wbsecg1 at gmail.com, 2017~2020