This repository contains chapter examples and solutions to OpenGL exercises from LearnOpenGL.com, implemented in Go using the go-gl bindings. Managed by Merlindorin, this project aims to demonstrate foundational OpenGL concepts using the Go programming language.
Explore fundamental OpenGL concepts and practices through structured exercises. Using Go with go-gl, this repository provides a practical learning path parallel to the tutorials on LearnOpenGL.com.
To effectively use this repository, you'll need:
- Go: Ensure the latest version is installed for compatibility.
- Git: For version control and managing repository copies.
- Task: Utilized for script and automation task management.
- Aqua: Manages CLI tool versions consistently used in the project.
- Clone this repository to your local machine:
git clone https://github.com/merlindorin/opengl-go-exercises.git cd opengl-go-exercises
After cloning the repository, navigate to any exercise directory within exercises/
and run the main Go file. Here is an example command for running the first exercise:
cd exercices/1.1.hello_window
go run main.go
Each subdirectory represents a separate exercise from LearnOpenGL.com, implemented using Go.
To contribute or modify the exercises, follow these steps:
- Ensure all dependencies are installed.
- Navigate to the desired exercise directory.
- Develop and test your changes.
exercices
: Contains subdirectories for each exercise, numbered according to their sequence in the tutorial.- Each exercise includes
.go
files for primary logic and.glsl
files for shaders.
- Each exercise includes
utils
: Holds utility Go files for shader and program management, aiding in common tasks such as error checking and shader compilation.Taskfile.yaml
: Configuration for automating tasks like building and testing.aqua.yaml
: Specifies CLI tools managed by Aqua for development.
Use Taskfile to automate repetitive tasks. It helps standardize tasks like building the exercise binaries and running tests. Review the Taskfile.yaml
to explore available tasks.
-
Ensure Aqua is installed by following the Aqua installation guide.
-
Use the
aqua.yaml
file provided to detail required tool versions. -
Run Aqua to install these tools:
aqua i
This command will guide Aqua in installing the specified tools, ensuring all contributors use consistent tool versions.
Interested in contributing?
- Fork the repository.
- Create a new branch:
git checkout -b feature/new-feature
. - Commit your changes:
git commit -m 'Add new feature'
. - Push your branch:
git push origin feature/new-feature
. - Open a pull request for discussion and review.
This project is licensed under the MIT License. See the LICENSE.md file for details.
- LearnOpenGL.com - A comprehensive resource for learning OpenGL.
- go-gl - Go bindings for OpenGL.