get_proc_address now returns a libc::c_void

This commit is contained in:
Tomaka17 2014-08-11 10:32:33 +02:00
parent c3a73bd68e
commit 87d62e5b6f
5 changed files with 6 additions and 6 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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();

View file

@ -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;

View file

@ -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.