mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 05:21:31 +11:00
get_proc_address now returns a libc::c_void
This commit is contained in:
parent
c3a73bd68e
commit
87d62e5b6f
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue