https://github.com/ad2476/cuddly-broccoli
OpenGL with Rust
https://github.com/ad2476/cuddly-broccoli
broccoli opengl rust
Last synced: 21 days ago
JSON representation
OpenGL with Rust
- Host: GitHub
- URL: https://github.com/ad2476/cuddly-broccoli
- Owner: ad2476
- Created: 2018-08-21T19:25:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-07T01:32:28.000Z (over 6 years ago)
- Last Synced: 2025-02-27T04:25:47.729Z (over 1 year ago)
- Topics: broccoli, opengl, rust
- Language: Rust
- Homepage:
- Size: 3.16 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cuddly Broccoli 🥦
OpenGL things in Rust. Aims to provide safe abstractions on top of OpenGL functions, data structures and types.
The goal is to be a starting point for more advanced graphics tasks.
## Features
A running list of what's been implemented so far:
* Window creation, keybindings.
* Low-level buffer operations: Abstractions on VBOs, IBOs, vertex attributes.
* Abstractions on shader compiling and linking, setting uniforms.
* Very basic resource loading system for reading files from disk such as shaders, images, other assets.
* Perspective camera with methods for zooming and orbiting.
* Abstractions on shape primitives. Sphere and cylinder vertex generators which are generic over vertex layout.
* Generic 3D mesh shape with normals.
* Abstractions on OpenGL textures: 2D texture and cubemap targets
* Skybox as cubemapped cube.
* Basic lighting model with ambient and diffuse illumination.
## Documentation
Run `cargo doc` from the project root to generate documentation.
## Build requirements
You will need the latest stable version of Rust, preferably installed via [rustup](https://www.rust-lang.org/tools/install).
Install [SDL2](https://www.libsdl.org/) through your package manager (e.g. `apt-get`, `dnf`, `pacman`, `brew`).
This project is confirmed to work on OS X up to 10.14.1 (Mojave) or Linux. No guarantees for Windows.
A discrete GPU not required, but can be very useful.
## Screenshot

## References
* [Brown CS1230: Introduction to Computer Graphics](http://cs.brown.edu/courses/cs123/)
* [OpenGL in Rust from Scratch](http://nercury.github.io/rust/opengl/tutorial/2018/02/08/opengl-in-rust-from-scratch-00-setup.html)
* [Learn OpenGL](https://learnopengl.com/)