mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 21:30:03 -04:00
Update for changes in gl-rs
This commit is contained in:
16
src/lib.rs
16
src/lib.rs
@@ -31,6 +31,8 @@
|
||||
|
||||
#[phase(plugin)] extern crate compile_msg;
|
||||
#[phase(plugin)] extern crate gl_generator;
|
||||
|
||||
extern crate gl_common;
|
||||
extern crate libc;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
@@ -397,6 +399,13 @@ impl Window {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "window")]
|
||||
impl gl_common::GlFunctionsSource for Window {
|
||||
fn get_proc_addr(&self, addr: &str) -> *const libc::c_void {
|
||||
self.get_proc_address(addr)
|
||||
}
|
||||
}
|
||||
|
||||
/// Represents a headless OpenGL context.
|
||||
#[cfg(feature = "headless")]
|
||||
pub struct HeadlessContext {
|
||||
@@ -421,6 +430,13 @@ impl HeadlessContext {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "headless")]
|
||||
impl gl_common::GlFunctionsSource for HeadlessContext {
|
||||
fn get_proc_addr(&self, addr: &str) -> *const libc::c_void {
|
||||
self.get_proc_address(addr)
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator for the `poll_events` function.
|
||||
// Implementation note: we retreive the list once, then serve each element by one by one.
|
||||
// This may change in the future.
|
||||
|
||||
Reference in New Issue
Block a user