diff options
author | Tomaka17 <pierre.krieger1708@gmail.com> | 2014-11-05 15:22:21 +0100 |
---|---|---|
committer | Tomaka17 <pierre.krieger1708@gmail.com> | 2014-11-05 15:32:01 +0100 |
commit | 7ce851dad9102c28ee2fd372ed9fd62e73364da9 (patch) | |
tree | 54f1b395234484522b34994b2d4ae36292d916af /tests | |
parent | 2e44edea60a19919be467a1228ae971e7b988fec (diff) | |
download | glutin-7ce851dad9102c28ee2fd372ed9fd62e73364da9.tar.gz glutin-7ce851dad9102c28ee2fd372ed9fd62e73364da9.zip |
Update for changes in gl-rs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/headless.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/headless.rs b/tests/headless.rs index 3c587ea..fe82c1d 100644 --- a/tests/headless.rs +++ b/tests/headless.rs @@ -24,12 +24,14 @@ fn main() { let gl = gl::Gl::load_with(|symbol| window.get_proc_address(symbol)); - gl.ClearColor(0.0, 1.0, 0.0, 1.0); - gl.Clear(gl::COLOR_BUFFER_BIT); - - let mut value: (u8, u8, u8, u8) = unsafe { std::mem::uninitialized() }; - unsafe { gl.ReadPixels(0, 0, 1, 1, gl::RGBA, gl::UNSIGNED_BYTE, std::mem::transmute(&mut value)) }; - - assert!(value == (0, 255, 0, 255) || value == (0, 64, 0, 255) || - value == (0, 64, 0, 255) || value == (0, 64, 0, 0)); + unsafe { + gl.ClearColor(0.0, 1.0, 0.0, 1.0); + gl.Clear(gl::COLOR_BUFFER_BIT); + + let mut value: (u8, u8, u8, u8) = std::mem::uninitialized(); + gl.ReadPixels(0, 0, 1, 1, gl::RGBA, gl::UNSIGNED_BYTE, std::mem::transmute(&mut value)); + + assert!(value == (0, 255, 0, 255) || value == (0, 64, 0, 255) || + value == (0, 64, 0, 255) || value == (0, 64, 0, 0)); + } } |