https://github.com/carter907/kartapple-gl
A Rust OpenGL layer for rendering graphics with ease!
https://github.com/carter907/kartapple-gl
cgmath game-engine gl glfw grapics opengl rust
Last synced: about 2 months ago
JSON representation
A Rust OpenGL layer for rendering graphics with ease!
- Host: GitHub
- URL: https://github.com/carter907/kartapple-gl
- Owner: Carter907
- Created: 2023-08-06T20:54:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-29T23:02:08.000Z (over 2 years ago)
- Last Synced: 2026-01-14T11:50:01.019Z (5 months ago)
- Topics: cgmath, game-engine, gl, glfw, grapics, opengl, rust
- Language: Rust
- Homepage:
- Size: 189 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KartApple-GL

#### Rust opengl library for creating whatever you want in opengl!
### Goals
- Lightweight
- Flexible for general purpose graphics
- Easy to use for beginners
```rust
impl AppScaffold for PrismGL {
unsafe fn on_init(&mut self, app: &mut KartApple) {
gl::Enable(gl::DEPTH_TEST);
let vert_code = include_str!("../shaders/vert.glsl").to_string();
let frag_code = include_str!("../shaders/frag.glsl").to_string();
self.program = ProgramUtils::create_program(&vert_code, &frag_code);
let mut vao = GLuint::from(1u32);
gl::GenVertexArrays(1, &mut vao);
gl::BindVertexArray(vao);
self.vao = vao;
let side_length = 0.75f32;
//...
}
}
```

## Requirements
- must have cmake installed for glfw
```bash
sudo apt install cmake
```
```bash
choco install cmake
```
## Quick Start
- implement the Scaffold trait and pass it in as an argument to KartApple.start