diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-01-13 20:59:48 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-01-13 20:59:48 +0100 |
commit | e3943945c75465fa813ea8eb75d56cf55b2c092e (patch) | |
tree | 81526203a89160898dc8ee55472628012f2708b0 /src/x11/headless.rs | |
parent | 2d4f1c72fbd3c53f7ec9049076f435c95666293e (diff) | |
parent | 5a4fee967a9f2d7d64edad09bf1f19a5c560032e (diff) | |
download | glutin-e3943945c75465fa813ea8eb75d56cf55b2c092e.tar.gz glutin-e3943945c75465fa813ea8eb75d56cf55b2c092e.zip |
Merge pull request #197 from ozkriff/master
x11, android, win: [ui]size -> [ui]32
Diffstat (limited to 'src/x11/headless.rs')
-rw-r--r-- | src/x11/headless.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/x11/headless.rs b/src/x11/headless.rs index d13d1d0..7692832 100644 --- a/src/x11/headless.rs +++ b/src/x11/headless.rs @@ -14,8 +14,8 @@ fn with_c_str<F, T>(s: &str, f: F) -> T where F: FnOnce(*const i8) -> T { pub struct HeadlessContext { context: ffi::OSMesaContext, buffer: Vec<u32>, - width: uint, - height: uint, + width: u32, + height: u32, } impl HeadlessContext { @@ -25,7 +25,8 @@ impl HeadlessContext { Ok(HeadlessContext { width: dimensions.0, height: dimensions.1, - buffer: ::std::iter::repeat(unsafe { mem::uninitialized() }).take(dimensions.0 * dimensions.1).collect(), + buffer: ::std::iter::repeat(unsafe { mem::uninitialized() }) + .take((dimensions.0 * dimensions.1) as usize).collect(), context: unsafe { let ctxt = ffi::OSMesaCreateContext(0x1908, ptr::null()); if ctxt.is_null() { @@ -59,7 +60,7 @@ impl HeadlessContext { ::Api::OpenGl } - pub fn set_window_resize_callback(&mut self, _: Option<fn(uint, uint)>) { + pub fn set_window_resize_callback(&mut self, _: Option<fn(u32, u32)>) { } } |