diff --git a/examples/src/glupload.rs b/examples/src/glupload.rs index 852b36c8c..8403ed87d 100644 --- a/examples/src/glupload.rs +++ b/examples/src/glupload.rs @@ -206,9 +206,10 @@ fn load(gl_context: &glutin::WindowedContext) -> Gl { gl.LinkProgram(program); { - let mut success: gl::types::GLint = 1; - gl.GetProgramiv(fs, gl::LINK_STATUS, &mut success); - assert!(success != 0); + let mut success = 1; + gl.GetProgramiv(program, gl::LINK_STATUS, &mut success); + assert_ne!(success, 0); + assert_eq!(gl.GetError(), 0); } let attr_position = gl.GetAttribLocation(program, b"a_position\0".as_ptr() as *const _); @@ -279,6 +280,8 @@ fn load(gl_context: &glutin::WindowedContext) -> Gl { gl.BindBuffer(gl::ELEMENT_ARRAY_BUFFER, 0); gl.BindBuffer(gl::ARRAY_BUFFER, 0); + assert_eq!(gl.GetError(), 0); + ( program, attr_position,