GithubHelp home page GithubHelp logo

gorb's Introduction

Go Red Book

Examples from OpenGL Programming Guide, Eighth Edition ported to the Go Programming Language.

In addition to being ported from C++ to Go, the following additional changes have been made:

  • code initializing OpenGL/creating windows, has been moved to the utils package in order to reduce duplicating code that does not change between examples.
  • where appropriate the examples have been modified to have a more consistent flow from one example to the next. This involves some of the following:
    • using the same style in all shaders (not usually a problem with Go).
    • consistent naming of variables across all examples. If it is called "MCvertex" in one example, it should be called "MCvertex" in all examples.
  • any modifications specific to the examples, should be documented in the "Notes" section of the example.

Chapter 1: Introduction to OpenGL

Chapter 3: Drawing with OpenGL

Chapter 4: Color, Pixels, and Framebuffers

Running Examples

First see "Installing Examples" if you have not done so already.

$ cd $GOPATH/src/github.com/hurricanerix/gorb
$ make
mkdir -p bin
go build -o bin/ch01-triangles 01/triangles/main.go
go build -o bin/ch03-drawcommands 03/drawcommands/main.go
...
$ ./ch01-triagnles
...

Installing Examples

  1. Install Go

  2. Platform specific stuff (see sections below)

  3. go get

From your terminal run the following command:

$ go get github.com/hurricanerix/gorb/...

Linux

$ sudo apt-get install git-core libgl1-mesa-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev

OSX

$ brew install glfw3

Windows

TODO: Figure this out...

gorb's People

Contributors

hurricanerix avatar

Watchers

 avatar

Forkers

aerwin3

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.