Skip to content

Commit f08dad6

Browse files
committed
Misc changes.
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
1 parent 9a1756d commit f08dad6

File tree

10 files changed

+15
-6
lines changed

10 files changed

+15
-6
lines changed

glutin/src/api/egl/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -796,9 +796,10 @@ impl<'a> ContextPrototype<'a> {
796796
std::ptr::null(),
797797
);
798798
if surface.is_null() {
799-
return Err(CreationError::OsError(
800-
"eglCreateWindowSurface failed".to_string(),
801-
));
799+
return Err(CreationError::OsError(format!(
800+
"eglCreateWindowSurface failed with 0x{:x}",
801+
egl.GetError()
802+
)));
802803
}
803804
surface
804805
};

glutin/src/windowed.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub type WindowedContext<T> = ContextWrapper<T, Window>;
4545
#[cfg_attr(
4646
target_os = "windows",
4747
doc = "\
48-
[`platform::windows::RawContextExt`]: os/windows/enum.RawHandle.html
48+
[`platform::windows::RawContextExt`]: os/windows/trait.RawContextExt.html
4949
"
5050
)]
5151
#[cfg_attr(
@@ -75,7 +75,7 @@ pub type WindowedContext<T> = ContextWrapper<T, Window>;
7575
target_os = "openbsd",
7676
),
7777
doc = "\
78-
[`platform::unix::RawContextExt`]: os/unix/enum.RawHandle.html
78+
[`platform::unix::RawContextExt`]: os/unix/trait.RawContextExt.html
7979
"
8080
)]
8181
pub type RawContext<T> = ContextWrapper<T, ()>;

glutin_examples/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ glutin = { path = "../glutin" }
1515
winit = "0.19"
1616
takeable-option = "0.4"
1717
image = "0.21"
18+
env_logger = "0.6"
1819

1920
[build-dependencies]
2021
gl_generator = "0.11"

glutin_examples/examples/fullscreen.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use glutin::window::WindowBuilder;
99
use std::io::Write;
1010

1111
fn main() {
12+
env_logger::init();
1213
let el = EventLoop::new();
1314

1415
#[cfg(target_os = "macos")]

glutin_examples/examples/headless.rs

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ fn build_context<T1: ContextCurrentState>(
7878
}
7979

8080
fn main() {
81+
env_logger::init();
8182
let cb = ContextBuilder::new()
8283
.with_gl_profile(GlProfile::Core)
8384
.with_gl(GlRequest::Latest);

glutin_examples/examples/multiwindow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use glutin::ContextBuilder;
77
use support::{ContextCurrentWrapper, ContextTracker, ContextWrapper};
88

99
fn main() {
10+
env_logger::init();
1011
let el = EventLoop::new();
1112
let mut ct = ContextTracker::default();
1213

glutin_examples/examples/raw_context.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ mod this_example {
1919
use takeable_option::Takeable;
2020

2121
pub fn main() {
22+
env_logger::init();
2223
print!("Do you want transparency? (true/false) (default: true): ");
2324
std::io::stdout().flush().unwrap();
2425

@@ -121,7 +122,7 @@ File a PR if you are interested in implementing the latter.
121122

122123
let mut raw_context = Takeable::new(raw_context);
123124
el.run(move |event, _, control_flow| {
124-
println!("el {:?}", event);
125+
println!("{:?}", event);
125126
*control_flow = ControlFlow::Wait;
126127

127128
match event {

glutin_examples/examples/sharing.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn make_renderbuf(gl: &support::Gl, size: PhysicalSize) -> gl::types::GLuint {
2424
}
2525

2626
fn main() {
27+
env_logger::init();
2728
let el = EventLoop::new();
2829
let mut size = PhysicalSize::new(768., 480.);
2930

glutin_examples/examples/transparent.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use glutin::window::WindowBuilder;
66
use glutin::ContextBuilder;
77

88
fn main() {
9+
env_logger::init();
910
let el = EventLoop::new();
1011
let wb = WindowBuilder::new()
1112
.with_title("A transparent window!")

glutin_examples/examples/window.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use glutin::window::WindowBuilder;
66
use glutin::ContextBuilder;
77

88
fn main() {
9+
env_logger::init();
910
let el = EventLoop::new();
1011
let wb = WindowBuilder::new().with_title("A fantastic window!");
1112

0 commit comments

Comments
 (0)