From 7ce851dad9102c28ee2fd372ed9fd62e73364da9 Mon Sep 17 00:00:00 2001 From: Tomaka17 Date: Wed, 5 Nov 2014 15:22:21 +0100 Subject: Update for changes in gl-rs --- tests/headless.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'tests') 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)); + } } -- cgit v1.2.3