Go and Oberon sample programs of OpenGL 3D graphics.
Примеры программ, реализующих 3D-графику с помощью OpenGL на языках Go и Oberon.
Find list of sample programs in the bottom.
-
Install Go, GCC, OpenGL and SDL2. GCC is required by
go get
commands below. -
Open terminal (or Command Prompt on Windows) and type:
go get -u github.com/go-gl/gl/v3.3-core/gl
go get -u github.com/veandco/go-sdl2/sdl
This will install Go bindings for OpenGL and SDL2.
- Clone this repository:
git clone git@github.com:kekcleader/goAndOberonOpenGL.git
or download it.
- Go to subdirectory
g001_simplest
(or another) and type:
make
It simply compiles and runs the program using go run
.
File Name | Description |
---|---|
g001_simplest | Simplest Go example of 3D graphics using OpenGL + SDL2. Draws a triangle on the screen. |
g002_colors | Applies a gradient color to the triangle. |
g003_texture | Applies a simple texture to the triangle. |
g004_rectangle | Textured rectangle. |
g005_animation | Draws a rectangle with an animated texture. |
g006_twotextures | Rectangle with two textures mixed together. |
g007_transform | Transforms the rectangle. |