1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # glwfr
//!
//! My library for OpenGL.
//!
//! ## Use
//!
//! ```toml
//! [dependencies]
//! glwfr = "0.3.0"
//! ```
//!
//! ## Example
//!
//! ```rust
//! use glwfr::graphics::{window::Window, gl_wrapper::*};
//! use glwfr::gl;
//! use glwfr::cgmath::{Matrix4, Deg, Vector3, Point3, perspective};
//!
//! fn main() -> Result<(), glwfr::custom_errors::Errors>{
//! // Create a new window
//! let mut window = Window::new(800, 600, "glwfr window example")?;
//!
//! // Initialize OpenGL context
//! window.init_gl()?;
//!
//! // Enable depth testing
//! window.enable_depth_test();
//!
//! // Main loop
//! while !window.should_close() {
//! // Clear the screen and depth buffer
//! window.clear(0.0, 0.0, 0.0, 1.0);
//!
//! // Handle input
//! if window.is_key_pressed(glwfr::input::Key::Escape) {
//! window.set_should_close(true);
//! }
//!
//! // Update window
//! window.update();
//! }
//! }
//! ```
pub extern crate cgmath;
pub extern crate gl;