From 92ddc5e31356aa1274fe4e469c4f38a869ad26ea Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Mon, 12 Aug 2013 13:10:31 -0700 Subject: [PATCH] More Rust version updates --- gl2.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gl2.rs b/gl2.rs index d5e1298..2980873 100644 --- a/gl2.rs +++ b/gl2.rs @@ -388,7 +388,7 @@ pub fn attach_shader(program: GLuint, shader: GLuint) { pub fn bind_attrib_location(program: GLuint, index: GLuint, name: ~str) { unsafe { - do name.as_c_str |cstr| { + do name.to_c_str().with_ref |cstr| { glBindAttribLocation(program, index, cstr); } } @@ -703,7 +703,7 @@ pub fn gen_vertex_arrays(n: GLsizei) -> ~[GLuint] { pub fn get_attrib_location(program: GLuint, name: ~str) -> c_int { unsafe { - do name.as_c_str |name_bytes| { + do name.to_c_str().with_ref |name_bytes| { glGetAttribLocation(program, name_bytes as *GLchar) } } @@ -776,7 +776,7 @@ pub fn get_shader_iv(shader: GLuint, pname: GLenum) -> GLint { pub fn get_uniform_location(program: GLuint, name: ~str) -> c_int { unsafe { - do name.as_c_str |name_bytes| { + do name.to_c_str().with_ref |name_bytes| { glGetUniformLocation(program, name_bytes as *GLchar) } }