Skip to content

Instantly share code, notes, and snippets.

View Mimerme's full-sized avatar
🛠️
Stuff-ing.

Yaros Mimerme

🛠️
Stuff-ing.
View GitHub Profile
@Mimerme
Mimerme / triangle.rs
Created May 15, 2021 02:12
Triangle with SDL2-rs and gl-rs
use std::{
ffi::{c_void, CStr, CString},
mem, ptr,
};
use anyhow::Result;
use gl::types::{GLboolean, GLchar, GLenum, GLfloat, GLint, GLsizeiptr, GLuint};
use sdl2::{event::Event, sys::KeyCode};
static WIDTH: GLuint = 512;
-- This library provide high level turtle movement functions.
--
-- Before being able to use them, you should start the GPS with egps.startGPS()
-- then get your current location with egps.setLocationFromGPS().
-- egps.forward(), egps.back(), egps.up(), egps.down(), egps.turnLeft(), egps.turnRight()
-- replace the standard turtle functions.
-- If you need to use the standard functions, you
-- should call egps.setLocationFromGPS() again before using any egps functions.
-- Gist at: https://gist.github.com/SquidLord/4741746