Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/fyne-io/gl-js

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/fyne-io/gl-js

  • v0.0.0-20230506162202-1fdaa286a934
  • Source
  • Go
  • Socket score

Version published
Created
Source

gl Build Status GoDoc

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 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

go get -u github.com/fyne-io/gl-js/...
GOARCH=js go get -u -d github.com/fyne-io/gl-js/...

Usage

This OpenGL binding has a ContextWatcher, which implements 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.

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.

window.MakeContextCurrent()
gl.ContextWatcher.OnMakeCurrent(nil)

glfw.DetachCurrentContext()
gl.ContextWatcher.OnDetach()

FAQs

Package last updated on 06 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc