Git Product home page Git Product logo

glow's Introduction

Glow

Glow is an OpenGL binding generator for Go. Glow parses the OpenGL XML API registry to produce a machine-generated cgo bridge between Go functions and native OpenGL functions. Glow is a fork of GoGL2.

Features:

  • Go functions that mirror the C specification using Go types.
  • Support for multiple OpenGL APIs (GL/GLES/EGL/WGL/GLX/EGL), versions, and profiles.
  • Support for extensions (including debug callbacks).

See the open issues for caveats about the current state of the implementation.

Generated Packages

Generated OpenGL binding packages are available in the go-gl/gl repository.

Custom Packages

If the prebuilt, go-gettable packages are not suitable for your needs you can build your own. For example,

go get github.com/go-gl/glow
cd $GOPATH/src/github.com/go-gl/glow
go build
./glow download
./glow generate -api=gl -version=3.3 -profile=core -remext=GL_ARB_cl_event
go install ./gl-core/3.3/gl

A few notes about the flags to generate:

  • api: One of gl, gles1, gles2, egl, wgl, or glx.
  • version: The API version to generate. The all pseudo-version includes all functions and enumerations for the specified API.
  • profile: For gl packages with version 3.2 or higher, core or compatibility (explanation).
  • xml: The XML directory.
  • tmpl: The template directory.
  • out: The output directory for generated files.
  • addext: A regular expression describing which extensions to include. .* by default, including everything.
  • restrict: A JSON file that explicitly lists what enumerations / functions that Glow should generate (see example.json).
  • remext: A regular expression describing which extensions to exclude. Empty by default, excluding nothing. Takes precedence over explicitly added regular expressions.
  • lenientInit: Flag to disable strict function availability checks at Init time. By default if any non-extension function pointer cannot be loaded then initialization fails; when this flag is set initialization will succeed with missing functions. Note that on some platforms unavailable functions will load successfully even but fail upon invocation so check against the OpenGL context what is supported.

glow's People

Contributors

capnm avatar dmitshur avatar errcw avatar pwaller avatar slimsag avatar yulon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.