VideoTools/vendor/github.com/fyne-io/gl-js/README.md
Stu Leak 68df790d27 Fix player frame generation and video playback
Major improvements to UnifiedPlayer:

1. GetFrameImage() now works when paused for responsive UI updates
2. Play() method properly starts FFmpeg process
3. Frame display loop runs continuously for smooth video display
4. Disabled audio temporarily to fix video playback fundamentals
5. Simplified FFmpeg command to focus on video stream only

Player now:
- Generates video frames correctly
- Shows video when paused
- Has responsive progress tracking
- Starts playback properly

Next steps: Re-enable audio playback once video is stable
2026-01-07 22:20:00 -05:00

50 lines
1.8 KiB
Markdown

[![Tests](https://github.com/fyne-io/gl-js/actions/workflows/tests.yml/badge.svg)](https://github.com/fyne-io/gl-js/actions/workflows/tests.yml)
[![Static Analysis](https://github.com/fyne-io/gl-js/actions/workflows/analysis.yml/badge.svg)](https://github.com/fyne-io/gl-js/actions/workflows/analysis.yml)
[![GoDoc](https://godoc.org/github.com/fyne-io/gl-js?status.svg)](https://godoc.org/github.com/fyne-io/gl-js)
# GL
Package gl is a Go cross-platform binding for OpenGL, with an OpenGL ES 2-like API.
It supports:
- **macOS**, **Linux** and **Windows** via OpenGL 2.1 backend,
- **iOS** and **Android** via OpenGL ES 2.0 backend,
- **Modern Browsers** (desktop and mobile) via WebGL 1.0 backend.
This is a fork of golang.org/x/mobile/gl package with [CL 8793](https://go-review.googlesource.com/8793)
merged in and Windows support added. This package is fully functional, but may eventually become superceded by
the new x/mobile/gl plan. It will exist and be fully supported until it can be safely replaced by a better package.
## Installation
```bash
go get github.com/fyne-io/gl-js
```
## Usage
This OpenGL binding has a ContextWatcher, which implements [glfw.ContextWatcher](https://godoc.org/github.com/goxjs/glfw#ContextWatcher)
interface. Recommended usage is with github.com/fyne-io/glfw-js package, which accepts a ContextWatcher in its Init, and takes on the responsibility
of notifying it when context is made current or detached.
```go
if err := glfw.Init(gl.ContextWatcher); err != nil {
// Handle error.
}
defer glfw.Terminate()
```
If you're not using a ContextWatcher-aware glfw library, you must call methods of gl.ContextWatcher yourself whenever
you make a context current or detached.
```Go
window.MakeContextCurrent()
gl.ContextWatcher.OnMakeCurrent(nil)
glfw.DetachCurrentContext()
gl.ContextWatcher.OnDetach()
```