Giter Site home page Giter Site logo

gl's Introduction

gl | OpenGL Bindings for golang

You will need GLEW at least version 1.5.4.

Once GLEW is installed, you can install this package with go get:

go get github.com/go-gl-legacy/gl

Contact / discussion mailing list

The discussion is hosted on google groups. We can also be found periodically on IRC, #go-gl on freenode.

Documentation and examples

Autogenerated documentation can be found on godoc.org, and the more thorough official GL SDK documentation applies.

Examples can be found in our examples repository.

More libraries: Easy windowing, meshes, text rendering, etc:

Problems and contributing

If you encounter any problems please file an issue. Pull requests are welcome. We're looking for contributors!

Setting your GOPATH

For the above go get to work without without requiring admin privileges, please refer to go documentation or this five minute go screencast.

Operating System Specific advice

The go-gl/gl authors primarily develop on Linux-based machines. The package should work on other operating systems, if you encounter problems after following the instructions below, please file an issue.

Linux / OSX

This package uses cgo and therefore you will need a C compiler such as GCC. On Debian, you can install build-essential to get this.

You need to install the GLEW development libraries the appropriate package manager for your Linux distribution or by downloading the sources from the GLEW website.

For non-standard GLEW install locations, after go get cd to $GOPATH/src/github.com/go-gl-legacy/gl and run:

CGO_CFLAGS="-I/path/to/includes" CGO_LDFLAGS="-L/path/to/libs" go install

You may be able to determine the appropriate flags using:

pkg-config glew --libs --cflags

Note that we import from GL/glew.h, so if pkg-config --cflags reports /opt/include/GL, you may need to remove /GL so that CGO_CFLAGS=-I/opt/include.

OSX

The following instructions are currently a best guess. If you develop on OSX please get in contact and let us know if this works, or not!

GLEW from Homebrew / Macports

These can be used to install GLEW. Beware that you may need to set CGO_CFLAGS and CGO_LDFLAGS - the Linux instructions above are relevant.

Windows

Windows support is currently unknown. gl uses cgo, and therefore you will need a C compiler. If you install the GLEW to your compiler's include and lib directories, things should work. If they do not, please contact us.

OpenGL 4.*

The glew-1.10 branch is available for those that need newer OpenGL 4.* functionality. To use it, manually clone the repository and checkout the branch. As the branchname implies, it's using GLEW 1.10.

Forward compatibility

It is the intent of the go-gl authors to keep gl and related packages forward-compatible at both the API/ABI levels per go release so that you can continue to import from this github repository. Development requiring breakage will occur on the glew-1.10 branch, and will be merged with master when a new go version is released.

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.