From 87d62e5b6f38ab34586c0c9b5f41f1558e51cd14 Mon Sep 17 00:00:00 2001 From: Tomaka17 Date: Mon, 11 Aug 2014 10:32:33 +0200 Subject: get_proc_address now returns a libc::c_void --- README.md | 2 +- examples/fullscreen.rs | 2 +- examples/multiwindow.rs | 2 +- examples/window.rs | 2 +- src/lib.rs | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5972f99..abe25ae 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ fn main() { unsafe { window.make_current() }; - gl::load_with(|symbol| window.get_proc_address(symbol) as *const libc::c_void); + gl::load_with(|symbol| window.get_proc_address(symbol)); gl::ClearColor(0.0, 1.0, 0.0, 1.0); diff --git a/examples/fullscreen.rs b/examples/fullscreen.rs index 5cb71f7..d2e748c 100644 --- a/examples/fullscreen.rs +++ b/examples/fullscreen.rs @@ -29,7 +29,7 @@ fn main() { unsafe { window.make_current() }; - gl::load_with(|symbol| window.get_proc_address(symbol) as *const libc::c_void); + gl::load_with(|symbol| window.get_proc_address(symbol)); let version = { use std::c_str::CString; diff --git a/examples/multiwindow.rs b/examples/multiwindow.rs index 4f58441..1cec1db 100644 --- a/examples/multiwindow.rs +++ b/examples/multiwindow.rs @@ -23,7 +23,7 @@ fn main() { fn run(window: init::Window, color: (f32, f32, f32, f32)) { unsafe { window.make_current() }; - gl::load_with(|symbol| window.get_proc_address(symbol) as *const libc::c_void); + gl::load_with(|symbol| window.get_proc_address(symbol)); { let win_size = window.get_inner_size().unwrap(); diff --git a/examples/window.rs b/examples/window.rs index db80e39..dfe804e 100644 --- a/examples/window.rs +++ b/examples/window.rs @@ -7,7 +7,7 @@ fn main() { unsafe { window.make_current() }; - gl::load_with(|symbol| window.get_proc_address(symbol) as *const libc::c_void); + gl::load_with(|symbol| window.get_proc_address(symbol)); let version = { use std::c_str::CString; diff --git a/src/lib.rs b/src/lib.rs index 46f2f93..aae14e7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -265,8 +265,8 @@ impl Window { /// /// Contrary to `wglGetProcAddress`, all available OpenGL functions return an address. #[inline] - pub fn get_proc_address(&self, addr: &str) -> *const () { - self.window.get_proc_address(addr) + pub fn get_proc_address(&self, addr: &str) -> *const libc::c_void { + self.window.get_proc_address(addr) as *const libc::c_void } /// Swaps the buffers in case of double or triple buffering. -- cgit v1.2.3