https://github.com/hammackj/learn_opengl_rust
My Port of LearnOpenGL.com to Rust for Personal Use
https://github.com/hammackj/learn_opengl_rust
opengl opengl-tutorial rust
Last synced: about 1 month ago
JSON representation
My Port of LearnOpenGL.com to Rust for Personal Use
- Host: GitHub
- URL: https://github.com/hammackj/learn_opengl_rust
- Owner: hammackj
- Created: 2025-05-16T16:58:46.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-05-21T20:09:35.000Z (about 1 year ago)
- Last Synced: 2026-02-21T04:00:06.454Z (4 months ago)
- Topics: opengl, opengl-tutorial, rust
- Language: Rust
- Homepage:
- Size: 27.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Port of Learn Opengl to Rust
This code is mostly for me to do the learnopengl.com lessons and port them to rust for my own use. Be advised stuff might not work or be wrong.
For a more complete Rust version see this repo https://github.com/srcres258/learnopengl-rust as it is recommended by LearnOpenGL.com
As I am pretty much porting the C++ code to Rust. The license is the same as the C++ code:
"All code samples, unless explicitly stated otherwise, are licensed under the terms of the CC BY-NC 4.0 license as published by Creative Commons, either version 4 of the License, or (at your option) any later version.
See https://learnopengl.com/About for more information.'
Each program is specifcially independant of any libraries or other chapters to make them as standalone as possible.
# To Build
cargo build
# Getting Started
## Hello Window

cargo run --bin hello_window
## Hello Triangle

cargo run --bin hello_triangle
## Hello Triangle Indexed

cargo run --bin hello_triangle_indexed
## Hello Triangle - Exercise 1

cargo run --bin hello_triangle_exercise_01
## Hello Triangle - Exercise 2

cargo run --bin hello_triangle_exercise_02
## Hello Triangle - Exercise 3

cargo run --bin hello_triangle_exercise_03
## Shaders - Uniforms

cargo run --bin shaders
## Shaders - Shader attributes

cargo run --bin shaders
## Shaders - Shader Object
This example uses a build script to copy shaders to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/09_shaders_object
cargo run
## Shaders - Exercise 1
This example uses a build script to copy shaders to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/10_shaders_exercise_01
cargo run
## Shaders - Exercise 2
This example uses a build script to copy shaders to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/11_shaders_exercise_02
cargo run
## Shaders - Exercise 3
This example uses a build script to copy shaders to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/12_shaders_exercise_03
cargo run
## Textures
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/13_textures
cargo run
## Textures Units
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/14_textures_units
cargo run
## Textures Exercise 01
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/15_textures_exercise_01
cargo run
## Textures Exercise 02
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/16_textures_exercise_02
cargo run
## Textures Exercise 03
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/16_textures_exercise_03
cargo run
## Textures Exercise 04
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/18_textures_exercise_04
cargo run
## Transforms
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/19_transformations
cargo run
## Transforms Exercise 01
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/20_transformations_exercise_01
cargo run
## Transforms Exercise 02
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/21_transformations_exercise_02
cargo run
## Coords
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/22_coords
cargo run
## Coords Depth
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/23_coords_depth
cargo run
## Coords More Cubes
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/24_coords_more_cubes
cargo run
## Coords More Cubes Exercise 03
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/25_coords_exercise_03
cargo run
## Camera
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/26_camera
cargo run
## Camera - Walk Around
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/27_camera_walk_around
cargo run
## Camera - Mouse
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/28_camera_mouse
cargo run
## Camera - Object
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/29_camera_object
cargo run
## Light - Colors
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/30_light_colors
cargo run
## Light - Basic
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/31_light_basic
cargo run
## Light - Specular
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/32_light_specular
cargo run
## Light - Exercise 01
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/33_light_exercise_01
cargo run
## Light - Exercise 03
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/35_light_exercise_03
cargo run
## Light - Exercise 04
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/36_light_exercise_04
cargo run
## Material
This example uses a build script to copy shaders/textures to the folder so you have to run it in place.
cd learn_opengl/01_getting_started/37_materials
cargo run