Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeremyletang/verdigris
OpenGL windowing for Rust
https://github.com/jeremyletang/verdigris
Last synced: 25 days ago
JSON representation
OpenGL windowing for Rust
- Host: GitHub
- URL: https://github.com/jeremyletang/verdigris
- Owner: jeremyletang
- License: mit
- Created: 2014-07-07T11:36:59.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-20T11:11:26.000Z (about 10 years ago)
- Last Synced: 2023-07-31T14:58:49.404Z (over 1 year ago)
- Language: Rust
- Size: 473 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
verdigris
=========OpenGL windowing for Rust
```Rust
extern crate verdigris;
extern crate gl;use verdigris::{WindowBuilder, VideoMode, ContextSettings};
use verdigris::window_style::{Resizable, Titled, Closable, Miniaturizable};fn main() {
gl::load_with(|proc_name| verdigris::gl::get_proc_address(proc_name));let mut window = WindowBuilder::new()
.video_mode(VideoMode { width: 800, height: 600 })
.style(&[Titled, Closable, Resizable, Miniaturizable])
.title("Verdigris Window !")
.settings(ContextSettings::new())
.create()
.expect("Cannot create window !");window.show();
while !window.should_close() {
window.poll_event();gl::ClearColor(0.9, 0.1, 0.1, 1.0);
gl::Clear(gl::COLOR_BUFFER_BIT);window.swap_buffers();
}
println!("Goodbye !")
}
```